For soap 1.1 vs soap 1.2 fault there is a clear specification so what ever
web service engine whose executing soap 1.2 or soap 1.1 fault know how to
deal with when it receives faults according.

 SOAP 1.1SOAP 1.2

e:Fault

e:Fault

faultcode

e:Code, e:Subcode, e:Value

faultstring

e:Reason

faultactor

e:Node, e:Role

detail

e:Detail



SOAP 1.1SOAP 1.2

<e:Fault>
  <faultcode>e:Server.Memory</faultcode>
  <faultstring>Out of memory</faultstring>
</e:Fault>

<e:Fault>
  <e:Code>
    <e:Value>e:Receiver</e:Value>
    <e:Subcode>
      <e:Value>p:Memory</e:Value>
    </e:Subcode>
  </e:Code>
  <e:Reason>Out of memory</e:Reason>
</e:Fault>

*Table 2*

  for *POX* fault no specification so we just wrapping around with
<Exception> tag with relevant fault


On Thu, Jul 3, 2014 at 7:45 AM, Ishara Premadasa <[email protected]> wrote:

> Hi all,
>
> Any idea on this. Would be great if i can know the reason for the
> difference here.
> Thanks!
>
>
> On Wed, Jul 2, 2014 at 3:15 AM, Ishara Premadasa <[email protected]> wrote:
>
>> Hi,
>>
>> I used fault mediator with both soap 1.1 and pox format where the format
>> of the generated fault response appeared to be different. With the pox
>> format some elements of the fault message was missing.
>>
>> For e.g: This is the response getting for Soap 1.1 format
>> <soapenv:Envelope xmlns:soapenv="
>> http://schemas.xmlsoap.org/soap/envelope/";>
>>    <soapenv:Body>
>>       <soapenv:Fault>
>>          <faultcode xmlns:soap11Env="
>> http://schemas.xmlsoap.org/soap/envelope/
>> ">soap11Env:VersionMismatch</faultcode>
>>          <faultstring>Version Mismatch!!</faultstring>
>>          <detail>There is a version mismatch in the input message</detail>
>>       </soapenv:Fault>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>>
>> This is how it looks like for POX format.
>> <soapenv:Envelope xmlns:soapenv="
>> http://schemas.xmlsoap.org/soap/envelope/";>
>>    <soapenv:Header/>
>>    <soapenv:Body>
>>       <Exception>There is a version mismatch in the input
>> message</Exception>
>>    </soapenv:Body>
>> </soapenv:Envelope>
>>
>> I have two concerns on this.
>>
>> 1. The fault reason, code entries we set in the mediator are ommitted
>> when creating POX fault.
>> 2. For the Pox format it generates an empty <Header> element but in Soap
>> 1.1 that is missing.
>>
>> When debugging the fault mediator i could see the below reasons for this
>> output.
>>
>> 1. When we create POX fault there is an if-else block where it first
>> checks 'faultDetail' and else if goes to 'faultDetailExpr' etc. Therefore
>> when the fault <detail> is there, the other values are ommitted for the
>> fault payload. However when we create SOAP fault all the details are taken
>> and set into SOAPFault  object as below.
>>
>>         setFaultCode(synCtx, factory, fault, soapVersion);
>>         setFaultReason(synCtx, factory, fault, soapVersion);
>>         setFaultDetail(synCtx, factory, fault);
>>
>> I would like to know whether there is any specific reason for doing that.
>> IMO there is no harm if we provide all data with the POX fault as well
>> rather than skipping them, since the data are already in the message
>> context.
>>
>> 2. In the POX fault we add the fault payload as a child and replace the
>> <body>. But in SOAP fault the whole envelope is getting replaced with new
>> fault envelope. May be this is why the <soapenv:Header/> is missing there ?
>>
>> Thanks!
>> Ishara
>> --
>> Ishara Premasada
>> Software Engineer,
>> WSO2 Inc. http://wso2.com/
>>
>>
>> *Blog   :  http://isharapremadasa.blogspot.com/
>> <http://isharapremadasa.blogspot.com/>Twitter       :
>> https://twitter.com/ishadil <https://twitter.com/ishadil> Mobile       :
>> +94 714445832 <%2B94%20714445832>*
>>
>>
>>
>
>
> --
> Ishara Premasada
> Software Engineer,
> WSO2 Inc. http://wso2.com/
>
>
> *Blog   :  http://isharapremadasa.blogspot.com/
> <http://isharapremadasa.blogspot.com/>Twitter       :
> https://twitter.com/ishadil <https://twitter.com/ishadil> Mobile       :
> +94 714445832 <%2B94%20714445832>*
>
>
>


-- 
Dushan Abeyruwan | Associate Tech Lead
Integration Technologies Team
PMC Member Apache Synpase
WSO2 Inc. http://wso2.com/
Blog:http://dushansview.blogspot.com/
Mobile:(0094)713942042
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to