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 "Kristina T." <st...@yahoo.com.INVALID> on 2018/05/11 17:28:06 UTC

Axis2: Exceptions getting throw with soapenv:Receiver instead of soapenv:Sender

I’m working on a project where we’ve we are programming against an API defined via  a VMware wsdl file.  When we encountered an error conditions we throw exceptions using classes defined from the axis2 WSDL code generation process. 
VMware has indicated that those exceptions when viewed in SOAP should have the following  format 
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">   <soapenv:Body>     <soapenv:Fault>       <soapenv:Code>         <soapenv:Value>soapenv:Sender</soapenv:Value>       </soapenv:Code>       <soapenv:Reason> 
Currently our soapenv has Receiver set instead of Sender 
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">  <soapenv:Header/>  <soapenv:Body>    <soapenv:Fault>      <soapenv:Code>        <soapenv:Value>soapenv:Receiver</soapenv:Value>      </soapenv:Code>      <soapenv:Reason>,

I can’t find anything in the generated API’s that allows me to change this and I’ve been unable to find anything in my searches that indicates how I might fix this.   I see nothing in the service.xml file or any other configuration file that allows me to flip this setting.   
I’m hoping someone can point me to some documentation or provide a suggestion on how I might   achieve this 
Background Info: 
Axis Releases being Used: Axis 1.6.7 The following flags were used to generate the code we use from the wsdl file "WSDL2Java -uri ${wsdl.uri} -s -ss -sd -ssi -ap -ns2p http:../data.xsd -l java -p ${package} -d adb -wv 1.1 -uw -g -f -o ${build.dir}/wsdl/java/server"
Thank you in advance for any assistance you can provide, 
Kristina 


Re: Axis2: Exceptions getting throw with soapenv:Receiver instead of soapenv:Sender

Posted by robertlazarski <ro...@gmail.com>.
On Fri, May 11, 2018 at 11:28 AM, Kristina T. <stereoscopic@yahoo.com.
invalid> wrote:

> I’m working on a project where we’ve we are programming against an API
> defined via  a VMware wsdl file.  When we encountered an error conditions
> we throw exceptions using classes defined from the axis2 WSDL code
> generation process.
>
> VMware has indicated that those exceptions when viewed in SOAP should have
> the following  format
>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
> ">
>   <soapenv:Body>
>     <soapenv:Fault>
>       <soapenv:Code>
>         <soapenv:Value>soapenv:Sender</soapenv:Value>
>       </soapenv:Code>
>       <soapenv:Reason>
>
> Currently our soapenv has Receiver set instead of Sender
>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>   <soapenv:Header/>
>   <soapenv:Body>
>     <soapenv:Fault>
>       <soapenv:Code>
>         <soapenv:Value>soapenv:Receiver</soapenv:Value>
>       </soapenv:Code>
>       <soapenv:Reason>
> ,
>
>
> I can’t find anything in the generated API’s that allows me to change this
> and I’ve been unable to find anything in my searches that indicates how I
> might fix this.   I see nothing in the service.xml file or any other
> configuration file that allows me to flip this setting.
>
> I’m hoping someone can point me to some documentation or provide a
> suggestion on how I might   achieve this
>
> Background Info:
>
> Axis Releases being Used: Axis 1.6.7
> The following flags were used to generate the code we use from the wsdl
> file
> "WSDL2Java -uri ${wsdl.uri} -s -ss -sd -ssi -ap -ns2p http:../data.xsd -l
> java -p ${package} -d adb -wv 1.1 -uw -g -f -o
> ${build.dir}/wsdl/java/server"
>
>
I just generated some errors for testing. When the error happens before the
service is reached I.e. bad params I see the fault with soapenv:Receiver.

Generating an error on the response is a little trickier and I wasn't able
to easily test that. Anyways I believe what you are seeing is an error
before the service.

Kind regards,
Robert



> Thank you in advance for any assistance you can provide,
>
> Kristina
>
>