I have setup web service requests using SOAP::Lite. I include the following entries which have been assigned, like the uri, protocol, fully qualified dns name, port, path, realm and pw. I also assign header information
eval {
my $soap = SOAP::Lite->new(
uri => $self->{uri},
proxy => [
"$self->{protocol}://$self->{fqdn}:$self->{port}$self->{path}",
credentials => ["$self->{fqdn}:$self->{port}",$self->{realm},$self->{id}=>$self->{pw}],
timeout => $self->{timeout}
],
on_fault => sub {
my($soap, $res) = @_;
die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
}
);
$soap->autotype(0);
$soap->outputxml(1);
my @params;
$self->set_headers(\@params);
push @params, $self->make_element($_, $self->{method_params}->{$_}) for sort keys %{$self->{method_params}};
my $data = SOAP:
ata->name($self->{method_name})->attr($self->{method_attr});
$self->{content} = $soap->call($data => @params);
$self->{request} = $soap->serializer->envelope(method => $data, @params);
this works. i am able to send this soap request. But here is my dilemna now. The new soap request I need to build includes a wsdl file. Can someone help me code how to use perl to build the request with the wsdl file. I think it would be something like:
eval {
my $soap = SOAP::Lite->new(
service => 'file:/my path to wsdl file/wsdlfile.wsdl',
but then i need to add security headers like above and send the request. I don't know how to code that. Anybody can help?