Narend has asked for the wisdom of the Perl Monks concerning the following question:

Using Perl, SOAP with an external tool constructed WSDL, with the SOAP::Lite, I have called a service and now printing that response simply with the Dumper.

Now the Dumper throws the following: Being new to SOAP/WSDL with Perl, looking for tips on how do I get the data. Do i try to read Hash of Hash, or parse with XMLParser, etc. Appreciate your help. >>>>>>>>>>>>>>>>>>>>>>>>>
name=_on_nonserializedValue=CODE(0x8215264) name=_serializerValue=SOAP::Serializer=HASH(0x844e408) @@@@@@@@@@@@@@@name=_typelookupValue=HASH(0x844e240) @@@@@@@@@@@@@@@name=floatValue=ARRAY(0x8859140) name=base64Value=ARRAY(0x881f174) name=intValue=ARRAY(0x844dd3c) name=stringValue=ARRAY(0x844dab4) @@@@@@@@@@@@@@@ name=_on_nonserializedValue=CODE(0x8215264) name=_levelValue=0 name=_objectstackValue=HASH(0x844dbb0) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ name=_xmlschemaValue=http://www.w3.org/1999/XMLSchema name=_signatureValue=ARRAY(0x8846ce0) name=_readableValue=0 name=_maptypeValue=HASH(0x844e270) @@@@@@@@@@@@@@@name=SOAPStructValue=http://xml.apache.org/xml-soap @@@@@@@@@@@@@@@ name=_soapversionValue=1.1 name=_namespacesValue=HASH(0x844e420) @@@@@@@@@@@@@@@name=http://schemas.xmlsoap.org/soap/encoding/Value=SOA +P-ENC name=http://www.w3.org/1999/XMLSchemaValue=xsd name=http://schemas.xmlsoap.org/soap/envelope/Value=SOAP-ENV name=http://www.w3.org/1999/XMLSchema-instanceValue=xsi @@@@@@@@@@@@@@@ name=_seenValue=HASH(0x881e004) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ name=_encodingValue=UTF-8 name=_attrValue=HASH(0x844e3cc) @@@@@@@@@@@@@@@name={http://schemas.xmlsoap.org/soap/envelope/}encodin +gStyleValue=http://schemas.xmlso ap.org/s +oap/encoding/ @@@@@@@@@@@@@@@ name=_multirefinplaceValue=0 name=_autotypeValue=1 @@@@@@@@@@@@@@@ name=_on_actionValue=CODE(0x82eb1fc) name=_deserializerValue=SOAP::Deserializer=HASH(0x844e4d4) @@@@@@@@@@@@@@@name=_idsValue=HASH(0x881ef58) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ name=_xmlschemasValue=HASH(0x8a505e8) @@@@@@@@@@@@@@@name=http://xml.apache.org/xml-soapValue=SOAP::XMLSchem +aApacheSOAP::Deser name=http://www.w3.org/2001/06/soap-encodingValue=SOAP::XMLSchemaSOAP1 +_2::Deserializer name=http://www.w3.org/2001/XMLSchemaValue=SOAP::XMLSchema2001::Deseri +alizer name=http://schemas.xmlsoap.org/soap/encoding/Value=SOAP::XMLSchemaSOA +P1_1::Deserializer name=http://www.w3.org/1999/XMLSchemaValue=SOAP::XMLSchema1999::Deseri +alizer @@@@@@@@@@@@@@@ name=_hrefsValue=HASH(0x8858ea0) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ name=_parserValue=SOAP::Parser=HASH(0x8858e1c) @@@@@@@@@@@@@@@name=_parserValue= @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ name=_autoresultValue=0 name=_transportValue=SOAP::Transport=HASH(0x8394040) @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ name=_on_faultValue=CODE(0x82edde8) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
  • Comment on Navigate and getting proper output from SOAP WSDL response in Perl.
  • Download Code

