[Xml-compile] returning a fault in XML::Compile::SOAP::HTTPDaemon
Mark Overmeer
mark at overmeer.net
Wed Mar 3 18:26:00 GMT 2010
* Pete Groff (pfg104 at gmail.com) [100302 18:37]:
> I have the fault below defined in my WSDL:
> <wsdl:message name="createIdentity_faultMsg">
> <wsdl:part name="fault" element="tns:createIdentity_fault"></wsdl:part>
> </wsdl:message>
>
> <wsdl:portType name="eSP">
> <wsdl:operation name="createIdentity">
> <wsdl:input message="tns:createIdentityRequest"/>
> <wsdl:output message="tns:createIdentityResponse"/>
> <wsdl:fault name="createIdentity_faultMsg" message="tns:createIdentity_faultMsg"></wsdl:fault>
> </wsdl:operation>
Faults are server-side, not client side. So, you are using
XML::Compile::SOAP::Daemon, I presume.
> How do I return createIdentity_faultMsg? What should the hash look like or am
> I limited to returning faults like this?
>
> return { Fault =>
> { faultcode => pack_type(SOAP11ENV, 'Server.invalidResponse')
> , faultstring => 'I dont know man'
>
> , faultactor => 'database_exists'
> } };
As you can have multiple parts in a message, you can also produce
faults. So, return a message which has partname => \%data, hence
{ createIdentity_faultMsg => {}
, _RETURN_CODE => 404
, _RETURN_TEXT => 'oops'
}
--
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