客户给了一个WSDL文件,但我们打开时出现以下错误:
src-resolve.4.2: Error resolving component 'soapenc:Array'. It was 
 detected that 'soapenc:Array' is in namespace 'http://
 schemas.xmlsoap.org/soap/encoding/', but components from this namespace 
 are not referenceable from schema document 'file:///F:/workspace/test/
 WebRoot/WSDL/dsmp.wsdl'. If this is the incorrect namespace, perhaps the 
 prefix of 'soapenc:Array' needs to be changed. If this is the correct 
 namespace, then an appropriate 'import' tag should be added to 'file:///
 F:/workspace/test/WebRoot/WSDL/dsmp.wsdl'.
不知道怎么解决,请高手帮忙解决下,先谢谢了。

解决方案 »

  1.   

    在使用此wsdl文件建客户端时,myeclipse显示以上的错误。
    有没有别的好的工具可以生成客户端啊。又或者是我们的wsdl文件格式不对?
    头大了弄了好几天了,都不行。
      

  2.   

    wsdl文件内容如下:
    <!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by lsjdfiewsfds (ORiON) -->
    <definitions xmlns:ws="http://www.mywork.com/dsmp/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.ort/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dsmp="http://www.mywork.com/dsmp/schemas/" targetNamespace="http://www.mywork.com/dsmp/wsdl/">
    <types>
    <schema targetNamespace="http://www.mywork.com/dsmp/schemas/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified">
    <complexType name="other_info_schema">
    <sequence>
    <element name="InfoCode" type="xsd:string"/>
    <element name="InfoValue" type="xsd:string"/>
    </sequence>
    </complexType>
    <complexType name="address_info_schema">
    <sequence>
    <element name="DeviceType" type="xsd:integer"/>
    <element name="DeviceID" type="xsd:string"/>
    </sequence>
    </complexType>
    <complexType name="user_id_schema">
    <sequence>
    <element name="UserIDType" type="xsd:integer"/>
    <element name="MSISDN" type="xsd:string"/>
    <element name="PseudoCode" type="xsd:base64Binary"/>
    </sequence>
    </complexType>
    <complexType name="ordered_history_list_schema">
    <sequence>
    <element name="SPID" type="xsd:string"/>
    <element name="SPServiceID" type="xsd:string"/>
    <element name="ActionType" type="xsd:string"/>
    <element name="ActionDate" type="xsd:string"/>
    <element name="ActionPlace" type="xsd:integer"/>
    <element name="OtherInfoNumber" type="xsd:integer"/>
    <element name="Other_Info" type="dsmp:other_info_schema"/>
    </sequence>
    </complexType>
    <complexType name="ArrayOfordered_history_list_schema">
    <complexContent>
    <restriction base="soapenc:Array">
    <attribute ref="soapenc:arrayType" wsdl:arrayType="dsmp:ordered_history_list_schema[]"/>
    </restriction>
    </complexContent>
    </complexType>


    <!-- request & response -->
    <element name="TransactionID" type="xsd:string"/>
    <element name="QueryUserOrderHistoryReq" type="dsmp:QueryUserOrderHistoryReqType"/>
    <complexType name="QueryUserOrderHistoryReqType">
    <sequence>
    <element name="Version" type="xsd:string"/>
    <element name="MsgType" type="xsd:string"/>
    <element name="Send_Address" type="dsmp:address_info_schema"/>
    <element name="Dest_Address" type="dsmp:address_info_schema"/>
    <element name="User_ID" type="dsmp:user_id_schema"/>
    <element name="StartTime" type="xsd:string"/>
    <element name="EndTime" type="xsd:string"/>
    </sequence>
    </complexType>
    <element name="QueryUserOrderHistoryResp" type="dsmp:QueryUserOrderHistoryRespType"/>
    <complexType name="QueryUserOrderHistoryRespType">
    <sequence>
    <element name="Version" type="xsd:string"/>
    <element name="MsgType" type="xsd:string"/>
    <element name="hRet" type="xsd:integer"/>
    <element name="ListNum" type="xsd:integer" minOccurs="0"/>
    <element name="Ordered_History_List" type="dsmp:ArrayOfordered_history_list_schema"/>
    </sequence>
    </complexType>
    </schema>
    </types>
    <message name="sg.QueryUserOrderHistoryReq">
    <part name="QueryUserOrderHistoryInput" element="dsmp:QueryUserOrderHistoryReq"/>
    <part name="TransactionIDInput" element="dsmp:TransactionID"/>
    </message>
    <message name="sg.QueryUserOrderHistoryResp">
    <part name="QueryUserOrderHistoryOutput" element="dsmp:QueryUserOrderHistoryResp"/>
    <part name="TransactionIDOut" element="dsmp:TransactionID"/>
    </message>
    <portType name="sgPortType">
    <operation name="QueryUserOrderHistory">
    <input message="ws:sg.QueryUserOrderHistoryReq"/>
    <output message="ws:sg.QueryUserOrderHistoryResp"/>
    </operation>
    </portType>
    <binding name="sgPortBinding" type="ws:sgPortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="QueryUserOrderHistory">
    <soap:operation soapAction="http://www.mywork.com/dsmp/action/sb.QueryUserOrderHistory"/>
    <input>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.mywork.com/dsmp/schemas/"/>
    <soap:header message="ws:sg.QueryUserOrderHistoryReq" part="TransactionIDInput" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://www.mywork.com/dsmp/schemas/"/>
    </input>
    <output>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://www.mywork.com/dsmp/schemas/"/>
    <soap:header message="ws:sg.QueryUserOrderHistoryResp" part="TransactionIDOut" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://www.mywork.com/dsmp/schemas/"/>
    </output>
    </operation>
    </binding>
    <service name="dsmp">
    <port name="sgPort" binding="ws:sgPortBinding">
    <soap:address location="http://localhost:9000/dsmp/dsmp.wsdl"/>
    </port>
    </service>
    </definitions>
      

  3.   

    看看这
    http://blog.csdn.net/kj_zx19854/archive/2008/12/19/3560908.aspx