Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

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

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Posts: 3892
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
Dinner will be steamed monkey heads with a side of tiny ads.
the value of filler advertising in 2020
    Bookmark Topic Watch Topic
  • New Topic