tryingHard has asked for the wisdom of the Perl Monks concerning the following question:

k, been at this all day, still not getting any further than

405 Method Not Allowed at C:\JumpPoint\informEMT.pl line 7.
or sometimes...
404 Not Found at C:\JumpPoint\informEMT.pl line 8.


I have been given this code to do a soap "ping"

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ping='http://xmlschema.tmi.somewhere.com/xsd/Enterprise/BaseTypes/types/ping_v1'>
<soapenv:Header/>
<soapenv:Body>
<ping:ping/>
</soapenv:Body>
</soapenv:Envelope>


how do I use soap::lite to make this query and get a response. after eight hours, I was beginning to think the server was down, but have been assured its up.

Rather than go through my pages of failed attempts, can someone post me something that should work?

Replies are listed 'Best First'.
Re: wsdl 2 soap::lite
by ww (Archbishop) on Jun 23, 2015 at 01:34 UTC

    Sorry; giving you "something that should work" is not the way it works here. Someone may do so, but the essence of PM's raison d'être is to help you learn. Your gimmé doesn't appear to be an attempt to learn.

    Second, it's polite to read the instructions -- in this case, those around the text-entry box where you created your request:

    In brief, use code tags,  <c> ... </c>, around data, as well as code.

    Update (thanx, kcott!): ê typo fixed.


    check Ln42!

      k, added two of the more promising code samples.
Re: wsdl 2 soap::lite
by Anonymous Monk on Jun 23, 2015 at 01:33 UTC
    Can you show your code?
Re: wsdl 2 soap::lite
by tryingHard (Initiate) on Jun 23, 2015 at 13:50 UTC
    #!/usr/local/bin/perl use SOAP::Lite; <c> print SOAP::Lite ->uri("http://xmlschema.tmi.telus.com/xsd/Enterprise/BaseTypes/typ +es/ping_v1/") ->proxy("http://schemas.xmlsoap.org/soap/envelope/") ->ping ->result;
    results:
    405 Method Not Allowed at C:\JumpPoint\informEMT.pl line 7.
      schemas.xmlsoap.org provides no ping service, an xml namespace is not a proxy, is not an endpoint, you don't try to connect to it
Re: wsdl 2 soap::lite
by tryingHard (Initiate) on Jun 23, 2015 at 13:57 UTC
    #!/usr/local/bin/perl use soap::wsdl; my $url_of_wsdl = undef; my $result = undef; my $url_of_wsdl = "<soapenv:Envelope xmlns:soapenv='http://schemas.xml +soap.org/soap/envelope/' xmlns:ping='http://xmlschema.tmi.somemajorco +mpany.com/xsd/Enterprise/BaseTypes/types/ping_v1'> <soapenv:Header/> <soapenv:Body> <ping:ping/> </soapenv:Body> </soapenv:Envelope>"; my $client = SOAP::WSDL->new(wsdl => $url_of_wsdl); my $result = $client->$method(@arguments);
    results:
    URL must be absolute at C:\JumpPoint\informEMT.pl line 14.

      my $url_of_wsdl = "<soapenv:Envel....URL must be absolute at C:\JumpPoint\informEMT.pl line 14.

      XML is not a URL

      Also, https://www.wsdl-analyzer.com/ says that isn't a valid WSDL document

Re: wsdl 2 soap::lite
by tryingHard (Initiate) on Jun 23, 2015 at 14:48 UTC
    latest attempt, now with Trace!
    #!/usr/local/bin/perl<br> print "cooking with soap\n";<br> use SOAP::Lite +trace;<br> #use SOAP::Lite;<br> <br> my $soap = SOAP::Lite<br> ->uri("ping=http://xmlschema.tmi.niceCorp.com/xsd/Enterprise/BaseTypes +/types/ping_v1/")<br> ->proxy("http://schemas.xmlsoap.org/soap/envelope/")<br> ->result;<br> <br> print "Calling Ping...\\n";<br> print $soap->Ping()->result;<br> print "done.\\n";<br>

    results:

    SOAPAction: "ping=http://xmlschema.tmi.niceCorp.com/xsd/Enterprise/BaseTypes/types/ping_v1/#result"

    <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schem as.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns: xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><result xmlns="ping=http://xmlschema.tmi.niceCorp.com/xsd/Enterprise/BaseTypes/types /ping_v1/" xsi:nil="true" /></soap:Body></soap:Envelope>
    SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x2c7eeec)
    SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 405 Method Not Allowed
    Connection: close

    ...

    The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
    SOAP::Deserializer::deserialize: ()