You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michael Bell <mi...@cms.hu-berlin.de> on 2007/07/27 17:37:23 UTC

AxisFault produces empty http 202

Hi,

I have a web service where the operations have only input messages and 
SOAP faults. wsdl2java generates exceptions for this. The problem is 
that Axis2 1.3 RC2 sends an empty http 202 response and catalina.out 
contains the following message:

Jul 27, 2007 5:30:45 PM 
org.apache.axis2.receivers.AbstractMessageReceiver receive
SEVERE: org.apache.axis2.AxisFault: FaultMsg

FaultMsg is the generated exception class from wsdl2java. Any ideas why 
AxisFault is logged and not send as a SOAP fault? Did I forget something?

If you need more infos like WSDL or generated code then I can send this too.

Best regards

Michael
-- 
_______________________________________________________________

Michael Bell                    Humboldt-Universitaet zu Berlin

Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 2704       Unter den Linden 6
michael.bell@cms.hu-berlin.de   D-10099 Berlin
_______________________________________________________________

X.509 CA Certificates / Wurzelzertifikate

http://ra.pki.hu-berlin.de

Re: AxisFault produces empty http 202

Posted by Michael Bell <mi...@cms.hu-berlin.de>.
Hi Amila,

thanks for the pointer. So I simply send back empty answers which the 
clients must ignore.

Sorry for the trouble

Michael

Amila Suriarachchi schrieb:
> see the wsdl spec http://www.w3.org/TR/wsdl#_one-way
> 
> for one way operations there can not be fault messages. if you use fault it
> must be in out.
> 
> Amila.
> 
> On 7/30/07, Michael Bell <mi...@cms.hu-berlin.de> wrote:
>> Hi Deepal.
>>
>> Deepal jayasinghe schrieb:
>>
>>> I create a POJO and deploy and I got the expected result , so will you
>>> be able to provide me more data to re-generate the issues. FYI I have
>>> attached my POJO.
>> I attached two WSDL files (stupid SQL wrapper plus common types and
>> messages). The file with suffix orig is the web service which I want to
>> implement. The file with the short filename is the specification which
>> works. It looks like that AxisFault will only be correctly handled by
>> the InOut message receiver. The RobustInOnly message receiver has a
>> problem. Perhaps this has something to do with the initialization of the
>> web server or the inheritaed classes.
>>
>> BTW some details about my server implementation. I always generate the
>> skeleton and the interface. My implementation class extends the
>> skeleton. If I throw the custom exception (specified in the WSDL)in my
>> implementation then his exception will be catched by the generated
>> message receiver. This receiver packs the exception into an AxisFault
>> and throw it again. The problem is that it looks like the handling of
>> the RobustInOnly and InOut message receivers is different.
>>
>> If you have a normal InOut receiver then you get an http 202 code plus
>> the SOAP error. If you have RobustInOnly then you get only http 202.
>>
>> Best regards
>>
>> Michael
>> --
>> _______________________________________________________________
>>
>> Michael Bell                    Humboldt-Universitaet zu Berlin
>>
>> Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
>> Fax:  +49 (0)30-2093 2704       Unter den Linden 6
>> michael.bell@cms.hu-berlin.de   D-10099 Berlin
>> _______________________________________________________________
>>
>> X.509 CA Certificates / Wurzelzertifikate
>>
>> http://ra.pki.hu-berlin.de
>>
>>
> 
> 


-- 
_______________________________________________________________

Michael Bell                    Humboldt-Universitaet zu Berlin

Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 2704       Unter den Linden 6
michael.bell@cms.hu-berlin.de   D-10099 Berlin
_______________________________________________________________

X.509 CA Certificates / Wurzelzertifikate

http://ra.pki.hu-berlin.de

Re: AxisFault produces empty http 202

Posted by Amila Suriarachchi <am...@gmail.com>.
see the wsdl spec http://www.w3.org/TR/wsdl#_one-way

for one way operations there can not be fault messages. if you use fault it
must be in out.

Amila.

