web服务改变了soap1。1到1.2(服务器)Java EE
我必须将我的soap11 Java EE Web服务更新为soap12 Web服务。我该怎么做?我一直在谷歌上搜索,发现它只是在更改名称空间:
发件人:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
致:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
就这样。但当我这样做时,soapUI会说它是SOAP1.1(即使在刷新portBinding之后)。所以这不可能。。我还应该做什么
Web服务声明:
@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) 个答案