• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

consuming xml and producing json

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello friends
I'm developing a web app ,in the present sprint i have to consume a rest service (XML format) produced by QuickBuild server ,do some work and send the result to an angularjs client(Json format).
i need some help(no code , no implementation...) just steps the what to do things.

I'll be grateful
cheers
 
Author and all-around good cowpoke
Posts: 13078
6
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Step 1 - learn how to use the Java standard library to handle XML documents:
a. parsing to a DOM - document object model
b. extracting desired element data from the DOM

Bill
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Arun Kumarr I'm sorry i send a changing name request next time you will see my real name
@ William Brogden thanks for your help but i didn't goes well i couldn't get the xml content produced from the Rest service.
if it was an xml file that would be easy but from a URL i think that it needs a sort of XMLHTTPrequest or something like that , i have to consume the service i hope it's clear .
you will find a snapshot in the attachement
QuickBuild-rest-API.jpg
[Thumbnail for QuickBuild-rest-API.jpg]
xml Rest service
 
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes. You can consume the xml using the xmlhttp object and do a dom search and get the desired element as William mentioned.
One other thing, I would like you to place a request at the server side team to qualify the element, "com.pmease.quickbuild.model.Configuration" with a more meaningful element name like, "Configuration".
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Arun Kumarr i'll try the technique a post a feedback later
 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cheers for changing the name.
Yes. Do post your feedback. Get back, if you are stuck somewhere.
 
Magiri Mahdi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Arun Kumarr or @William Brogden or @any one else can help ,i need to
1) pass threw a proxy then
2)the server authentication(login and password) then==>how to pass the login and password to the server signin page???
3) get some xml tags and parse them to JSON
i hope it's clear by the way this is the server documentation link if you want to take a look QuickBuild Get all configurations in the system
Thanks
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic