使用复杂数据类型调用Axis Web服务

时间:2011-12-07 13:33:49

标签: java

我有以下wsdl:

<wsdl:definitions targetNamespace="http://localhost:8080/webservice/Retriever.jws">
    <wsdl:types>
        <schema targetNamespace="http://localhost:8080/webservice/Retriever.jws">
            <import namespace="http://DefaultNamespace"/>
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <complexType name="ArrayOf_xsd_string">
                <complexContent>
                    <restriction base="soapenc:Array">
                        <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
                    </restriction>
                </complexContent>
            </complexType>
            <complexType name="ArrayOf_xsd_int">
                <complexContent>
                    <restriction base="soapenc:Array">
                        <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
                    </restriction>
                </complexContent>
            </complexType>
        </schema>
        <schema targetNamespace="http://DefaultNamespace">
            <import namespace="http://localhost:8080/webservice/Retriever.jws"/>
            <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
            <complexType name="Result">
                <sequence>
                    <element name="time" type="xsd:int"/>
                    <element name="title" nillable="true" type="impl:ArrayOf_xsd_string"/>
                    <element name="url" nillable="true" type="impl:ArrayOf_xsd_string"/>
                    <element name="snippet" nillable="true" type="impl:ArrayOf_xsd_string"/>
                    <element name="position" nillable="true" type="impl:ArrayOf_xsd_int"/>
                </sequence>
            </complexType>
        </schema>
    </wsdl:types>
    <wsdl:message name="retrieveResponse">
        <wsdl:part name="retrieveReturn" type="tns1:Result"/>
    </wsdl:message>
    <wsdl:message name="retrieveRequest">
        <wsdl:part name="query" type="xsd:string"/>
        <wsdl:part name="n" type="xsd:int"/>
        <wsdl:part name="start" type="xsd:int"/>
    </wsdl:message>
    <wsdl:portType name="Retriever">
        <wsdl:operation name="retrieve" parameterOrder="query n start">
            <wsdl:input message="impl:retrieveRequest" name="retrieveRequest"/>
            <wsdl:output message="impl:retrieveResponse" name="retrieveResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="RetrieverSoapBinding" type="impl:Retriever">
        <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="retrieve">
            <wsdlsoap:operation soapAction=""/>
            <wsdl:input name="retrieveRequest">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://DefaultNamespace" use="encoded"/>
            </wsdl:input>
            <wsdl:output name="retrieveResponse">
                <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://localhost:8080/webservice/Retriever.jws" use="encoded"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="RetrieverService">
        <wsdl:port binding="impl:RetrieverSoapBinding" name="Retriever">
            <wsdlsoap:address location="http://localhost:8080/webservice/Retriever.jws"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

我怎么称呼它??

0 个答案:

没有答案