The AxisFault actually extends RemoteException so it is fine to say that
        .invoke() method throw RemoteException.

 (1)Thus all I have to do is add this piece of code map it to "client"
faultCode as per SOAP 1.1 spec and I am done.
 (2)This would imply that since I am setting the faultCode manually if an
exception occured because of "server" or
"VersionMismatch" and "MustUnderstand" how can we distinguish.

Everything to me seems to be so complicated.Kindly point me to a good
example so I can understand the whole strategy of applying exceptions and
can design my webservice in a straight manner.

Thanx in advance.

dumdum420



-----Original Message-----
From: Bhanu Pabreja [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 12:30 PM
To: [EMAIL PROTECTED]
Subject: RE: Exception handling strategy question


the invoke() throws AxisFault ; this is what the api also shows. I am using
AXIS 1.1 and I also do not have a clue which SOAP level I am using.

Kindly clarify this. I have only one method exposed which is:
Document fetchData(Document dom){}

and I have clients which are going to be VB.Net based so tell me how should
I work on my error.

Also can you explain me more about the mandatory elements and values.

Send me the Handler and I will see if can put it in my evironment.

BP

-----Original Message-----
From: remko de knikker [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 9:38 AM
To: [EMAIL PROTECTED]
Subject: Re: Exception handling strategy question


Here's what I did:

Since the ..invoke() call throws a RemoteException
I used

... throws RemoteException {
try {
...
}
catch (RemoteException e1) {
            sb1 =
MessageContext.getCurrentContext().getResponseMessage().getSOAPPart().getEnv
elope().getBody();
            SOAPFault fault = sb1.addFault();
            fault.setFaultString("RemoteException: " + e1.getMessage());
            fault.setFaultCode("Client");
            throw e1;
}


Since I am using SOAP 1.1 which implements the SOAPFault codes
differently than SOAP 1.2
check to make sure which SOAP version you are using, because of
mandatory elements and values.
for SOAP 1.1:
http://www.w3.org/TR/SOAP/

I created a Handler, I can send the code if you want me to, but am not
doing anything with it, with regard to Exceptions, but you could of course.


Bhanu Pabreja wrote:

>Well I saw this thread in the mail archive ... so got to ask a question.
>
>Like remo i have a similar kind of service (message style) with only once
>service operation exposed
>
>Document fetchData(Document doc) throw AxisFault{}
>
>Now Remo you must have implemented your exception handling already which
>seems to be interoperatable as per your comments.
>
>Can you please post me some sample code how you implemented the same.
>
>Thanx a ton.
>
>dumdum420.
>
>
>
>
>
>
>








Reply via email to