Troubleshooting Web Service Consumption
I am attempting to connect to hosted solution's web service. The solution takes an xml query and returns an xml resultset via soap.
When I connect to the WSDL using a .Net 3.5 service, the code will not compile due to ambiguity errors. When I connect using a .Net 2.0 Web Service the project compiles and when I build the xml query and send it to the service I get back what is expected except two fields of the same type that are not filled in properly. When I check the xml coming back with Fiddler I am getting the data for that field, it would seem somewhere in the reference code that data doesn't make it to the generated service object. I am not really expecting an answer as to why from anyone but I am at a loss for my next step in the troubleshooting process.
Since the data comes back from the service it is getting lost somewhere in the reference code and how it 开发者_开发技巧is getting put back in the object. I would appreciate any help on where to look next.
Does the schema being consumed use attributes? If so, try either forcing svcutil to use XmlSerializer serialization using the /serializer:XmlSerializer
command line option or you can try to use the /importXmlTypes
switch will will import any types that don't fit the data contract patterns as an IXmlSerializable
implementation.
精彩评论