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

How can I add header info to Soap message when using -> service?

Expand Messages
  • mollyfud
    Hi All, I am a newbie and this might be a silly question but is there a way to add header info to a request when using SOAP::lite and the service function? I
    Message 1 of 2 , Nov 7, 2002
    • 0 Attachment
      Hi All,
      I am a newbie and this might be a silly question but is there a way
      to add header info to a request when using SOAP::lite and the service
      function?

      I use the following code but need to add header information:
      use SOAP::Lite;

      $soap = SOAP::Lite
      ->service('http://tstravel1/wsa/wsa1/wsdl?targetURI=urn:services-
      progress-com:samples:OrderInfo');

      print $soap -> on_debug(sub{print@_})
      -> Connect_OrderInfo(SOAP::Data->name(UserId
      => "admin"),SOAP::Data->name(password => "admin"),SOAP::Data->name
      (appServerInfo=> "admin")) ;

      print "\n";

      Have tried to use Soap::header but this doesn't make it work. Have
      seen some code that works if you use proxy and uri but haven't found
      anything with service.

      Any help appreciated.
      TIA
      Molly
    • Paul Kulchenko
      Hi Molly, ... Try to put them in the end of your parameters list: print $soap- method($param1, $param2, $header1, $header2); This limitation is planned to be
      Message 2 of 2 , Nov 8, 2002
      • 0 Attachment
        Hi Molly,

        > Have tried to use Soap::header but this doesn't make it work. Have
        Try to put them in the end of your parameters list:

        print $soap->method($param1, $param2, $header1, $header2);

        This limitation is planned to be removed.

        Best wishes, Paul.

        --- mollyfud <mollyfud@...> wrote:
        > Hi All,
        > I am a newbie and this might be a silly question but is there a way
        >
        > to add header info to a request when using SOAP::lite and the
        > service
        > function?
        >
        > I use the following code but need to add header information:
        > use SOAP::Lite;
        >
        > $soap = SOAP::Lite
        >
        > ->service('http://tstravel1/wsa/wsa1/wsdl?targetURI=urn:services-
        > progress-com:samples:OrderInfo');
        >
        > print $soap -> on_debug(sub{print@_})
        > -> Connect_OrderInfo(SOAP::Data->name(UserId
        > => "admin"),SOAP::Data->name(password => "admin"),SOAP::Data->name
        > (appServerInfo=> "admin")) ;
        >
        > print "\n";
        >
        > Have tried to use Soap::header but this doesn't make it work. Have
        > seen some code that works if you use proxy and uri but haven't
        > found
        > anything with service.
        >
        > Any help appreciated.
        > TIA
        > Molly
        >
        >
        > 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!?
        U2 on LAUNCH - Exclusive greatest hits videos
        http://launch.yahoo.com/u2
      Your message has been successfully submitted and would be delivered to recipients shortly.