简体   繁体   中英

AXIS2 AxisFault: this is a soap-encoded endpoint

I am trying to consume a SOAP WS using AXIS2. I am getting the following exception. The same request works fine with 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)

There seems to be no information that I could find on google about this exception. My assumption is that Axis2 can not support GZIP encoding with default code. I need some help finding the way around this error. Is it really related to encoding? How do I specify to AXIS2 that this is a gzip encoded string ?

EDIT1: Changed the code based on 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);

Now getting the following exception:

org.apache.axiom.om.DeferredParsingException: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, code 8))

Turns out Axis2 and JAX-WS both do not support RPC/encoded endpoints. I had to revert to Axis1.4 to get it working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM