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 and the fly likes Web Service XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Service XML" Watch "Web Service XML" New topic
Author

Web Service XML

Daniel Afonso
Greenhorn

Joined: Jan 27, 2011
Posts: 16

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

Joined: Dec 22, 2009
Posts: 88

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.

SCJP 91%, SCWCD 97%
Daniel Afonso
Greenhorn

Joined: Jan 27, 2011
Posts: 16

i' m new to this. How a make a string to accept xml?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18655
    
    8

XML is a text format. So to create a String variable to which you can assign XML:
Daniel Afonso
Greenhorn

Joined: Jan 27, 2011
Posts: 16

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

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
Take a look at section 9.4 in this document: http://www.slideshare.net/krizsan/scdjws-5-study-notes-3085287
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web Service XML