我正在尝试使用AXIS2使用SOAP WS。我收到以下异常。相同的请求适用于Soap UI
org.apache.axis2.AxisFault: this is a soap-encoded endpoint
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:508)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:368)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at apt.com.webmethods.www.wsdl.customerletters.CustomerLettersStub.getServiceDetailsForCustomerLetters(CustomerLettersStub.java:470)
似乎没有关于此例外我可以在谷歌上找到的信息。我的假设是Axis2不支持使用默认代码的GZIP编码。我需要一些帮助找到绕过这个错误的方法。它真的与编码有关吗?如何向AXIS2指定这是一个gzip编码的字符串?
EDIT1:根据example found here更改了代码。
ServiceClient clt=stb._getServiceClient();
clt.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_GZIP_REQUEST, true);
clt.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.MC_ACCEPT_GZIP, true);
OMElement response = clt.sendReceive(ele);
现在获得以下异常:
org.apache.axiom.om.DeferredParsingException: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 8))
答案 0 :(得分:0)
原来,Axis2和JAX-WS都不支持RPC /编码端点。我不得不恢复到Axis1.4才能让它正常工作。