Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing SOAP Envelope

 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I implemented a small program to parse a SOAP message but I got the following error:

Error in parsing: name expected (position:START_TAG <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://www.w3.org/2001/12/soap- envelope' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>@1:175 in java.io.StringReader@c17164)
BUILD SUCCESSFUL (total time: 2 seconds)

Could you please guide me to solve my problem?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Would it be possible to see the entire SOAP message?
Also note that in Eclipse, the XML editor has a Validate option, which enables you to validate an XML document. If you insert the SOAP message that causes the error in your program there, you can check whether it is correct or not and, if it is not, hopefully get a hint about what the problems is.
Best regards!
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The code is as follows. Thanks in advance:
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
It seems like there was an error in the SOAP message. I wrote a program reading your SOAP message using StAX:

Best wishes!
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ivan
Thankyou very much it was the > symbol .It is working now
 
feda alshahwan
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you tell me hoew to display the parsed elements to the System.out screen like I want to display the body or header only or anyother tag using KSOAP ?
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic