将soap 1.1更改为1.2(服务器) - Java EE

时间:2015-03-04 10:20:22

标签: java web-services java-ee soap

我必须将soap11 Java EE Web服务更新为soap12 webservice。我该怎么做?我一直在谷歌搜索,发现它只是改变命名空间:

从:

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

为:

xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"

就是这样。但是当我这样做时,soapUI说它是SOAP 1.1(甚至在刷新了portBinding之后)。所以那不可能......我该怎么办?

Webservice声明:

@WebService(name = "testService", targetNamespace = "http://test.be/",
    wsdlLocation = "/META-INF/wsdl/testWSDL.wsdl",
    serviceName = "testService",
    portName = "testServicePort",
    endpointInterface = "test.testService")
@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml")
public class TestImpl implements Test {

部分wsdl:

<message name="test">
    <part name="parameters" element="tns:test" />
</message>
<message name="testResponse">
    <part name="parameters" element="tns:testResponse" />
</message>
<message name="testError">
    <part name="fault" element="tns:testError" />
</message>
<portType name="testService">
    <operation name="test">
        <input
            wsam:Action="http://test.be/testService/testRequest"
            message="tns:test" />
        <output
            wsam:Action="http://test.be/testService/testResponse"
            message="tns:testResponse" />
        <fault message="tns:testError" name="testError" />
    </operation>
</portType>

<binding name="testServicePortBinding" type="tns:testService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
        style="document" />
    <operation name="addDocument">
        <soap:operation soapAction="" />
        <input>
            <soap:body use="literal" />
            <wsp:PolicyReference URI="#Wssp1.2-2007-Wss1.0-X509-Basic256.xml" />
        </input>
        <output>
            <soap:body use="literal" />
        </output>
        <fault name="testError">
            <soap:fault name="testError" use="literal" />
        </fault>
    </operation>
</binding>
<service name="testService">
    <port name="testServicePort" binding="tns:testServicePortBinding">
        <soap:address location="REPLACE_WITH_ACTUAL_URL" />
    </port>
</service>

0 个答案:

没有答案