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
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: 29
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: 41863
    
  63
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: 29
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: 41863
    
  63
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: 29
Thanks for your reply.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: saaj