• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saaj

 
Thirumalesh yeligar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Thirumalesh yeligar
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic