Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 75416 invoked from network); 15 Jun 2004 23:18:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Jun 2004 23:18:58 -0000 Received: (qmail 11251 invoked by uid 500); 15 Jun 2004 23:19:09 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 11194 invoked by uid 500); 15 Jun 2004 23:19:09 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 11180 invoked by uid 99); 15 Jun 2004 23:19:08 -0000 Received: from [208.139.169.228] (HELO asmcimc.suzukihq.asmc.us) (208.139.169.228) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 15 Jun 2004 16:19:08 -0700 Received: by asmcimc.suzukihq.asmc.us with Internet Mail Service (5.5.2653.19) id ; Tue, 15 Jun 2004 16:19:07 -0700 Message-ID: <8765557836794E4EADF7F31290F4C39F05C97C94@asmcmail.suzukihq.asmc.us> From: Vikas Phonsa To: "'axis-user@ws.apache.org'" Subject: fault/exception handling and stuff Date: Tue, 15 Jun 2004 16:19:07 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4532F.280FF800" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C4532F.280FF800 Content-Type: text/plain 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 ------_=_NextPart_001_01C4532F.280FF800 Content-Type: text/html

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

 

------_=_NextPart_001_01C4532F.280FF800--