2013-03-22 64 views
0

以下是WSDL文件,我无法为此WSDL文件生成代理类。从WSDL文档生成代理类时出错

<?xml version ='1.0' encoding ='ISO-8859-1' ?> 
<definitions name='SunesisService' targetNamespace='https://exg.sunesis.uk.net/'  xmlns:tns='https://exg.sunesis.uk.net/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 
<wsdl:types> 
    <xsd:schema targetNamespace="https://exg.sunesis.uk.net/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
     <xsd:element name="destinyXML"> 
      <xsd:complexType name="mimeXmlType" use="required"> 
       <xsd:sequence> 
        <xsd:any/> 
       </xsd:sequence> 
      </xsd:complexType> 
     </xsd:element> 
    </xsd:schema> 
</wsdl:types> 

<message name='receiveILRRequest'> 
    <part name='receiveILRRequest_username' type='xsd:string' /> 
    <part name='receiveILRRequest_password' type='xsd:string' /> 
    <part name='receiveILRRequest_destinyXMLFileName' type='xsd:string' /> 
    <part name='receiveILRRequest_destinyXML' type='mimeXmlType' /> 
</message> 
<message name='receiveILRResponse'> 
    <part name='receiveILRResponse_Result' type='xsd:string' /> 
</message> 

<portType name='DestinyReceipt'> 

    <operation name='acceptEXG'> 
     <input message='tns:receiveILRRequest'/> 
     <output message='tns:receiveILRResponse'/> 
    </operation> 

</portType> 

<binding name='SunesisBinding' type='tns:DestinyReceipt'> 
    <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http' /> 
    <operation name='acceptEXG'> 
     <soap:operation soapAction='urn:localhost-catalog#acceptILR'/> 
     <input> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> 
     </input> 
     <output> 
      <soap:body use='encoded' namespace='urn:localhost-catalog' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' /> 
     </output> 
    </operation> 
</binding> 

<service name='SunesisService'> 
    <port name='SunesisPort' binding='SunesisBinding'> 
     <soap:address location='https://exg.sunesis.uk.net/module_soap/sunesis.php' /> 
    </port> 
</service> 

+0

错误消息? “我无法”是什么意思? – ken2k 2013-03-22 10:40:12

+0

当我运行wsdl.exe工具时产生错误 – user1369905 2013-03-22 10:42:55

+0

我试过了wsdl.exe和svcutil.exe。请问我的WSDL文件有问题吗? – user1369905 2013-03-22 10:44:18

回答

0

必须在您的文档

年底关闭definitions node尝试用这种格式

<definitions name='SunesisService' targetNamespace='https://exg.sunesis.uk.net/'  xmlns:tns='https://exg.sunesis.uk.net/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> 

     .......... 


    <service name='SunesisService'> 
     <port name='SunesisPort' binding='SunesisBinding'> 
      <soap:address location='https://exg.sunesis.uk.net/module_soap/sunesis.php' /> 
     </port> 
    </service> 
</definitions> 
+0

它在原始文档中正确关闭。在这里复制代码时我错过了它。 – user1369905 2013-03-22 10:46:39