Setting header in request message when using WSDL document
- I am using a WSDL document and the service() method to bind to a Web
Service rather than the uri/proxy methods. I need to extract the
SOAP header I received as a response from one operation and pass it
as the header of the request for the next operation.
As suggested in a previous message, I am getting the SOM for the
response by calling the call method, $client->call(), to get the SOM
object for the just executed operation. Once I have the SOM I am
using headersof() to get the SOAP::Header object.
So my question is how do I set the header for the outgoing request?
When using the uri/proxy approach, I simply passed the SOAP::Header
object in is as the 1st argument to the operation that I want to call
on the remote Web Service. However, when using the service method
approach, if I pass in the header as the 1st argument to the Web
Service operation, SOAP::Lite places the contents of the SOAP::Header
object in the Body element eventhough that conflicts with the schema
for the message as reflected in the WSDL.
Thanks in advance for your help.