如何使用扩展的通用超级接口生成wsdl接口

时间:2018-06-04 15:02:14

标签: java web-services soap interface wsdl

您好我有两个由A.wsdl和B.wsdl生成的接口A和B. 接口有一个相同的方法(GetStatus)和两个不同的方法SetA和SetB。我想用通用方法GetStatus创建第三个接口,并在接口A和B中扩展它。如何在A.wsdl和B.wsdl中编写扩展。

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="A" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types></wsdl:types>
    <wsdl:message name="SetUrlMessage">
        <wsdl:part element="di:address" name="param" />
    </wsdl:message>
    <wsdl:message name="StatusRequest">
        <wsdl:part element="di:statusVoid" name="param" />
    </wsdl:message>
    <wsdl:message name="ServiceStatusResponse">
        <wsdl:part element="di:status" name="param" />
    </wsdl:message>
    <wsdl:portType name="APortType">
        <wsdl:operation name="SetA">
            <wsdl:input message="tns:SetUrlMessage" />
        </wsdl:operation>
        <wsdl:operation name="GetStatus">
            <wsdl:input message="tns:StatusRequest" />
            <wsdl:output message="tns:ServiceStatusResponse" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="ABinding" type="tns:APortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
        <wsdl:operation name="SetA"></wsdl:operation>
        <wsdl:operation name="GetStatus"></wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="A">
        <wsdl:port name="APort" binding="tns:ABinding">
            <soap:address location="http://localhost:8080/A/services/A" />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

0 个答案:

没有答案