Org.apache.axis2.AxisFault: First Element should contain a local name, Envelope, but found html

What could be the reason for the following exception from Axis ... Http verion 1.0 is used.

Read that this can be resolved if the following property is set.

stub._getServiceClient().getOptions(). setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); 

But the specified property is applicable only for HTTP version 1.1 in accordance with the documents on the axis. This property will be ignored by the transport infrastructure if the HTTP version is 1.0.

Any thoughts?

 org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found html at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) Caused by: org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found html at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.constructNode(StAXSOAPModelBuilder.java:251) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createOMElement(StAXSOAPModelBuilder.java:209) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.createNextOMElement(StAXSOAPModelBuilder.java:191) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:172) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:156) at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:105) at org.apache.axis2.builder.BuilderUtil.getSOAPBuilder(BuilderUtil.java:677) at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:182) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:112) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:88) 
+4
source share
3 answers

This is actually a server that encounters an internal error of 500 and returns an HTML request to the client.

+6
source

Try using a sniffer like tcpmon to see the actual response from the service. I assume that the client uses a destination URL that does not exist on the server, and the server responds with 404-containing HTML instead of a SOAP envelope.

+6
source

The Tomcat server serviced an HTTP web page to indicate a denial of a response to a SOAP API call.

0
source

Source: https://habr.com/ru/post/1299774/


All Articles