I am trying to import a web service from another application into a custom asp.net application. However, it’s throwing an error at the moment. Have you seen the following error before (see below)?
Custom tool error: Unable to import WebService/Schema. Unable to import binding 'AuthenticateSoapBinding' from namespace 'http://site:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate'. Unable to import operation 'connect'. Types must be declared at the top level in the schema. Please review schema type 'Map' from namespace 'http://xml.apache.org/xml-soap': element 'item' is using anonymous type declaration, anonymous type开发者_StackOverflow社区s are not supported with encoded SOAP.
Some initial research in google shows the following:
Java .Net Interop. Axis java.util.Map http://wiki.apache.org/ws/FrontPage/Axis/DotNetInteropMapInfo
Which mentioned that the web service need to be changed. However, I don’t think this is going to happened. Any idea on how to get around this?
The following is the web service XML that I get the information from:
<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" xmlns:intf="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><wsdl:types><schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"><import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><complexType name="Map"><sequence><element maxOccurs="unbounded" minOccurs="0" name="item"><complexType><all><element name="key" type="xsd:anyType"/><element name="value" type="xsd:anyType"/></all></complexType></element></sequence></complexType></schema></wsdl:types>
<message name="keepAliveResponse">
<part name="keepAliveReturn" type="apachesoap:Map"/>
</message>
<message name="connectResponse">
<part name="connectReturn" type="apachesoap:Map"/>
</message>
<message name="connectRequest">
<part name="username" type="xsd:string"/>
<part name="password" type="xsd:string"/>
</message>
<message name="disconnectRequest">
</message>
<message name="disconnectResponse">
<part name="disconnectReturn" type="apachesoap:Map"/>
</message>
<message name="keepAliveRequest">
</message>
<portType name="Authenticate">
<operation name="connect" parameterOrder="username password">
<input message="impl:connectRequest" name="connectRequest"/>
<output message="impl:connectResponse" name="connectResponse"/>
</operation>
<operation name="keepAlive">
<input message="impl:keepAliveRequest" name="keepAliveRequest"/>
<output message="impl:keepAliveResponse" name="keepAliveResponse"/>
</operation>
<operation name="disconnect">
<input message="impl:disconnectRequest" name="disconnectRequest"/>
<output message="impl:disconnectResponse" name="disconnectResponse"/>
</operation>
</portType>
<binding name="AuthenticateSoapBinding" type="impl:Authenticate">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="connect">
<wsdlsoap:operation soapAction=""/>
<input name="connectRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.livetime.com" use="encoded"/>
</input>
<output name="connectResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" use="encoded"/>
</output>
</operation>
<operation name="keepAlive">
<wsdlsoap:operation soapAction=""/>
<input name="keepAliveRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.livetime.com" use="encoded"/>
</input>
<output name="keepAliveResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" use="encoded"/>
</output>
</operation>
<operation name="disconnect">
<wsdlsoap:operation soapAction=""/>
<input name="disconnectRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://ws.livetime.com" use="encoded"/>
</input>
<output name="disconnectResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate" use="encoded"/>
</output>
</operation>
</binding>
<service name="Authenticate">
<port binding="impl:AuthenticateSoapBinding" name="Authenticate">
<wsdlsoap:address location="http://server:80/LiveTime/WebObjects/LiveTime.woa/ws/Authenticate"/>
</port>
</service>
</definitions>
精彩评论