Hello peeps,
I've looked at the SOAP documentation and I cannot understand it.
I need to make a soap request with an XML file and capture the returned data and process it. it's for an auto-login system to integrate with a product provider.
They have sent me an example XML file and some Visual Studio VB code, but I use perl and so it means nothing to me.
Can anyone help?
here is the XML template.
ok so I can make a variable equal the required data, but i'm stumped at how I make a SOAP request.
I've been told I need to send that data to a specific URL and call their ‘logintoken01’ method, I will then get returned either an error or an XML file which I will then need to parse.
I understand the principle of all this , just need help with syntax, so appreciate everyones input.
so far I have..
now this is based on reading the CPAN documentation, i'm asuming I need to change the
to
or is this wrong?
and I don't understand how I pass in the rerquired XML data.
do I put that between the brackets of the method call? so I could do
all help understanding what i'm doing is appreciated.
regards, 1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
I've looked at the SOAP documentation and I cannot understand it.
I need to make a soap request with an XML file and capture the returned data and process it. it's for an auto-login system to integrate with a product provider.
They have sent me an example XML file and some Visual Studio VB code, but I use perl and so it means nothing to me.
Can anyone help?
here is the XML template.
Code:
<soap:envelope xmlns:soap="urn:schemas-xmlsoap-org:soap.v1">
<soap:header xmlns:matrix="[URL unfurl="true"]http://myurl"[/URL] soap:encodingStyle="[URL unfurl="true"]http://www.w3.org/2001/12/soap-encoding">[/URL]
<matrix:system>
<username>myid</username>
<password>mypassword</password>
</matrix:system>
</soap:header>
<soap:body xmlns:soap='[URL unfurl="true"]http://schemas.xmlsoap.org/soap/envelope/'[/URL] soap:encodingStyle="[URL unfurl="true"]http://www.w3.org/2001/12/soap-encoding">[/URL]
<query>
<url>/</url>
</query>
</soap:body>
</soap:envelope>
I've been told I need to send that data to a specific URL and call their ‘logintoken01’ method, I will then get returned either an error or an XML file which I will then need to parse.
I understand the principle of all this , just need help with syntax, so appreciate everyones input.
so far I have..
Code:
use SOAP::Lite;
print SOAP::Lite
-> uri('[URL unfurl="true"]http://www.url_i_need_to_call.com')[/URL]
-> logintoken01()
-> result;
now this is based on reading the CPAN documentation, i'm asuming I need to change the
Code:
print SOAP::Lite
Code:
my $returned_xml = new SOAP::Lite;
$returned_xml-> uri('[URL unfurl="true"]http://www.url_i_need_to_call.com');[/URL]
$returned_xml-> logintoken01();
$returned_xml-> result;
and I don't understand how I pass in the rerquired XML data.
do I put that between the brackets of the method call? so I could do
Code:
my $xml = "my xml data";
my $returned_xml = new SOAP::Lite;
$returned_xml-> uri('[URL unfurl="true"]http://www.url_i_need_to_call.com');[/URL]
$returned_xml-> logintoken01($xml);
$returned_xml-> result;
all help understanding what i'm doing is appreciated.
regards, 1DMF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!