Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Service XML

 
Daniel Afonso
Greenhorn
Posts: 16
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! I did an export of data from a table in a PostgreSQL database to an XML file. What i want to do is a Java web service that allows me to insert the data from the XML back into the database. I do not know how the process works. Would appreciate help.

best regards
 
Shashank Ag
Ranch Hand
Posts: 88
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For starters you can use bottom up approach, so just write a method which accepts string argument (containing xml) and do thedb updates as you require.
Now, to generate webservice out of it, there are sevreral java2wsdl generators. Axis is one of it (easier) although JAX-WS will be better choice in terms of adheraing to latest standards.
 
Daniel Afonso
Greenhorn
Posts: 16
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i' m new to this. How a make a string to accept xml?
 
Paul Clapham
Sheriff
Posts: 21133
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML is a text format. So to create a String variable to which you can assign XML:
 
Daniel Afonso
Greenhorn
Posts: 16
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. but can somebody tell me where i can find a tutorial to see how to do this? what i want is to make a web service that receives a xml file and insert the data back to db.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Take a look at section 9.4 in this document: http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic