AdWords API Re: Using .net API
If you want to take this one level further: Create an XSD that describes ApiException and its child member, ApiError. When you catch a SoapException, take the Detail.OuterXml member, and parse it with XmlSerializer.Deserialize() For this you need an XSD that describes the XML fragment. The beauty here is that Visual Studio can take the same XSD and create a C# class definition from that. And the result of XmlSerializer.Deserialize() can be casted to that same definition. It works quite well, in fact it does so well that you'll only run in problems during an update of the WSDL: you'll need to update the XSD for ApiException *and* regenerate the derived C# classes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~--~~~~--~~--~--~---
AdWords API Re: Using .net API
That's fantastic!I'll try this out right now on my own adwords' application. Thanks a lot. Bye, Eric On Mon, Aug 24, 2009 at 04:57, Harutyun Terteryan wrote: > Hi all > > I find solution for mentioned issue. > In the api methods throws Exception on soapException catch block and set > catched soapException as InnerException, so > we can get that exception and it's Detail property witch contains InnerText > from web service. > > Best > Harut. > > On Mon, Aug 24, 2009 at 10:57 AM, Harutyun Terteryan wrote: > >> Hi all >> >> I'm using .net API v13. And want to get error messages from web service >> response, Is there any solution for that issue, or I must do it myself ? >> >> Best >> Harut. >> >> >> > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~--~~~~--~~--~--~---
AdWords API Re: Using .net API
Hi all I find solution for mentioned issue. In the api methods throws Exception on soapException catch block and set catched soapException as InnerException, so we can get that exception and it's Detail property witch contains InnerText from web service. Best Harut. On Mon, Aug 24, 2009 at 10:57 AM, Harutyun Terteryan wrote: > Hi all > > I'm using .net API v13. And want to get error messages from web service > response, Is there any solution for that issue, or I must do it myself ? > > Best > Harut. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en -~--~~~~--~~--~--~---