Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing xml fields into variables

 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an xml SOAPenvelope request file :
this soap message I am storing by the following method :

thus, I got the above soap file into l_Envelope.

Now the only thing is I want to store these fields (xml values ) into related variables. Is there any jax API that can solve my issue ?

 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please experts ..

I need your help ..... please respond ...

thanks
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't AXIS already provide for that? Surely you can find some useful code in the extensive examples provided in the download.

Bill
 
jazy smith
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill,

I did go through that too. It didn't help. do you have any API in your mind that might work ?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not touched either version of AXIS in a while but it looks like you should be able to:

1. get the SoapBody from the SoapEnvelope
See the SOAPEnvelope API
2. treat the SOAPBody as a org.w3c.dom.Element
See the SOAPBody API

Then use org.w3c.Node methods to locate the Elements by name, get the child Text node and get the value String.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic