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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to