Hi Everybody,

 

I'm trying to develop my first server side implementation of web services. I have developed web service clients in the past using Axis. I have gone thru examples in books and on the internet but most of them deal with getting data. Like I saw getPrice or getStockQuote etc. But I have to write a web service which would enter data into my data base after getting the data in a SOAP message. My high level plan is to write a java class to be exposed as a web service which would have a

 

setBean(databean bean) method and databean would map to my database table and inside my setBean method I would call my DAO and supply it the databean.

 

Now what is the best way to handle the exceptions or errors that occur when the DAO does its job, like all the SQL exceptions and stuff. How do u communicate back to the client that the database server is down, or the data it sent is bad or if the data has been successfully inserted.

 

Should I put a return type for the setBean method?

 

How do u use soap fault elements in this case.

 

And I would appreciate if some can point me to good examples that explain the effective use of soap faults and how to code soap faults in the wsdl. I used java2wsdl and as expected the setBeanResponse message has no parts under it.

 

So what's the effective way of getting the right response back?

 

Thanks in advance.

 

Vikas

 

Reply via email to