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

RE: [soaplite] Serializing an array of data

Expand Messages
  • Andy Kelk
    Hi, Have managed to solve my own problem after a good night s sleep and a bit more trying. Adjusted Code snippet follows: my $soap = SOAP::Lite -
    Message 1 of 2 , Jan 30, 2003
    • 0 Attachment
      Hi,

      Have managed to solve my own problem after a good night's sleep and a
      bit more trying.


      Adjusted Code snippet follows:

      my $soap = SOAP::Lite
      -> uri('http://..../Test')
      -> proxy('http://.....');

      my @products;
      my @categories;
      my $data;

      $categories[0] = SOAP::Data->name(category => '1066');
      $categories[1] = SOAP::Data->name(category => '1020');

      $products[0] = SOAP::Data
      ->name(product => SOAP::Data
      ->name("categoryElements")
      ->value(\SOAP::Data->value(@categories));
      ->attr({sku => 'Test'});

      my $data = SOAP::Data
      ->name(SOAP::Data->name(skuElements => \SOAP::Data->type(array =>
      @products)));

      print $soap
      -> TestFunction($data)
      -> result;


      --
      Andy Kelk
      Head of Integration, Venda
      andy@...
    Your message has been successfully submitted and would be delivered to recipients shortly.