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

ordered_hash + attr problem

Expand Messages
  • sherwln
    Hi! Can somebody tell me why _attr_ in my first SOAP::Lite code doesn t show in the soap request. use SOAP::Lite +trace = all ; my $soap = SOAP::Lite -
    Message 1 of 2 , Jan 20, 2002
    • 0 Attachment
      Hi!
      Can somebody tell me why _attr_ in my first
      SOAP::Lite code doesn't show in the soap request.

      use SOAP::Lite +trace => 'all';
      my $soap = SOAP::Lite
      -> uri('urn:My/Parameters')
      -> proxy('http://tempuri.org/mod_soap');
      print $soap->call(SOAP::Data
      ->name('m:addheader')
      ->attr({'xmlns:m' => 'urn:My/Parameters'}),

      # attr here doesn't work
      SOAP::Data->name(FileURL =>
      SOAP::Data->type(ordered_hash => [
      File => 'file1',
      File => 'file2'
      ])
      )->attr({baseurl => 'http://webserver/dload'}),

      # attr here works
      # SOAP::Data->name(FileURL =>
      # [
      # SOAP::Data->name(
      # File => 'file1'),
      # SOAP::Data->name(
      # File => 'file2')
      # ]
      # )->attr({baseurl => 'http://webserver/dload'}),
      )->result;
    • Duncan Cameron
      I think that your syntax was slightly awry, try this SOAP::Data- name( FileURL )- type(ordered_hash = [ File = file1 , File = file2 ]) - attr({baseurl =
      Message 2 of 2 , Jan 20, 2002
      • 0 Attachment
        I think that your syntax was slightly awry, try this

        SOAP::Data->name('FileURL')->type(ordered_hash => [
        File => 'file1',
        File => 'file2'
        ])
        ->attr({baseurl => 'http://webserver/dload'}),



        Regards,
        Duncan Cameron

        On 2002-01-20 sherwln <sherwln@...> wrote:
        >Hi!
        >Can somebody tell me why _attr_ in my first
        >SOAP::Lite code doesn't show in the soap request.
        >
        >use SOAP::Lite +trace => 'all';
        >my $soap = SOAP::Lite
        > -> uri('urn:My/Parameters')
        > -> proxy('http://tempuri.org/mod_soap');
        >print $soap->call(SOAP::Data
        > ->name('m:addheader')
        > ->attr({'xmlns:m' => 'urn:My/Parameters'}),
        >
        ># attr here doesn't work
        > SOAP::Data->name(FileURL =>
        > SOAP::Data->type(ordered_hash => [
        > File => 'file1',
        > File => 'file2'
        > ])
        > )->attr({baseurl => 'http://webserver/dload'}),
        >
        ># attr here works
        ># SOAP::Data->name(FileURL =>
        ># [
        ># SOAP::Data->name(
        ># File => 'file1'),
        ># SOAP::Data->name(
        ># File => 'file2')
        ># ]
        ># )->attr({baseurl => 'http://webserver/dload'}),
        >)->result;
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.