Tuesday, June 30, 2009

Consuming a Web Service with an error in WSDL

In one of my projects I am consuming a third party Web Services, written in I don’t know what. I have WCF Service References to them.

They launces new versions of their services  quit often, so I was fairly sure something was wrong this time. Updating or even deleting and adding references somehow didn’t work right. I could see the service in the browser, after logging on two times (this is normal). Adding or updating  the reference itself also works fine. I’m happy. Started updating all five references, and cleaned up the mess in app.config. Done this many times before. Building.

Error    4    Custom tool error: Failed to generate code for the service reference 'TheService'.  Please check other error and warning messages for details.    D:\temp\ConsoleApplication2\ConsoleApplication2\Service References\TheService\Reference.svcmap    1    1    ConsoleApplication2

What? Expanding all solution files, to investigate the code behind Service Reference/TheService/Reference.svcmap/Reference.cs. Empty!

Running wsdl.exe and svcutil.exe on the downloaded wsdl to investigate more. Finally something to understand: The complexType SomeClass has a property with a blank space in the name attribute. Not allowed. It looked something like this: 

<xs:element name="statusCode " type="foons:StatusCode "/> 




Luckily the vendor was quick to fix this when told. But I really would like Visual Studio to be more robust, either telling me what the problem is when adding a reference to a none valid WSDL or even maybe just remove the whitespace. Like IE does when watching the WSDL file….

1 comment:

  1. Would anyone be “shocked” to know that a man separated from a lady for years masturbated? To satisfy desire, a tool had been labored over and secreted away, and therefore freighted with uncomfortable importance. Reviewers love this dildo, however they note that the girth is "fairly something"—so novices, proceed with caution ! For these snug with substantial measurement, although, this can be sex toy store a|it is a} great option. Another evaluate reads, "If you might be} looking for something to make you orgasm each time, that is the one." ✨ Get the Aurora Borealis one, it’s like diamonds throughout.

    ReplyDelete