wood burning stoves 2.0*
The moose likes Web Services and the fly likes AxisFault SAXException Bad envelope tag: html when calling generated web client methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "AxisFault SAXException Bad envelope tag: html when calling generated web client methods" Watch "AxisFault SAXException Bad envelope tag: html when calling generated web client methods" New topic
Author

AxisFault SAXException Bad envelope tag: html when calling generated web client methods

Anurag Jai
Greenhorn

Joined: Jun 21, 2009
Posts: 22
I have generated client code for a 3rd party web service using the WSDL which they provided (I am unable to publish it here), using eclipse and Axis 1.4. This all seems to work ok (I have got services working in this
way before) but now when I try to call one of the web service methods - getAvailableIds() - I get and Axis Fault error:

AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultString: org.xml.sax.SAXException: Bad envelope tag: html
Followed by a long stack trace (my dev machine cannot be internet connected which is why I am not posting more of the stack trace)

Additionally, I do not have any implementation of the web service which I am calling. Instead I am using soapUI to simulate the web service (again generated from the WSDL).

I have debugged this as far as I can and I am stuck on the line (generated client code):

try{ java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in});
...
}
If anyone has seen this before I would appreciate any help!

I have looked around quite a lot online and found some other posts with similar problems but none of these have helped:

SAXException: bad envelope tag - I am not using https or WebSphere App Server.

I have also looked at all of the first 15 google search results with the following search string:

AxisFault SAXException bad envelope tag html
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14272
    
  21

This sounds like the webservice is returning a HTML page instead of a SOAP message.

Try entering the URL that you're using for the call to the webservice in a browser. Maybe you get a HTML page that shows an error message.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AxisFault SAXException Bad envelope tag: html when calling generated web client methods