File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Parsing SOAP Envelope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Parsing SOAP Envelope" Watch "Parsing SOAP Envelope" New topic
Author

Parsing SOAP Envelope

feda alshahwan
Ranch Hand

Joined: Jul 26, 2008
Posts: 170
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

Joined: Oct 04, 2006
Posts: 2198
    
    1
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

Joined: Jul 26, 2008
Posts: 170

The code is as follows. Thanks in advance:
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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

Joined: Jul 26, 2008
Posts: 170
Dear Ivan
Thankyou very much it was the > symbol .It is working now
feda alshahwan
Ranch Hand

Joined: Jul 26, 2008
Posts: 170
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Parsing SOAP Envelope
 
Similar Threads
UTF-8 SAX exception- HELP!
Help with SAAJ and SOAP 1.2
Validating a SOAP document using XSD
Axis with JAXP 1.3
Error : Axis Engine Cudn't find the target