This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes First Element must contain the local name, Envelope , but found html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "First Element must contain the local name, Envelope , but found html" Watch "First Element must contain the local name, Envelope , but found html" New topic
Author

First Element must contain the local name, Envelope , but found html

Srikanth Kumar
Ranch Hand

Joined: Jun 04, 2008
Posts: 36
I have developed a web service using axis2. The services are working fine in HTTP protocol.

When i use HTTPS protocol its giving me a problem.

I have checked the certificate name and the CN name are same.
and the target EPR is also valid.

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)
at com.gpc.remoteclassification.services.RemoteClassificationServiceStub.getLanguageList(RemoteClassificationServiceStub.java:5099)
at com.gpc.remoteclassification.client.WebServiceClient.getLanguageList(WebServiceClient.java:656)
at com.gpc.remoteclassification.client.WebServiceClient.main(WebServiceClient.java:131)
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)
... 7 more

angones help is appreciated.

Thanks in advance.


Srikanth Kumar
SCJP 5, SCWCD 5, SCDJWS 5
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12791
    
    5
org.apache.axis2.AxisFault: First Element must contain the local name, Envelope , but found html


I assume this is what you see on the client side. The likely reason is that you are getting an HTML formated error message from the service. Here is where I would use TCPMON or SOAPui to capture the complete request and response text.

Bill
 
GeeCON Prague 2014
 
subject: First Element must contain the local name, Envelope , but found html