On 7/30/07, Michael Bell <mi...@cms.hu-berlin.de> wrote:
>
> Hi Deepal.
>
> Deepal jayasinghe schrieb:
>
> > I create a POJO and deploy and I got the expected result , so will you
> > be able to provide me more data to re-generate the issues. FYI I have
> > attached my POJO.
>
> I attached two WSDL files (stupid SQL wrapper plus common types and
> messages). The file with suffix orig is the web service which I want to
> implement. The file with the short filename is the specification which
> works. It looks like that AxisFault will only be correctly handled by
> the InOut message receiver. The RobustInOnly message receiver has a
> problem. Perhaps this has something to do with the initialization of the
> web server or the inheritaed classes.
>
> BTW some details about my server implementation. I always generate the
> skeleton and the interface. My implementation class extends the
> skeleton. If I throw the custom exception (specified in the WSDL)in my
> implementation then his exception will be catched by the generated
> message receiver. This receiver packs the exception into an AxisFault
> and throw it again. The problem is that it looks like the handling of
> the RobustInOnly and InOut message receivers is different.
>
> If you have a normal InOut receiver then you get an http 202 code plus
> the SOAP error. If you have RobustInOnly then you get only http 202.
>
> Best regards
>
> Michael
> --
> _______________________________________________________________
>
> Michael Bell                    Humboldt-Universitaet zu Berlin
>
> Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
> Fax:  +49 (0)30-2093 2704       Unter den Linden 6
> michael.bell@cms.hu-berlin.de   D-10099 Berlin
> _______________________________________________________________
>
> X.509 CA Certificates / Wurzelzertifikate
>
> http://ra.pki.hu-berlin.de
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Re: AxisFault produces empty http 202

Posted by Michael Bell <mi...@cms.hu-berlin.de>.
Hi Deepal.

Deepal jayasinghe schrieb:

> I create a POJO and deploy and I got the expected result , so will you
> be able to provide me more data to re-generate the issues. FYI I have
> attached my POJO.

I attached two WSDL files (stupid SQL wrapper plus common types and 
messages). The file with suffix orig is the web service which I want to 
implement. The file with the short filename is the specification which 
works. It looks like that AxisFault will only be correctly handled by 
the InOut message receiver. The RobustInOnly message receiver has a 
problem. Perhaps this has something to do with the initialization of the 
web server or the inheritaed classes.

BTW some details about my server implementation. I always generate the 
skeleton and the interface. My implementation class extends the 
skeleton. If I throw the custom exception (specified in the WSDL)in my 
implementation then his exception will be catched by the generated 
message receiver. This receiver packs the exception into an AxisFault 
and throw it again. The problem is that it looks like the handling of 
the RobustInOnly and InOut message receivers is different.

If you have a normal InOut receiver then you get an http 202 code plus 
the SOAP error. If you have RobustInOnly then you get only http 202.

Best regards

Michael
-- 
_______________________________________________________________

Michael Bell                    Humboldt-Universitaet zu Berlin

Tel.: +49 (0)30-2093 2482       ZE Computer- und Medienservice
Fax:  +49 (0)30-2093 2704       Unter den Linden 6
michael.bell@cms.hu-berlin.de   D-10099 Berlin
_______________________________________________________________

X.509 CA Certificates / Wurzelzertifikate

http://ra.pki.hu-berlin.de

Re: AxisFault produces empty http 202

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi Michael ,
I create a POJO and deploy and I got the expected result , so will you
be able to provide me more data to re-generate the issues. FYI I have
attached my POJO.

public class MyWebService {
   public void  getRes() throws Exception{
     throw  new Exception("Something went wrong");
   }
}

And the response I got is as follows,

HTTP/1.1 500 Something went wrong
Date: Mon, 30 Jul 2007 07:19:22 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: application/soap+xml; charset=UTF-8;
action="urn:getResException"
Connection: Close

93f
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
      <soapenv:Body>
         <soapenv:Fault>
            <soapenv:Code>
               <soapenv:Value>soapenv:Receiver</soapenv:Value>
            </soapenv:Code>
            <soapenv:Reason>
               <soapenv:Text xml:lang="en-US">Something went
wrong</soapenv:Text>
            </soapenv:Reason>
            <soapenv:Detail>
               <Exception> ...... </Exception>
            </soapenv:Detail>
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>
0


> Hi,
>
> I have a web service where the operations have only input messages and
> SOAP faults. wsdl2java generates exceptions for this. The problem is
> that Axis2 1.3 RC2 sends an empty http 202 response and catalina.out
> contains the following message:
>
> Jul 27, 2007 5:30:45 PM
> org.apache.axis2.receivers.AbstractMessageReceiver receive
> SEVERE: org.apache.axis2.AxisFault: FaultMsg
>
> FaultMsg is the generated exception class from wsdl2java. Any ideas
> why AxisFault is logged and not send as a SOAP fault? Did I forget
> something?
>
> If you need more infos like WSDL or generated code then I can send
> this too.
>
> Best regards
>
> Michael


-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org