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*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
