Hi

I am trying to call a webservice over https using SOAP::Lite with the following code:

#!/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; }
This creates a soap request header like this:
<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:

<faultstring>Cannot find dispatch method for {}getWebServiceInfo</faul +tstring>
I tested the service in soapUI and that worked fine with the following request header:
<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.


In reply to soap::lite request header by equick

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.