[Xml-compile] Fault Responses

Mark Overmeer mark at overmeer.net
Mon May 22 08:27:14 GMT 2017


* Errietta Kostala (errietta at errietta.me) [170522 08:18]:
> TIL of $wsdl->explain! Thank you so much, I figured it out:

Ah, gladly you succeeded.

>  51   return +{
>  52     FaultDetailsFault => {
>  53       faultcode     => pack_type( '
> http://schemas.xmlsoap.org/soap/envelope/', 'Client'),
>  54       faultstring => $descr,
>  55
>  56       detail => {
>  57         ErrorCode => $code,
>  58         ErrorMessage => $string,
>  59       }
>  60    },
>  61     _RETURN_CODE => $status,
>  62   };

To defend this structure: ::WSDL (above) follows the structure of the
WSDL-file, not the way it ends-up in the XML (below).

> On Mon, May 22, 2017 at 8:43 AM Mark Overmeer <mark at overmeer.net> wrote:
> > * Errietta Kostala (errietta at errietta.me) [170519 14:17]:
> > > 've been trying to emulate the following behaviour:
> > >
> > > <s:Fault>
> > >      <faultcode>s:Client</faultcode>
> > >      <faultstring xml:lang="is-IS">Business Rule Error</faultstring>
> > >      <detail>
> > >         <FaultDetails xmlns="(our namespace)" xmlns:i="
> > > http://www.w3.org/2001/XMLSchema-instance">
> > >            <ErrorCode>301</ErrorCode>
> > >            <ErrorMessage>Message here</ErrorMessage>
> > >         </FaultDetails>
> > >      </detail>
> > >   </s:Fault>
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list