aspose file tools*
The moose likes XML and Related Technologies and the fly likes storing xml fields into variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "storing xml fields into variables" Watch "storing xml fields into variables" New topic
Author

storing xml fields into variables

jazy smith
Ranch Hand

Joined: Nov 18, 2009
Posts: 101
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

Joined: Nov 18, 2009
Posts: 101
Please experts ..

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

thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
Doesn't AXIS already provide for that? Surely you can find some useful code in the extensive examples provided in the download.

Bill

Java Resources at www.wbrogden.com
jazy smith
Ranch Hand

Joined: Nov 18, 2009
Posts: 101
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

Joined: Mar 22, 2000
Posts: 12682
    
    5
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: storing xml fields into variables
 
Similar Threads
Webservices and Websphere 5.1
Client for Axis2 POJO webservice giving error
MTOM not working in Axis2
WSDL - One way operations
Axis2 - Transfer document using MTOM