Loading ...
Sorry, an error occurred while loading the content.

SOAP::SOM and multirefs (WS-I base profile app problem)

Expand Messages
  • Byrne Reese
    I am interacting with IBM s implementation of the WS-I base profile sample implementation... essentially an Axis Web service. The question is: how can I
    Message 1 of 2 , Mar 3, 2003
    • 0 Attachment
      I am interacting with IBM's implementation of the WS-I base profile
      sample implementation... essentially an Axis Web service.

      The question is: how can I produce output that iterates over each
      "product?" Nothing seems to work.

      Some previous emails suggest this is a bug with Axis and I can fix it in
      Axis by turning off inline multirefs. However, I can't tell IBM to do
      that. I need to fix it on my end...

      I would expect something like this to work:

      for my $t ($som->valueof('[any permutation]')) {
      print $t->{'itemName'} . " - " . $t->{'unitPrice'} . "\n";
      }

      The response looks like this (I took out namespaces for brevity):

      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope>
      <soapenv:Body>
      <ns1:getCatalogResponse>
      <Result href="#id0"/>
      </ns1:getCatalogResponse>
      <multiRef id="id0" soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns2:Catalog">
      <products xsi:type="soapenc:Array"
      soapenc:arrayType="ns2:Product[10]">
      <item href="#id1"/>
      <item href="#id2"/>
      <item href="#id3"/>
      <item href="#id4"/>
      <item href="#id5"/>
      <item href="#id6"/>
      <item href="#id7"/>
      <item href="#id8"/>
      <item href="#id9"/>
      <item href="#id10"/>
      </products>
      </multiRef>
      <multiRef id="id8" soapenc:root="0"
      soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xsi:type="ns3:Product"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
      <itemNumber xsi:type="xsd:string">1008</itemNumber>
      <itemName xsi:type="xsd:string">40 GB Disk Drive</itemName>
      <unitOfMeasure xsi:type="xsd:string">EACH</unitOfMeasure>
      <unitPrice xsi:type="xsd:decimal">200.00</unitPrice>
      </multiRef>
      ...
      </soapenv:Body>
      </soapenv:Envelope>

      --
      Byrne Reese <breese@...>
      Grand Central Communications
    • Martin Hajduch
      ... could you post more details ? i m not sure if i m completely with you ... ... there is no need to do so i m having axis server and perl client exchanging
      Message 2 of 2 , Mar 3, 2003
      • 0 Attachment
        > The question is: how can I produce output that iterates over each
        > "product?" Nothing seems to work.

        could you post more details ? i'm not sure if i'm completely with you ...

        > Some previous emails suggest this is a bug with Axis and I can fix it in
        > Axis by turning off inline multirefs. However, I can't tell IBM to do

        there is no need to do so
        i'm having axis server and perl client exchanging complex datatypes, axis
        server is sending multirefs and there is no problem with it (on client
        side - which is perl)

        > <ns1:getCatalogResponse>
        > <Result href="#id0"/>
        > </ns1:getCatalogResponse>

        you are going to get a reference to CatalogResponse object (?!?),
        which should contain an array:

        > <multiRef id="id0" soapenc:root="0"
        > <products xsi:type="soapenc:Array"
        > soapenc:arrayType="ns2:Product[10]">

        and this array should contain reference to hash:

        > <multiRef id="id8" soapenc:root="0"
        > soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        > xsi:type="ns3:Product"
        > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
        > <itemNumber xsi:type="xsd:string">1008</itemNumber>
        > <itemName xsi:type="xsd:string">40 GB Disk Drive</itemName>
        > <unitOfMeasure xsi:type="xsd:string">EACH</unitOfMeasure>
        > <unitPrice xsi:type="xsd:decimal">200.00</unitPrice>
        > </multiRef>

        or something similar
        use perl's 'ref' command to determine the right structure

        regards,
        martin
      Your message has been successfully submitted and would be delivered to recipients shortly.