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 Certification (SCDJWS/OCEJWSD) and the fly likes saaj Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "saaj" Watch "saaj" New topic
Author

saaj

Thirumalesh yeligar
Greenhorn

Joined: Sep 02, 2013
Posts: 23
please explain me each code:

QName bodyName = new QName("http://wombat.ztrade.com", "GetLastTradePrice", "m");

SOAPBodyElement bodyElement = body.addBodyElement(bodyName);

QName name = new QName("symbol");

SOAPElement symbol = bodyElement.addChildElement(name);

symbol.addTextNode("SUNW");
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
Can you be a bit more specific about what is unclear to you? The first stop if you're unclear what a particular class or method does should always be its javadocs. But in this case those probably won't make sense before you have worked through the tutorial Frits pointed you to; have you done that yet?


Ping & DNS - my free Android networking tools app
Thirumalesh yeligar
Greenhorn

Joined: Sep 02, 2013
Posts: 23
i'm not understanding QName.. what it is doing..? and

SOAPElement symbol = bodyElement.addChildElement(name);

what is the use of Soap element and also what is the use of AddtextNode? .. i know these lines of SAAJ for inserting content to the SOAP body... still i'm in confusion with these functions............
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
A forum discussion can't substitute a tutorial; I again suggest you start by working through the tutorial; it will make things clearer. If you're not clear on how SOAP works at all, then its Wikipedia page will help you get going: https://en.wikipedia.org/wiki/SOAP. The http://www.coderanch.com/how-to/java/WebServicesFaq also points to much introductory material.
Thirumalesh yeligar
Greenhorn

Joined: Sep 02, 2013
Posts: 23
Thanks for your reply.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saaj
 
Similar Threads
How to read Object data and List of Objects data through SOAP?
SOAP Fault for SOAP Action property
creating soap requests in java
webservice package javax.xml.soap does not exist
ayyappa1