This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Error processing response from .NET web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Error processing response from .NET web service" Watch "Error processing response from .NET web service" New topic
Author

Error processing response from .NET web service

Dave Ehrlich
Greenhorn

Joined: Nov 12, 2002
Posts: 20
I am calling a .NET web service from a Java client. I have been able to successfully send string data from the Java client to the .NET web service. When I try to process the response, I get the following error:
"Content is not allowed in prolog".
I can see the response data correctly using the TcpTunnelGui tool, but the code crashes trying to read it.
The error is thrown from the following line of code:
xmlReader.parse( new InputSource(
new StringReader( soapMsg.getContent().toString() ) ) );
This seems to imply that there's something about the SOAP format being sent back that is a problem. My SOAP response is as follows:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<DownloadTablesResponse xmlns="http://SLR.org/">
<DownloadTablesResult>Success</DownloadTablesResult>
</DownloadTablesResponse>
</soap:Body>
</soap:Envelope>
Any help would be appreciated.
Thanks,
Dave
Dave Ehrlich
Greenhorn

Joined: Nov 12, 2002
Posts: 20
I solved the problem. See the related post in the javaranch SAX forum at
Resolving Java/.NET response problem
 
jQuery in Action, 2nd edition
 
subject: Error processing response from .NET web service
 
Similar Threads
unable to connect to .Net web service using axis with java
SOAP Header Authentication!!!
How to convert string to xml file in java
SaxParseException
java.net.MalformedURLException: no protocol: <soap:Envelope ?