Replies are listed 'Best First'.
Re: Navigate and getting proper output from SOAP WSDL response in Perl.
by Loops (Curate) on Apr 08, 2013 at 18:12 UTC
    Hi,

    Are you using Data::Dumper? Because it should be expanding those structures for you. Perhaps you could show your code. There would be a better chance of providing help then.

      I Changed the print line to include Dumper(as next line), &now and I see output: print Dumper "name=$k"; print Dumper "Value=$keyHash{$k}\n"; And now my question still remains that I have to extract values. So do I have to handle each Type separately, as in a nonserialized object, a float array, a hash etc., ? So a case statement to check the type and then parse(navigate) each VAR1?

      Output >>>>>>>>>>>>>>
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++ $VAR1 = 'name=_on_nonserialized'; $VAR1 = 'Value=CODE(0x82152fc) '; $VAR1 = 'name=_serializer'; $VAR1 = 'Value=SOAP::Serializer=HASH(0x844e500) '; @@@@@@@@@@@@@@@$VAR1 = 'name=_typelookup'; $VAR1 = 'Value=HASH(0x844e338) '; @@@@@@@@@@@@@@@$VAR1 = 'name=float'; $VAR1 = 'Value=ARRAY(0x885970c) '; $VAR1 = 'name=base64'; $VAR1 = 'Value=ARRAY(0x881ecac) '; $VAR1 = 'name=int'; $VAR1 = 'Value=ARRAY(0x844de34) '; $VAR1 = 'name=string'; $VAR1 = 'Value=ARRAY(0x844dbac) '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_on_nonserialized'; $VAR1 = 'Value=CODE(0x82152fc) '; $VAR1 = 'name=_level'; $VAR1 = 'Value=0 '; $VAR1 = 'name=_objectstack'; $VAR1 = 'Value=HASH(0x844dca8) '; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $VAR1 = 'name=_xmlschema'; $VAR1 = 'Value=http://www.w3.org/1999/XMLSchema '; $VAR1 = 'name=_signature'; $VAR1 = 'Value=ARRAY(0x8846c40) '; $VAR1 = 'name=_readable'; $VAR1 = 'Value=0 '; $VAR1 = 'name=_maptype'; $VAR1 = 'Value=HASH(0x844e368) '; @@@@@@@@@@@@@@@$VAR1 = 'name=SOAPStruct'; $VAR1 = 'Value=http://xml.apache.org/xml-soap '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_soapversion'; $VAR1 = 'Value=1.1 '; $VAR1 = 'name=_namespaces'; $VAR1 = 'Value=HASH(0x844e518) '; @@@@@@@@@@@@@@@$VAR1 = 'name=http://schemas.xmlsoap.org/soap/encoding/ +'; $VAR1 = 'Value=SOAP-ENC '; $VAR1 = 'name=http://www.w3.org/1999/XMLSchema'; $VAR1 = 'Value=xsd '; $VAR1 = 'name=http://schemas.xmlsoap.org/soap/envelope/'; $VAR1 = 'Value=SOAP-ENV '; $VAR1 = 'name=http://www.w3.org/1999/XMLSchema-instance'; $VAR1 = 'Value=xsi '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_seen'; $VAR1 = 'Value=HASH(0x881df54) '; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $VAR1 = 'name=_encoding'; $VAR1 = 'Value=UTF-8 '; $VAR1 = 'name=_attr'; $VAR1 = 'Value=HASH(0x844e4c4) '; @@@@@@@@@@@@@@@$VAR1 = 'name={http://schemas.xmlsoap.org/soap/envelope +/}encodingStyle'; $VAR1 = 'Value=http://schemas.xmlsoap.org/soap/encoding/ '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_multirefinplace'; $VAR1 = 'Value=0 '; $VAR1 = 'name=_autotype'; $VAR1 = 'Value=1 '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_on_action'; $VAR1 = 'Value=CODE(0x82eb1fc) '; $VAR1 = 'name=_deserializer'; $VAR1 = 'Value=SOAP::Deserializer=HASH(0x844e5cc) '; @@@@@@@@@@@@@@@$VAR1 = 'name=_ids'; $VAR1 = 'Value=HASH(0x881ea90) '; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $VAR1 = 'name=_xmlschemas'; $VAR1 = 'Value=HASH(0x8a50538) '; @@@@@@@@@@@@@@@$VAR1 = 'name=http://xml.apache.org/xml-soap'; $VAR1 = 'Value=SOAP::XMLSchemaApacheSOAP::Deserializer '; $VAR1 = 'name=http://www.w3.org/2001/06/soap-encoding'; $VAR1 = 'Value=SOAP::XMLSchemaSOAP1_2::Deserializer '; $VAR1 = 'name=http://www.w3.org/2001/XMLSchema'; $VAR1 = 'Value=SOAP::XMLSchema2001::Deserializer '; $VAR1 = 'name=http://schemas.xmlsoap.org/soap/encoding/'; $VAR1 = 'Value=SOAP::XMLSchemaSOAP1_1::Deserializer '; $VAR1 = 'name=http://www.w3.org/1999/XMLSchema'; $VAR1 = 'Value=SOAP::XMLSchema1999::Deserializer '; @@@@@@@@@@@@@@@ $VAR1 = 'name=_hrefs'; $VAR1 = 'Value=HASH(0x8858dc0) '; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $VAR1 = 'name=_parser'; $VAR1 = 'Value=SOAP::Parser=HASH(0x8858d3c) '; @@@@@@@@@@@@@@@$VAR1 = 'name=_parser'; $VAR1 = 'Value= '; @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@ $VAR1 = 'name=_autoresult'; $VAR1 = 'Value=0 '; $VAR1 = 'name=_transport'; $VAR1 = 'Value=SOAP::Transport=HASH(0x8394160) '; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ $VAR1 = 'name=_on_fault'; $VAR1 = 'Value=CODE(0x82edde8) '; +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++
      Output <<<<<<<<<<<<<<
        You include Data::Dumper but then you never use it. Try replacing the line "print_wsout($fileSvc);" with "print Dumper $fileSvc;". Should let you see enough to debug your issue.
Re: Navigate and getting proper output from SOAP WSDL response in Perl.
by Anonymous Monk on Apr 08, 2013 at 19:49 UTC