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

Attribute for header

Expand Messages
  • hmenon_1999
    Hello I am using SOAP::Lite to connect to a client that requires me to first create a session and then use a session ID as part of the header (But please take
    Message 1 of 4 , Sep 19 6:50 AM
    • 0 Attachment
      Hello

      I am using SOAP::Lite to connect to a client that requires me to
      first create a session and then use a session ID as part of the
      header (But please take a look below)

      The envelope needs to be like:

      <SOAP-ENV:Header sessionid="2323.1223">
      </SOAP-ENV:Header>
      <SOAP-ENV:Body>
      ....
      ....
      </SOAP-ENV:Body>

      As shown above the sessionid is not a seperate header element, but an
      attribute to the SOAP-ENV:Header element.

      I am new to SOAP:Lite and is having some trouble generating such an
      envelope. I am able to add new header elements with SOAP::Header, but
      am not able to add an attribute to the main header element. Any help
      would be greatly appreciated.

      Thanks in advance
      menon
    • Randy J. Ray
      ... This actually goes against the SOAP specification. The writers of the server should be taken to task for this, and required to implement this as a header
      Message 2 of 4 , Sep 19 12:47 PM
      • 0 Attachment
        On 2002.09.19 06:50 hmenon_1999 wrote:

        > I am using SOAP::Lite to connect to a client that requires me to
        > first create a session and then use a session ID as part of the
        > header (But please take a look below)
        >
        > The envelope needs to be like:
        >
        > <SOAP-ENV:Header sessionid="2323.1223">
        > </SOAP-ENV:Header>
        > <SOAP-ENV:Body>
        > ....
        > ....
        > </SOAP-ENV:Body>
        >
        > As shown above the sessionid is not a seperate header element, but an
        > attribute to the SOAP-ENV:Header element.

        This actually goes against the SOAP specification. The writers of the server
        should be taken to task for this, and required to implement this as a header
        child-element. A strict validating parser will not accept this attribute for
        Header.

        Randy
        --
        rjray@... Linux: Because rebooting is for adding new hardware.

        Any spammers auto-extracting addresses from this message will definitely want
        to include uce@... and report@...
      • hmenon_1999
        Thanks for the information. I did not know that this violated SOAP specification..! But the problem is that I cannot get the server writers to change this for
        Message 3 of 4 , Oct 7, 2002
        • 0 Attachment
          Thanks for the information. I did not know that this violated SOAP
          specification..!

          But the problem is that I cannot get the server writers to change
          this for quite some time to come.. So I am stuck with this behaviour
          for the time being.. Also current clients are managing to achieve
          this by using MS-SOAP toolkit. I would like to do the same with
          SOAP::Lite..

          So would it possible given SOAP::Lite's flexibility to do so (even if
          it may not be fully correct)?

          Thanks & Regards
          hmenon
        • Paul Kulchenko
          Hi hmenon, ... I would say yes. You can override SOAP::Serializer class and add anything you want to the Header element. Just keep in mind it s against the
          Message 4 of 4 , Oct 28, 2002
          • 0 Attachment
            Hi hmenon,

            > So would it possible given SOAP::Lite's flexibility to do so (even
            > if it may not be fully correct)?

            I would say yes. You can override SOAP::Serializer class and add
            anything you want to the Header element. Just keep in mind it's
            against the spec.

            BEGIN {
            package MySerializer; use vars qw(@ISA); @ISA = 'SOAP::Serializer';

            sub xmlize {
            $_[1]->[1]->{foo} = 'bar' if $_[1]->[0] =~ /:Header$/;
            shift->SUPER::xmlize(@_);
            }
            }

            Best wishes, Paul.

            --- hmenon_1999 <hmenon_1999@...> wrote:
            > Thanks for the information. I did not know that this violated SOAP
            > specification..!
            >
            > But the problem is that I cannot get the server writers to change
            > this for quite some time to come.. So I am stuck with this
            > behaviour
            > for the time being.. Also current clients are managing to achieve
            > this by using MS-SOAP toolkit. I would like to do the same with
            > SOAP::Lite..
            >
            > So would it possible given SOAP::Lite's flexibility to do so (even
            > if
            > it may not be fully correct)?
            >
            > Thanks & Regards
            > hmenon
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            >
            > To unsubscribe from this group, send an email to:
            > soaplite-unsubscribe@yahoogroups.com
            >
            >
            >
            > Your use of Yahoo! Groups is subject to
            > http://docs.yahoo.com/info/terms/
            >
            >


            __________________________________________________
            Do you Yahoo!?
            HotJobs - Search new jobs daily now
            http://hotjobs.yahoo.com/
          Your message has been successfully submitted and would be delivered to recipients shortly.