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

Java-->SOAP::Lite Serialization Question

Expand Messages
  • gwzoller
    Hello... I m working to try to get SOAP::Lite clients to work with GLUE servers. I have a simple call to a Java server that passes a Vector. A Java/GLUE
    Message 1 of 1 , Sep 5, 2002
    • 0 Attachment
      Hello...

      I'm working to try to get SOAP::Lite clients to work
      with GLUE servers.

      I have a simple call to a Java server that passes a
      Vector. A Java/GLUE client sends this XML:

      <ns0:showList xmlns:ns0='http://tempuri.org/Server'
      xmlns:ns1='http://www.themindelectric.com/collections/'>
      <list id='id0' xsi:type='ns1:Vector'>
      <elements id='id1' xsi:type='soapenc:Array'
      soapenc:arrayType='xsd:anyType[3]'>
      <i xsi:type='xsd:string'>one</i>
      <i xsi:type='xsd:string'>two</i>
      <i xsi:type='xsd:string'>three</i>
      </elements>
      </list>
      </ns0:showList>

      Simple enough. But my SOAP::Lite client sends this:

      <namesp1:showList xmlns:namesp1="http://tempuri.org/Server">
      <elements SOAP-ENC:arrayType="xsd:string[4]"
      xsi:type="SOAP-ENC:Array">
      <item xsi:type="xsd:string">John</item>
      <item xsi:type="xsd:string">Ringo</item>
      <item xsi:type="xsd:string">Paul</item>
      <item xsi:type="xsd:string">George</item>
      </elements>
      </namesp1:showList>

      As you can see, I'm missing the <list> tag for some
      reason. Here's my SOAP::Lite client code:

      my @beatles = qw(John Ringo Paul George);
      my $elements = SOAP::Data->type('Array' => [ map
      {SOAP::Data->name(item => $_)->type('string')} @beatles
      ])->name('elements');
      my $vector =
      SOAP::Data->type('http://www.themindelectric.com/collections/:Vector'
      => $elements)->name('list');
      $server->showList( $vector );

      For some reason my attempt to make the 'list' tag never
      made it to the output XML. Here's a snippet from Server.pm
      generated by stubmaker:

      showList => {
      endpoint => 'http://192.168.3.6:9004/glue/urn:test',
      soapaction => 'showList',
      uri => 'http://tempuri.org/Server',
      parameters => [
      SOAP::Data->new(name => 'list', type =>
      'http://www.themindelectric.com/collections/:Vector', attr => {}),
      ],
      },

      Any help would be greatly appreciated!
      Greg
    Your message has been successfully submitted and would be delivered to recipients shortly.