tfoertsch has asked for the wisdom of the Perl Monks concerning the following question:
according to the docs $res in the fault handler is an SOAP::SOM object. But in my case I get a string, see below.$s=SOAP::Lite ->service('http://preview.etracker.de:8008/wsAPI?wsdl') ->on_fault(sub { my($soap, $res) = @_; ... }); eval { ... $s->setFilter($ticket, $stat_id, '^-[^,]+,4853,', FILTER_TYPE_REGEXP); ... };
The source reveals that this happens when the response from a server cannot be deserialized. The deserialization died with "Unspecified namespace for type \'Struct[6]\'".
But why?
What is wrong? Is it the service description or the fault response?
'Unspecified namespace for type \'Struct[6]\' <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/en +velope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns4="urn:wsAPI" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode xsi:type="xsd:QName">SOAP-ENV:Client</faultcode> <faultstring xsi:type="xsd:string">soap request contained incorrect nu +mber of parameters. method \'setFilter\' required 3 and request provided 4</faultstring> <faultactor xsi:type="xsd:anyURI"></faultactor> <detail xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[6]" SOAP-ENC:offset="[0]"> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/inc/pear/SOAP/Fault.ph +p</file> <line xsi:type="xsd:int">49</line> <function xsi:type="xsd:string">pear_error</function> <class xsi:type="xsd:string">pear_error</class> <type xsi:type="xsd:string">::</type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[5]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string">soap request contained incorrect number of + parameters. method \'setFilter\' required 3 and request provided 4</it +em> <item xsi:type="xsd:string">Client</item> <item/> <item/> <item xsi:type="xsd:string"></item></args></item> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/inc/pear/SOAP/Base.php +</file> <line xsi:type="xsd:int">199</line> <function xsi:type="xsd:string">soap_fault</function> <class xsi:type="xsd:string">soap_fault</class> <type xsi:type="xsd:string">-></type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[6]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string">soap request contained incorrect number of + parameters. method \'setFilter\' required 3 and request provided 4</it +em> <item xsi:type="xsd:string">Client</item> <item xsi:type="xsd:string"></item> <item xsi:type="xsd:string"></item> <item/> <item/></args></item> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/inc/pear/SOAP/Server.p +hp</file> <line xsi:type="xsd:int">532</line> <function xsi:type="xsd:string">_raisesoapfault</function> <class xsi:type="xsd:string">soap_server</class> <type xsi:type="xsd:string">-></type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[4]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string">soap request contained incorrect number of + parameters. method \'setFilter\' required 3 and request provided 4</it +em> <item xsi:type="xsd:string"></item> <item xsi:type="xsd:string"></item> <item xsi:type="xsd:string">Client</item></args></item> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/inc/pear/SOAP/Server.p +hp</file> <line xsi:type="xsd:int">398</line> <function xsi:type="xsd:string">verifymethod</function> <class xsi:type="xsd:string">soap_server</class> <type xsi:type="xsd:string">-></type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="Struct[1]" SOAP-ENC:offset="[0]"> <ns4:setFilter> <ns4:ticket xsi:type="xsd:string">d60d0fb960c5bd28c4fa54bcfc4ed05a</ns4:ticket> <ns4:stat_id xsi:type="xsd:string">StatisticUsagePageImpressions</ns4: +stat_id> <ns4:filter xsi:type="xsd:string">^-[^,]+,4853,</ns4:filter> <ns4:c-gensym22 xsi:type="xsd:int">4</ns4:c-gensym22></ns4:setFilter></args></item> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/inc/pear/SOAP/Server.p +hp</file> <line xsi:type="xsd:int">170</line> <function xsi:type="xsd:string">parserequest</function> <class xsi:type="xsd:string">soap_server</class> <type xsi:type="xsd:string">-></type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[2]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string"><?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:wsAPI" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quo +t; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">&l +t;soap:Body><tns:setFilter><ticket xsi:type="xsd:string">d60d0fb960c5bd28c4fa54bcfc4ed05a< +;/ticket><stat_id xsi:type="xsd:string">StatisticUsagePageImpressions</s +tat_id><filter xsi:type="xsd:string">^-[^,]+,4853,</filter><c-g +ensym22 xsi:type="xsd:int">4</c-gensym22></tns:setFilter +></soap:Body></soap:Envelope></item> <item xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:anyType[0]"/></args></item> <item> <file xsi:type="xsd:string">/home/web/etracker.de/web/wsAPI.php</file> <line xsi:type="xsd:int">61</line> <function xsi:type="xsd:string">service</function> <class xsi:type="xsd:string">soap_server</class> <type xsi:type="xsd:string">-></type> <args xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[1]" SOAP-ENC:offset="[0]"> <item xsi:type="xsd:string"><?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:wsAPI" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quo +t; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">&l +t;soap:Body><tns:setFilter><ticket xsi:type="xsd:string">d60d0fb960c5bd28c4fa54bcfc4ed05a< +;/ticket><stat_id xsi:type="xsd:string">StatisticUsagePageImpressions</s +tat_id><filter xsi:type="xsd:string">^-[^,]+,4853,</filter><c-g +ensym22 xsi:type="xsd:int">4</c-gensym22></tns:setFilter +></soap:Body></soap:Envelope></item></args></item></de +tail></SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ';
|
|---|