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

645Re: Help needed: sending complex structures

Expand Messages
  • adrian@cheerful.com
    Jul 17, 2001
      My app is a client, btw... can't use return.

      --- In soaplite@y..., adrian@c... wrote:
      > Hi,
      >
      > I need to show a soap packet like:
      >
      > <soap:Header>
      > <types:AuthenticationHeader>
      > <Key xsi:type="xsd:string">string</Key>
      > <Type xsi:type="xsd:string">string</Type>
      > </types:AuthenticationHeader>
      > </soap:Header>
      > <soap:Body
      > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      > <tns:GetSimpleQuote>
      > <realtime xsi:type="xsd:boolean">boolean</realtime>
      > <tickers href="#id1" />
      > </tns:GetSimpleQuote>
      > <soapenc:Array id="id1" soapenc:arrayType="xsd:string[2]">
      > <Item>string</Item>
      > <Item>string</Item>
      > </soapenc:Array>
      >
      > I tried using a hash for the AuthenticationHeader, and an Array
      for
      > the Array at the end. I get:
      >
      > <SOAP-ENV:Header>
      > <AuthenticationHeader
      > xsi:type="xsd:string">Type</AuthenticationHeader>
      > <AuthenticationHeader xsi:type="xsd:string">(type value)
      > </AuthenticationHeader>
      > <AuthenticationHeader
      > xsi:type="xsd:string">Key</AuthenticationHeader>
      > <AuthenticationHeader xsi:type="xsd:string">(key value)
      > </AuthenticationHeader>
      > </SOAP-ENV:Header>
      > <SOAP-ENV:Body>
      > <namesp4:GetSimpleQuote
      > xmlns:namesp4="http://logon.earthconnect.net/">
      > <realtime xsi:type="xsd:boolean">true</realtime>
      > <Array xsi:type="namesp3:array">array_item_1</Array>
      > <Array xsi:type="namesp3:array">array_item_2</Array>
      > </namesp4:GetSimpleQuote>
      >
      > so, problem is that the hash serialized into a bunch of strings
      > (instead of a "struct") and the array at the end serialized
      > incorrectly.
      >
      > %header=('Key',"$key",'Type',"$type");
      > @symbols=($symbol, "IBM");
      > $var1 = SOAP::Data->type(boolean => false)->name('realtime');
      > $var2 = SOAP::Data->type(array => @symbols)->name('Array');
      > my $a = $s -> GetSimpleQuote($var1, $var2,SOAP::Header->name
      > ('AuthenticationHeader' => %header));
      >
      > What am I doing wrong?
      >
      > Thanks,
      > Adrian
    • Show all 10 messages in this topic