[Xml-compile] Regarding SOAP 1.2 faultNotImplemented handling

Sheeju Alex sheejuec7 at gmail.com
Thu Aug 9 11:13:30 GMT 2018


Hi Mark,

     Thanks mark for looking at this after you holidays, adding
`addPrefixes` code worked and I reverted to keep XC_DAEMON_NS, please see
below for details.

On Wed, Aug 8, 2018 at 7:08 PM Mark Overmeer <solutions at overmeer.net> wrote:

>
> Hi Sheeju,
>
> Back from holidays, so I can answer your question at last.
>
> * Sheeju Alex (sheejuec7 at gmail.com) [180725 09:04]:
>   [...]
> > This perfectly works fine for SOAP 1.1 and I get faultNotImplemented
> > response when I call `subtract` SOAP Action but for SOAP 1.2 I get below
> > error
> >
> > ```
> > error: QName formatting only works if the namespace is used for an
> element,
> > not found http://perl.org/xml-schemas/xml-compile-daemon/1.0 for
> > notImplemented
> > ```
>
> When I am not mistaken, this means that there is no prefix defined
> for the namespace XC_DAEMON_NS.  Just before
>   $daemon->operationsFromWSDL(...)
> try adding
>
>   use XML::Compile::SOAP::Util   qw/XC_DAEMON_NS/;
>   $daemon->addPrefix(xcd => XC_DAEMON_NS);
>

Yes addPrefix worked and here is the code I added to calculator.psgi

my $wsdl = XML::Compile::WSDL11->new($wsdl_filename);
$wsdl->addPrefixes(xcd => XC_DAEMON_NS);

https://github.com/sheeju/perl5-XML-Compile-SOAP-Daemon/commit/77aa3c547431a6241c60e906fc9869dcf2ad8bd4


>
> > After debuging I have found a fix to this error so that for SOAP 1.2 it
> > work fine, I just had to replace XC_DAEMON_NS to SOAP12ENV for all the
> > faultHandlers in module XML::Compile::SOAP12::Server.
>
> That's an incorrect fix.  The errors which are produced are not part of
> the SOAP 1.2 specification... one is not allowed to add things to a
> namespace which one does not own.
>

I have another issue with fault response when an method is not implemented
I get `faultNoAnswerProduced`. Here is the code I added to fix this issue,
please let me know if there is any other better way to handle this.

https://github.com/sheeju/perl5-XML-Compile-SOAP/commit/9e91b9644e2c53b3671eef852eba4a86ac8cfadf

Best Regards,
Sheeju Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20180809/f9141ad9/attachment.htm>


More information about the Xml-compile mailing list