equick has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I am trying to call a webservice over https using SOAP::Lite with the following code:
This creates a soap request header like this:#!/usr/bin/perl use SOAP::Lite +trace ; use Data::Dumper; my $soap = SOAP::Lite ->proxy('https://certificatemanager.comodo.com:443/ws/EPKIManagerS +SL') ->uri('https://certificatemanager.comodo.com:443/ws/EPKIManagerSSL +'); my $method = SOAP::Data->name('getWebServiceInfo'); if($response->fault){ print $response->faultcode, " ", $response->faultstring, "\n"; die 'Terminating program'; }else{ my @results=@{$response->result}; print Dumper @results; }
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <getWebServiceInfo/> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
but that fails with the message:
I tested the service in soapUI and that worked fine with the following request header:<faultstring>Cannot find dispatch method for {}getWebServiceInfo</faul +tstring>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:ssl="http://ssl.ws.epki.comodo.com/"> <soapenv:Header/> <soapenv:Body> <ssl:getWebServiceInfo/> </soapenv:Body> </soapenv:Envelope>
The issue I found was the absence of ssl: before the method call in the request header. Does anyone know how to fix this?
Thanks for any help
Ed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: soap::lite request header
by charlesboyo (Beadle) on Aug 11, 2011 at 12:16 UTC | |
by equick (Acolyte) on Aug 11, 2011 at 13:05 UTC | |
by charlesboyo (Beadle) on Aug 11, 2011 at 13:27 UTC | |
by equick (Acolyte) on Aug 11, 2011 at 13:36 UTC |