Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

internal method call.getEnvelopeString() fails. unable to identify cause of failure  RSS feed

satish bhatia
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing a jsp webservice client which calls a microsoft web service.
I am using IBM WSAD for development & debug purpose and consequently using
the provided packages (which i believe are based on apache) for development.
I keep getting a SOAPException stating that the response type is "text/html"
but the expected response type should be "text/xml". This exception is
thrown on calling the call.invoke() method. the failure occurs at an
internal method call.getEnvelopeString()
I used the internal debugger to get a stacktrace upto the exact point of
failure and this is what i found
Thread [Servlet.Engine.Transports : 0] (Suspended (exception
nsport) line: not available [local variables unavailable]
org.apache.soap.rpc.Call.invoke(, java.lang.String) line: not
available proxy.soap.HecaOnlineProxy.CalculateResults(org.w3c.dom.Element,
org.w3c.dom.Element) line: 77 /TestWebService/sample/HecaOnline/Result.jsp
javax.servlet.http.HttpServletResponse) line: 84
( the small code dealing with the soap part )
String targetObjectURI = "";
String SOAPActionURI =
Vector params = new Vector();
Parameter listinputParam = new Parameter("listinput",
org.w3c.dom.Element.class, listinput, Constants.NS_URI_LITERAL_XML);
Parameter listoutputParam = new Parameter("listoutput",
org.w3c.dom.Element.class, listoutput, Constants.NS_URI_LITERAL_XML);
QName qname = new QName("", "listoutput");
StringDeserializer sd = new StringDeserializer();
SOAPMappingRegistry smr = call.getSOAPMappingRegistry();
smr.mapTypes(org.apache.soap.Constants.NS_URI_LITERAL_XML, qname, null,
null, sd);
Response resp = null;
try {
resp = call.invoke(getURL(), SOAPActionURI);
} catch (MalformedURLException e) {
System.out.println("MalformedURLexception = "+e);
} catch (SOAPException e) {
System.out.println("SOAPException = "+e);
} catch (Exception e) {
System.out.println("Exception = "+e);

I have no clue as to why should the soap envelope be causing this error
specially since there is no direct manipulation of the envelope in the code.
I have run out of ideas as to what could be going wrong and what should i
look at.
Any help would be appreciated.
Kyle Brown
Ranch Hand
Posts: 3892
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds to me like the problem is on the microsoft side -- it may be returning an HTML error page rather than the response you expect.
Why don't you turn on the TCP/IP monitor and look at both the request and response and see what you have flowing over the wire? (Look in the infocenter in WSAD to find out how to turn it on -- you'll have to edit your generated proxy client to use port 8081 too -- for more information on doing this see the "Web Services Wizardry" redbook at
[ November 07, 2002: Message edited by: Kyle Brown ]
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!