• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Parsing SOAP Envelope

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic