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!
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!