• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading data from SOAP Envelope

 
Greenhorn
Posts: 16
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a soap envelope to a web Service whose implementation is unknown to me, i don't have webservice implementation or code, I am trying to read the Web Service data from different location or computer, I want to read data from this soap envelope in a java client application?

Does any one know how can it be done? i have been looking over the internet but didn't find anything relevant to my question.

Thanks

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since SOAP messages are guaranteed to be valid XML, you can use any XML parsing technique.

Normal SOAP clients build a DOM (Document Object Model) and extract data with the usual org.w3c.dom package methods. You might find it easier to use XPath methods which are slower but easier to express.

Bill
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can also use SAAJ which is an extension of DOM. Overview of SAAJ says -

SAAJ and DOM
In SAAJ 1.2, the SAAJ APIs extend their counterparts in the org.w3c.dom package:

The Node interface extends the org.w3c.dom.Node interface.
The SOAPElement interface extends both the Node interface and the org.w3c.dom.Element interface.
The SOAPPart class implements the org.w3c.dom.Document interface.
The Text interface extends the org.w3c.dom.Text interface.



Regards,
Dan
 
Sunny Diaz
Greenhorn
Posts: 16
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dan,

thanks for your reply, I have exactly tried SAAJ api and my request soap was going but response was not coming.. there is some exceptions coming out.

I have one more question.
If i create a TestClient using a wsdl url location which is placed remotely over other server, and run this test Client over the Server, I get some methods visible in the testclient.jsp running on the server,

but i am not sure if it is giving everything what i need.. i think it is not giving me the data. Do i have to implement the client or what?

I have generated code from a wsdl using Top down approach and created the test client also using the same wsdl in Eclipse 3.6

Do you have any idea? please sure your experience if you have done this kind of work before.

Thanks again!
 
Sunny Diaz
Greenhorn
Posts: 16
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for creation of TestClient i followed the tutorial from the following link

http://www.eclipse.org/webtools/jst/components/ws/1.5/tutorials/WebServiceClient/WebServiceClient.html

Waiting for reply
Thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic