Hi I'm trying to write a soap client using soap::lite that make use of a .wsdl file,
I've looked at some examples and have been able to get a response.
The problem I'm having is that what gets returned is an array of objects and I don't how to get the info out.
If i print what comes back from the call i get this ::workorders=HASH(0x21054dc).
How do I convert this into a perl object that I can query, I've looked at using SOAP::Data and SOAP::Data::ComplexType
but I'm not sure of where to start.
The code that i run looks like this
use SOAP::Lite; my $input = SOAP::Data->name('SCID') ->value('2634244'); my $workorder = SOAP::Lite->service('http://vspclearcbuild.vodacom.cor +p/clearquest/byServiceCallID.WSDL') -> byServiceCallID($input); print "$workorder\n";\n
The Section of the wsdl that defines what I get back is this part
<xsd:complexType name="__workorders"> <xsd:sequence> <xsd:element name="workorder" nillable="true" type="tns:ArrayOf__worko +rder"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="__workorder"> <xsd:sequence> <xsd:element name="oid" nillable="true" type="xsd:string"/> <xsd:element name="id" nillable="true" type="xsd:string"/> <xsd:element name="description" nillable="true" type="xsd:string" +/> <xsd:element name="assignToPerson" nillable="true" type="xsd:stri +ng"/> <xsd:element name="assignToWG" nillable="true" type="xsd:string"/ +> <xsd:element name="information" nillable="true" type="xsd:string" +/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ArrayOf__workorder"> <xsd:complexContent> <xsd:restriction base="SOAP_ENC:Array"> <xsd:attribute ref="SOAP_ENC:arrayType" wsdl:arrayType="tns:__wo +rkorder[]"/> </xsd:restriction> </xsd:complexContent> </xsd:complexType>

In reply to Struggling with SOAP::Lite by ismaeljgm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.