• 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
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

XML and Webservice

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am an xml and webservice newbie.

I have used JSWDP to create a web service client. I read an input file and i place web service requests for every row of data in the input file. I use a Swing Gui, so far its good.

I get a SOAP response. Am able to port it to a DOM Tree.

I need help in extracting the Document to more intuitive and readable form like this

Name: George
Account No: 200003
Transaction Amount: 40000
Transaction Type: Credit

Name: Kevin
Account No: 200604
Transaction Amount: 55000
Transaction Type: Deposit

...
...

I need the response to be logged to a single output file.
I have implemented the logging using Log4j. I am able to write the SOAP Response to this log file.

But i need some guidance as to how i could extract the information out of the document tree and write it in more intuitive way. Is it possible to use XSLT to extract information out of the DOM tree and write it to the log file. I don't know XSLT yet, is this what i should be using or is there some other concept that i need to learn.

Please advise.

Thanks
Kasi
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kasi,


You are absolutely right in thinking about XSLT. XSLT can transform an XML document to another XML document, in which the data is formatted differently – exactly what you want.

You can get some XSLT assistance at the XML and Related Technologies Ranch forum.

Regards,
Dan
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic