aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 12671
    
    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

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: First Element must contain the local name, Envelope , but found html
 
Similar Threads
Axis2 client - SOAPProcessingException
[ERROR] More than one part for message AddRequest
SOAP 1.1 or 1.2
Use the simpliest web server ever
Unexpected character '"' (code 34) in DOCTYPE declaration