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

Re: [soaplite] How to send a serialized SOAP request and reply?

Expand Messages
  • Paul Kulchenko
    Hi, Weidong! Exactly :)). Just keep in mind that as per SOAP spec Header elements must be namespace qualified and to achive that you need to add
    Message 1 of 2 , Jul 11, 2001
    • 0 Attachment
      Hi, Weidong!

      Exactly :)). Just keep in mind that as per SOAP spec Header elements
      must be namespace qualified and to achive that you need to add
      ->uri('MyOwnNamespace') to your headers:

      SOAP::Header
      ->name(info)
      ->type('ordered_hash' => [action => 'request', id => '1234567890'])
      ->uri('MyOwnNamespace')
      ;

      esp., if you plan to exchange messages with other toolkits.

      Best wishes, Paul.

      --- Weidong Wang <wwang@...> wrote:
      > OK, I figured it out. Really itis quite simple! Just make the call
      > by adding the extra header element and body element as part of the
      > parameter lists, like:
      >
      > $result = $soap->searchQueues(
      > SOAP::Header->name(info)->type('ordered_hash' =>
      > [action => 'request', id => '1234567890']),
      > SOAP::Header->name(requestHeader)->type('ordered_hash'
      > => [serviceClass => 'QueueingService', method => 'searchQueues']),
      > $pattern,
      > SOAP::Data->name(myType)->type('ordered_hash' => [a =>
      > 1, b => 2]));
      >
      > I got the same to work with the reply message as well. Really nice,
      > Paul!
      >
      >
      > ----- Original Message -----
      > From: Weidong Wang
      > To: soaplite@yahoogroups.com
      > Sent: Wednesday, July 11, 2001 11:36 AM
      > Subject: Re: [soaplite] How to send a serialized SOAP request?
      >
      >
      > Thanks for the reply, Paul.
      >
      > How do I add header and other elements to body and still use the
      > normal call convention?
      > Is it to use addheader()? Can you provide an example for using
      > it?
      > Also, how to add body fields?
      >
      > Thanks.
      >
      > Weidong
      >
      > ----- Original Message -----
      > From: Paul Kulchenko
      > To: soaplite@yahoogroups.com
      > Sent: Tuesday, July 10, 2001 6:09 PM
      > Subject: Re: [soaplite] How to send a serialized SOAP request?
      >
      >
      > Hi, Weidong!
      >
      > --- Weidong Wang <wwang@...> wrote:
      > > Since I need to define my own SOAP Header and have user
      > defined
      > > data fields in the body, I turn to Serializer->envelope() to
      > > generate a serialized SOAP request. That works fine.
      > You don't need to. You can add SOAP Headers and user defined
      > fields
      > and objects and still should be able to reuse everything else.
      >
      > > But I can't find a way to send such already serialized
      > request over
      > > to the server. I suppose I still need to set uri() and
      > proxy(), but
      > > how do I make the call? I tried using call(), but it is
      > trying to
      > > serialize again.
      > But if you still need it, then you need to call send_receive
      > method
      > (it's common for all transports, so you don't need to worry
      > about
      > transport level) and pass parameters there. Take a look into
      > call()
      > method that does it. Be prepared however that this interface is
      > not
      > documented and will change in future versions. I promise :)
      >
      > Let me know if you need more information.
      >
      > Best wishes, Paul.
      >
      > __________________________________________________
      > Do You Yahoo!?
      > Get personalized email addresses from Yahoo! Mail
      > http://personal.mail.yahoo.com/
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service.
      >
      >
      > To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      >
      >
      >
      > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service.
      >
      >


      __________________________________________________
      Do You Yahoo!?
      Get personalized email addresses from Yahoo! Mail
      http://personal.mail.yahoo.com/
    Your message has been successfully submitted and would be delivered to recipients shortly.