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

3028Namespaces in Header

Expand Messages
  • djnym2002
    Sep 26, 2003
    • 0 Attachment

      I'm attempting to add a custom header in a client which implements the
      WS-Security specification. I've been following the example in
      "Programming Web Services With Perl" pg 284 and am confused with
      the output.

      Basically I would like xml formed like that listed earlier on that
      page, so something like


      The example says to use something like

      my $header = SOAP::Header->name(Security => {
      UsernameToken => {
      Username => SOAP::Data->type('' => 'Foo'),
      Password => SOAP::Data->type('' => 'Bar'),

      But that relies on a default namespace, so I changed the prefix value
      to wsse, but that only seemed to effect the 'Security' tag, in other
      words the outermost tag. I've been trying various things to get the
      xml to look correct but haven't quite hit on it yet. Is this
      something that I should use XML::Writer for, or does anyone know how
      this is done in SOAP::Lite? Also, does anyone know the reason that
      setting the prefix at the outermost level doesn't work?