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 laurent grangier <la...@gmail.com> on 2006/08/10 16:04:09 UTC

Filter AxisFault and change response with Handlers

Hello,

I would like to filter all the AxisFault which can occurs to send a
customized response to the client. Instead of sending a SOAPFault to the
client, I would prefer send it a SOAP message containing some clear
explanation.

I know how to set up an Axis handler. I know how to catch any fault (public
void onFault(MessageContext context) {...}). But I don't know how to change
the response and send a particular SOAP message.

Can somebody help me ?

Thanks,

Laurent

Re: Filter AxisFault and change response with Handlers

Posted by Anne Thomas Manes <at...@gmail.com>.
You must also define your response message element such that it
contains a <choice>, e.g.,

<s:element name="operationResponse>
  <s:complexType>
    <s:choice>
       <s:operationReturn type="tns:operationReturnType"/>
       <s:operationFault type="tns:operationFaultType"/>
    </s:choice>
   </s:complexType>
</s:element>

On 8/10/06, CT IC 1 Gast 15 <ic...@siemens.com> wrote:
>
>
> try it with the saaj-api, with which you can build your own soap messages
>
>  ________________________________
>  Von: laurent grangier [mailto:laurent.grangier@gmail.com]
> Gesendet: Donnerstag, 10. August 2006 16:04
> An: axis-user@ws.apache.org
> Betreff: Filter AxisFault and change response with Handlers
>
>
> Hello,
>
> I would like to filter all the AxisFault which can occurs to send a
> customized response to the client. Instead of sending a SOAPFault to the
> client, I would prefer send it a SOAP message containing some clear
> explanation.
>
> I know how to set up an Axis handler. I know how to catch any fault (public
> void onFault(MessageContext context) {...}). But I don't know how to change
> the response and send a particular SOAP message.
>
> Can somebody help me ?
>
> Thanks,
>
> Laurent
>

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


RE: Base64

Posted by Nirmish Dholakia <ni...@c-sam.co.in>.
Thanks Anne,

But I forgot to mention that I am using Axis for generating the wsdl. Hence
it will not define the type as  type="xsd:base64binaryā€¯ so weather I have to
modify the generated WSDL? 

Thank You again

Nirmish

-----Original Message-----
From: Anne Thomas Manes [mailto:atmanes@gmail.com] 
Sent: Thursday, August 10, 2006 8:36 PM
To: axis-user@ws.apache.org; nirmish.dholakia@c-sam.co.in
Subject: Re: Base64

Yes. Define it as type="xsd:base64binary".

Anne

On 8/10/06, Nirmish Dholakia <ni...@c-sam.co.in> wrote:
>
>
> Hi All,
>
> I have a web services written in Java. and the client for this 
> webservice is in .Net environment.
>
> I am passing an image file in this webservice using Base64 encoding.
>
> Now the question is will the .Net client able to decode the same?
>
> Please provide your views/inputs.
>
> Thank You
> Nirmish
>
>
>
> --
>  No virus found in this outgoing message.
>  Checked by AVG Free Edition.
>  Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 
> 8/7/2006
>

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
 


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


Re: Base64

Posted by Anne Thomas Manes <at...@gmail.com>.
Yes. Define it as type="xsd:base64binary".

Anne

On 8/10/06, Nirmish Dholakia <ni...@c-sam.co.in> wrote:
>
>
> Hi All,
>
> I have a web services written in Java. and the client for this webservice is
> in .Net environment.
>
> I am passing an image file in this webservice using Base64 encoding.
>
> Now the question is will the .Net client able to decode the same?
>
> Please provide your views/inputs.
>
> Thank You
> Nirmish
>
>
>
> --
>  No virus found in this outgoing message.
>  Checked by AVG Free Edition.
>  Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
>

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


Base64

Posted by Nirmish Dholakia <ni...@c-sam.co.in>.
Hi All,
 
I have a web services written in Java. and the client for this webservice is
in .Net environment.
 
I am passing an image file in this webservice using Base64 encoding.
 
Now the question is will the .Net client able to decode the same?
 
Please provide your views/inputs.
 
Thank You
Nirmish

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
 

AW: Filter AxisFault and change response with Handlers

Posted by CT IC 1 Gast 15 <ic...@siemens.com>.
try it with the saaj-api, with which you can build your own soap
messages

________________________________

Von: laurent grangier [mailto:laurent.grangier@gmail.com] 
Gesendet: Donnerstag, 10. August 2006 16:04
An: axis-user@ws.apache.org
Betreff: Filter AxisFault and change response with Handlers


Hello,

I would like to filter all the AxisFault which can occurs to send a
customized response to the client. Instead of sending a SOAPFault to the
client, I would prefer send it a SOAP message containing some clear
explanation. 

I know how to set up an Axis handler. I know how to catch any fault
(public void onFault(MessageContext context) {...}). But I don't know
how to change the response and send a particular SOAP message.

Can somebody help me ? 

Thanks,

Laurent