Hello, I am trying to connect to a WSDL, but I am having problems. Here is my code:
use SOAP::Lite +trace; use strict; my $client = SOAP::Lite ->readable(1) ->uri('http://somewebsite.net/RequestService/3?wsdl') ->proxy('http://somewebsite.net/RequestService/3?wsdl'); my $temp_elements = SOAP::Data ->name("CallDetails" => \SOAP::Data->value( SOAP::Data->name("first" => '8'), SOAP::Data->name("max" => '1'), SOAP::Data->name("provider" => 'homeFolderWin'), SOAP::Data->name("action" => 'bestMatch'), SOAP::Data->name("state" => 'PLACED')) ); my $response = $client->fetchAndLock($temp_elements);
----- Just some simple code to fetch one record. However, this is what the traces lists when I run the above program:
SOAPAction: "http://somewebsite.net/RequestService/3?wsdl#fetchAndLock +" <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instanc +e" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:S +OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/ +/www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xm +lsoap.org/soap/encoding/"> <SOAP-ENV:Body> <namesp1:fetchAndLock xmlns:namesp1="http://somewebsite.net/Reques +tService/3?wsdl"> <CallDetails> <first xsi:type="xsd:int">8</first> <max xsi:type="xsd:int">1</max> <provider xsi:type="xsd:string">homeFolderWin</provider> <action xsi:type="xsd:string">bestMatch</action> <state xsi:type="xsd:string">PLACED</state> </CallDetails></namesp1:fetchAndLock></SOAP-ENV:Body> </SOAP-ENV:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP::Response=HASH(0x3a3 +9974) SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 Internal Ser +ver Error
---------------- However, using SoapUI with the following code works:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel +ope/" xmlns:ns="http://myid.jpmchase.net/request/service/3"> <soapenv:Header/> <soapenv:Body> <ns:fetchAndLock> <ns:first>8</ns:first> <ns:max>1</ns:max> <ns:provider>homeFolderWin</ns:provider> <ns:action>bestMatch</ns:action> <ns:state>PLACED</ns:state> </ns:fetchAndLock> </soapenv:Body> </soapenv:Envelope>
------------------

What am I doing wrong? Any help would be greatly appreciated! Another question that I have is once I do get this working, how will I read the return code?

In reply to SOAP::Lite question by fritz1968

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.