[Xml-compile] SOAP Fault response missing?

cfaust-dougot cfaust at doyougot.com
Thu May 10 09:26:10 GMT 2012


Thanks for taking a look Mark.
 =

I'm currently using XML::Compile::SOAP 2.2.6.
 =

$trace->printResponse; Gives me (I removed IP's and urls to protect the pro=
vider):
 =

Response:
  HTTP/1.1 500 Internal Server Error
  Connection: close
  Date: Thu, 10 May 2012 08:42:11 GMT
  Server: Apache/2.2.15 (CentOS)
  Content-Length: 408
  Content-Type: text/xml;charset=3DUTF-8
  Client-Date: Thu, 10 May 2012 09:04:12 GMT
  Client-Peer: xx.xx.xx.xx:80
  Client-Response-Num: 1
  =

  <soap:Envelope xmlns:soap=3D"http://schemas.xmlsoap.org/soap/envelope/"><=
soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>fieldE=
rrors</faultstring><detail><ns2:AddSubscriberFault xmlns:ns2=3D"http://xxx.=
com/SubscriberService/"> <http://xxx.com/SubscriberService/"><ns2:fault><fa=
ultType>FIELD_REQUIRED</faultType><faultData>siteId</faultData></ns2:fault>=
</ns2:AddSubscriberFault></detail></soap:Fault></soap:Body></soap:Envelope>=
> <ns2:fault><faultType>FIELD_REQUIRED</faultType><faultData>siteId</faultD=
ata></ns2:fault></ns2:AddSubscriberFault></detail></soap:Fault></soap:Body>=
</soap:Envelope>

----------------------
print Dumper $response, "\n"; Gives me:
$VAR1 =3D undef;
$VAR2 =3D '
';
 =

I don't know if this will help at all, but here is what is logged with the =
"use Log::Report mode =3D> 'debug'".
 =

trace: register prefix wsdl for 'http://schemas.xmlsoap.org/wsdl/'
trace: register prefix soap for 'http://schemas.xmlsoap.org/wsdl/soap/'
trace: register prefix http for 'http://schemas.xmlsoap.org/wsdl/http/'
trace: initialize SOAP11 operations for WSDL11
trace: cache parsed file wsdl-soap.xsd-1328728761-5761
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.8/XML/Compile/WSD=
L11/xsd/wsdl-soap.xsd
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}address READER
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}operation READER
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}binding READER
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}body READER
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}header READER
trace: declare {http://schemas.xmlsoap.org/wsdl/soap/}fault READER
trace: declare {http://schemas.xmlsoap.org/wsdl/}definitions READER
trace: cache parsed file wsdl.xsd-1328728761-11308
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.8/XML/Compile/WSD=
L11/xsd/wsdl.xsd
trace: using preparsed XML document with element <{http://schemas.xmlsoap.o=
rg/wsdl/}definitions>
trace: using preparsed XML node <{http://schemas.xmlsoap.org/wsdl/}definiti=
ons>
trace: register prefix tns for 'http://xxx.com/SubscriberService/'
trace: register prefix xsd for 'http://www.w3.org/2001/XMLSchema'
trace: schema compile READER for {http://schemas.xmlsoap.org/wsdl/}definiti=
ons
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}import to wsdl_import
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}types to wsdl_types
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}part to wsdl_part
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}part to wsdl_part
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}message to wsdl_messa=
ge
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}request-response-or-o=
ne-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}solicit-response-or-n=
otification-operation to wsdl_solicit-response-or-notification-operation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}request-response-or-o=
ne-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}request-response-or-o=
ne-way-operation to wsdl_request-response-or-one-way-operation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_ope=
ration
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_ope=
ration
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}portType to wsdl_port=
Type
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}output to wsdl_output
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}fault to wsdl_fault
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}input to wsdl_input
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_ope=
ration
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}operation to wsdl_ope=
ration
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}binding to wsdl_bindi=
ng
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}documentation to wsdl=
_documentation
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}port to wsdl_port
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}port to wsdl_port
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}service to wsdl_servi=
ce
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalEl=
ement to wsdl_anyTopLevelOptionalElement
trace: rewrote type {http://schemas.xmlsoap.org/wsdl/}anyTopLevelOptionalEl=
ement to wsdl_anyTopLevelOptionalElement
trace: using preparsed XML node <{http://schemas.xmlsoap.org/wsdl/}definiti=
ons>
trace: cache parsed file soap-encoding.xsd-1328728761-18427
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.8/XML/Compile/SOA=
P11/xsd/soap-encoding.xsd
trace: cache parsed file soap-envelope.xsd-1328728761-6032
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.8/XML/Compile/SOA=
P11/xsd/soap-envelope.xsd
trace: cache parsed file soap-envelope-patch.xsd-1328728761-796
trace: parsing XML from file /usr/lib/perl5/site_perl/5.8.8/XML/Compile/SOA=
P11/xsd/soap-envelope-patch.xsd
trace: register prefix SOAP-ENV for 'http://schemas.xmlsoap.org/soap/envelo=
pe/'
trace: register prefix SOAP-ENC for 'http://schemas.xmlsoap.org/soap/encodi=
ng/'
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/=
}Fault
trace: schema compile WRITER for {http://xxx.com/SubscriberService/}AddSubs=
criber
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/=
}Fault
trace: schema compile WRITER for {http://xxx.com/SubscriberService/}AddSubs=
criberFault
trace: schema compile WRITER for {http://schemas.xmlsoap.org/soap/envelope/=
}Envelope
trace: schema compile READER for {http://xxx.com/SubscriberService/}AddSubs=
criberResponse
trace: schema compile READER for {http://schemas.xmlsoap.org/soap/envelope/=
}Fault
trace: schema compile READER for {http://schemas.xmlsoap.org/soap/envelope/=
}Envelope
trace: loading extension XML::Compile::Transport::SOAPHTTP
warning: Internal Server Error
info: received 500 Internal Server Error
 =

Thanks!
-Chris
________________________________

From: Mark Overmeer [mailto:mark at overmeer.net]
Sent: Thu 5/10/2012 2:54 AM
To: cfaust-dougot
Cc: xml-compile at lists.scsys.co.uk
Subject: Re: [Xml-compile] SOAP Fault response missing?


* cfaust-dougot (cfaust at doyougot.com) [120509 23:10]:
> The only difference is the http header is  500 (internal server error),
> which I thought might be the problem but the provider insists that sending
> a 500 is proper for the a soap fault and its working like as it should.

It should be handled, if the response contains xml, yes.

> my $wsdlXml =3D XML::LibXML->new->parse_file("pathtowsdl");
> my $wsdl =3D XML::Compile::WSDL11->new($wsdlXml);

You can also say
  my $wsdl =3D XML::Compile::WSDL11->new("pathrowsdl");

> Works great on success but when I simply change one param value to
> cause a fault, $response has nothing in it (per Data:Dumper). $trace has
> the headers and the envelope/payload (just like I would see on a success).

Please send me a dump of $trace ($Data::Dumper::Indent=3D1)
And which version of XML::Compile / ::SOAP do you use?
--
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net <http://mark.overmeer.net/>                    htt=
p://solutions.overmeer.net <http://solutions.overmeer.net/> =




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20120510/20=
1aaa0d/attachment-0001.htm


More information about the Xml-compile mailing list