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

More Header help

Expand Messages
  • Keith Jackson
    ... $soapheader=qq(
    Message 1 of 2 , Mar 16 10:06 AM
    • 0 Attachment
      I have this code that works:

      -----snip-----------
      $soapheader=qq(<SessionHeader xmlns="http://www.mymailout.net/WebService/SubscriberManager"><SessionID>$sessionID</SessionID><ServerUrl>$serverUrl</ServerUrl></SessionHeader>);

      $result = $soap_proxy->GetMailingLists(
          SOAP::Header->type('xml'=>$soapheader)
      );

      -----snip-----------

      I got that to work with ALOT of trail and (mostly) error.  Even though it works,  there must be a more "soap"ish way to do it.

      Any help would be appreciated.


      Yahoo! Mail
      Bring photos to life! New PhotoMail makes sharing a breeze.
    • Eric Bridger
      This might work: my $header = SOAP::Header - attr( { xmlns = http://www.mymailout.net/WebService/SubscribeManager } ) - name( SessionHeader =
      Message 2 of 2 , Mar 16 1:50 PM
      • 0 Attachment
        This might work:

        my $header = SOAP::Header
        ->attr(
        {'xmlns' =>
        'http://www.mymailout.net/WebService/SubscribeManager }
        )
        ->name( SessionHeader =>
        \SOAP::Data->value(
        SOAP::Data->name(SessionID => $sessionID),
        SOAP::Data->name(ServerUrl => $severUrl),
        )
        );

        $result = $soap_proxy->GetMailingLists($header);

        Eric

        You can use
        print $service->transport->http_request->content() . "\n";
        to see what the request XML looks like.


        On Thu, 2006-03-16 at 13:06, Keith Jackson wrote:
        > I have this code that works:
        >
        > -----snip-----------
        > $soapheader=qq(<SessionHeader xmlns="http://www.mymailout.net/WebService/SubscriberManager"><SessionID>$sessionID</SessionID><ServerUrl>$serverUrl</ServerUrl></SessionHeader>);
        >
        > $result = $soap_proxy->GetMailingLists(
        > SOAP::Header->type('xml'=>$soapheader)
        > );
        >
        > -----snip-----------
        >
        > I got that to work with ALOT of trail and (mostly) error. Even though it works, there must be a more "soap"ish way to do it.
        >
        > Any help would be appreciated.
        >
        >
        > ---------------------------------
        > Yahoo! Mail
        > Bring photos to life! New PhotoMail makes sharing a breeze.
      Your message has been successfully submitted and would be delivered to recipients shortly.