• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Error processing response from .NET web service

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I solved the problem. See the related post in the javaranch SAX forum at
Resolving Java/.NET response problem
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic