I am trying to use the next WSDL in VS2010, and Im is working with errors that seem specific to WSDL.
I add it as a link to a web service, and proxy classes or anything else are not created initially - the wizard completes successfully, and I get the .wsdl and Reference.map file in ~ / Web links / in the project, however the service is not available in code.
If I have an "Update Web Link", I get the following error:
Custom tool error: Unable to import WebService/Schema. The element attribute is not allowed on encoded message parts. The erroneous part is named 'textReturnObject' in message 'singleTextResponse'. (File: Reference.map line 1 column 1)
If I try to rename "element" to "type", I get a whole bunch of other problems:
The custom tool 'MSDiscoCodeGenerator' failed. Cannot find definition for http://schemas.xmlsoap.org/wsdl/:exampleServiceNameBinding. Service Description with namespace http://schemas.xmlsoap.org/wsdl/ is missing. Parameter name: name
Can anyone shed light on him? I put WSDL through some online tools and they consume it well - does VS2010 have a problem with certain types of WSDL?
<?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.com/exampleServiceName" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="exampleServiceName" targetNamespace="http://www.example.com/exampleServiceName" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <xsd:complexType name="exampleType"> <sequence> <element minOccurs="1" maxOccurs="1" name="title" type="string" /> <element minOccurs="1" maxOccurs="1" name="url" type="string" /> <element minOccurs="1" maxOccurs="1" name="description" type="string" /> </sequence> </xsd:complexType> <wsdl:types /> <wsdl:message name="singleTextRequest"> <wsdl:part name="intIdentity" type="xsd:integer" /> </wsdl:message> <wsdl:message name="singleTextResponse"> <wsdl:part name="textReturnObject" element="wsdl:exampleType" /> </wsdl:message> <wsdl:portType name="exampleServiceNamePortType"> <wsdl:operation name="singleTextAdvert"> <wsdl:input message="tns:singleTextRequest" /> <wsdl:output message="tns:singleTextResponse" /> </wsdl:operation> </wsdl:portType> <wsdl:binding name="exampleServiceNameBinding" type="tns:exampleServiceNamePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" /> <wsdl:operation name="singleText"> <soap:operation soapAction="urn:xmethods-delayed-quotes#singleText" /> <wsdl:input> <soap:body use="encoded" namespace="urn:xmethods-delayed-quotes" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:input> <wsdl:output> <soap:body use="encoded" namespace="urn:xmethods-delayed-quotes" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="exampleServiceNameService"> <wsdl:port name="exampleServiceNamePort" binding="wsdl:exampleServiceNameBinding"> <soap:address location="http://www.example.com/exampleServiceName/Server.php" /> </wsdl:port> </wsdl:service> </wsdl:definitions>
source share