I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2011-02-23 22:47:23.207756-08 by znaeff
I get first result item only, cannot get rest items from valid resulting XML.
Hello!

There is some Apache AXIS server with DOC-LITERAL WSDL.
My code:

my $soap1 = new SOAP::Lite; ##$soap1->service('https://avt:dgthtl@twrappl.bank:8443/axis2/services/DBO?wsdl'); ## trying to use WSDL results next error: ## Can't call method "element" on an undefined value at /usr/lib/perl5/site_perl/5.8.8 ## /SOAP/Lite.pm line 3099. $soap1->proxy('https://my.site:8443/axis2/services/DBO.DBOHttpsSoap11Endpoint/'); $soap1->default_ns('http://my.site/xsd'); my $som = $soap1->call('getNetPoints'); print $som->result; ## this shows "NetPoint=HASH(0x9cce338)" print Dumper($som->result); ## this shows first 'NetPoint' blessed to hash.

So $som->result gives me just a one first item from valid result XML containing 2 items.
Result XML is next - there are 2 items (type NetPoint) in response:

<soapenv:Envelope> <soapenv:Body> <ns:getNetPointsResponse> <ns:return xsi:type="ax23:NetPoint"> <ax23:access2Dist>false</ax23:access2Dist> <ax23:date_Access2Dist>2010-11-26T00:00:00.000Z</ax23:date_Access2Dist> <ax23:date_Create2Path xsi:nil="true"/> <ax23:host xsi:nil="true"/> <ax23:noPack>1</ax23:noPack> <ax23:password>qwe123</ax23:password> <ax23:path xsi:nil="true"/> <ax23:sysIdABS>97.0</ax23:sysIdABS> <ax23:sysIdDBO>0.0</ax23:sysIdDBO> <ax23:type xsi:nil="true"/> <ax23:userName>mike-23</ax23:userName> <ax23:code xsi:type="ax23:ReturnCode"> <ax23:errorCode>0</ax23:errorCode> <ax23:errorMessage>Success</ax23:errorMessage> <ax23:errorMessageBase64>U3VjY2Vzcw==</ax23:errorMessageBase64> </ax23:code> </ns:return> <ns:return xsi:type="ax23:NetPoint"> <ax23:access2Dist>false</ax23:access2Dist> <ax23:date_Access2Dist xsi:nil="true"/> <ax23:date_Create2Path>2010-12-02T00:00:00.000Z</ax23:date_Create2Path> <ax23:host xsi:nil="true"/> <ax23:noPack>2</ax23:noPack> <ax23:password xsi:nil="true"/> <ax23:path>/usr/local/main</ax23:path> <ax23:sysIdABS>0.0</ax23:sysIdABS> <ax23:sysIdDBO>567.0</ax23:sysIdDBO> <ax23:type xsi:nil="true"/> <ax23:userName>mike-11</ax23:userName> <ax23:code xsi:type="ax23:ReturnCode"> <ax23:errorCode>0</ax23:errorCode> <ax23:errorMessage>Success</ax23:errorMessage> <ax23:errorMessageBase64>U3VjY2Vzcw==</ax23:errorMessageBase64> </ax23:code> </ns:return> </ns:getNetPointsResponse> </soapenv:Body> </soapenv:Envelope>

How can I get second 'NetPoint' item from this result XML?

P.S. SOAP-Lite-0.712
P.P.S. PHP gives me right typed result - hash 'return' => array[2] of NetPoint objects.
Direct Responses: Write a response