SOAP响应我在WSDL中的SOAP地址位置如下"<soap:address location="http://localhost:8080/rpc/soap/helloworldsoap"/>"
获取从SOAP对象在web服务
在我的web服务方法,我有以下路径。
@HttpResource(location="/{name}")
我想获得SOAP响应对象。
我试过下面的url。
的http://本地主机:8080/RPC/SOAP/helloworldsoap/ABCD
WSDL
<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions name="HelloWorldImplService" targetNamespace="some name space" xmlns:ns1="http://test.com/webservices" xmlns:ns2="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="some name space" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:import location="http://localhost:8080/rpc/soap/helloworldsoap?wsdl=HelloWorld.wsdl" namespace="http://test.com/webservices">
</wsdl:import>
<wsdl:binding name="HelloWorldImplServiceSoapBinding" type="ns1:HelloWorld">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getHelloWorldAsString">
<soap:operation soapAction="" style="rpc" />
<wsdl:input name="getHelloWorldAsString">
<soap:body namespace="http://test.com/webservices" use="literal" />
</wsdl:input>
<wsdl:output name="getHelloWorldAsStringResponse">
<soap:body namespace="http://test.com/webservices" use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldImplService">
<wsdl:port binding="tns:HelloWorldImplServiceSoapBinding" name="HelloWorldImplPort">
<soap:address location="http://localhost:8080/rpc/soap/helloworldsoap" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
SOAP:
<soap:Envelope>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>No such operation: (HTTP GET PATH_INFO: /soap/helloworldsoap)
</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
但我没有得到响应对象。
任何人都可以告诉我如何实现这一点。
在此先感谢。
@戴夫..感谢您的答复。该服务正在运行。添加wsdl和其他文件。请看一看 – Patan