SOAP::Lite Headers

J

Jeremy

Howdy,

Using SOAP::Lite, I know how to add headers to each request, but it it
possible to configure a connection to pass the same headers on ALL
requests so that I don't have to include the headers every time?

Here's what I have now:

<code>
my @headers =
(SOAP::Header->name("email")->value($email)->uri($namespace)->prefix("impl"),
SOAP::Header->name("password")->value($password)->uri($namespace)->prefix("impl"));
# Set up the connection to the server.
my $service = SOAP::Lite->service($url);
$service->someFunction($parameter,@headers);
</code>

What I would like to have is:
<code>
my @headers =
(SOAP::Header->name("email")->value($email)->uri($namespace)->prefix("impl"),
SOAP::Header->name("password")->value($password)->uri($namespace)->prefix("impl"));
# Set up the connection to the server.
my $service = SOAP::Lite->service($url);
$service->headers = @headers; ### This is the line that I can't figure
out how to write...
$service->someFunction($parameter);
</code>

Any idea how to create that headers line above correctly or how to
simulate that functionality?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top