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

Re: [soaplite] Re: SOAP Headers

Expand Messages
  • Duncan Cameron
    ... SOAP::Header works the same way as SOAP::Data, so the same way of specifying a namespace for the item will apply SOAP::Header- name(foo =
    Message 1 of 4 , Feb 2, 2005
    • 0 Attachment
      At 2005-02-02, 00:21:53 ghostwhoowalks <ghostwhoowalks@...> wrote:

      >
      >
      >How do I bind 'foo' the element name with a namespace ? I need my
      >element in the Header to look like myns:foo where myns is
      >http://blah.com .
      >
      >Thanks
      >A
      SOAP::Header works the same way as SOAP::Data, so the same way of specifying a namespace for the item will apply

      SOAP::Header->name(foo => 'bar')->uri('http://blah.com')->prefix('myns')

      Here's an easy way of seeing what S::L will generate without actually sending anything
      =====================
      use strict;
      use SOAP::Lite;

      my $soap = SOAP::Lite
      ->proxy('http://sasdd')
      ->uri('http://tempuri.org/')
      ;
      $soap->serializer->readable(1);
      print $soap->serializer->envelope(
      'method',
      'somemethod',
      'abc',
      SOAP::Header->name(foo => 'bar')->uri('http://blah.com')->prefix('p')
      );
      ============================
      >
      >--- In soaplite@yahoogroups.com, "Duncan Cameron"
      ><duncan_cameron2002@y...> wrote:
      >> On 2005-02-01 at 21:13:40 ghostwhoowalks wrote:
      >>
      >> >How do I create SOAP Headers in the client side if my WS API
      >> >requires certain SOAP Headers to be present in the SOAP Envolope ?
      >> >
      >> Add SOAP::Header objects as extra parameters to your method call,
      >e.g.
      >>
      >> $soap->method(SOAP::Header->name('foo', 123), ...
      >>

      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.