alwaysuseperl has asked for the wisdom of the Perl Monks concerning the following question:
And this is what im passing to it.. (per my Data Dump in Perl)POST /services/svrLogin.asmx HTTP/1.1 Host: website.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://tempuri.org/ControlNET/svrLogin/GetCreds" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x +mlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schema +s.xmlsoap.org/soap/envelope/"> <soap:Body> <GetCreds xmlns="http://tempuri.org/ControlNET/svrLogin"> <Username /> <Password /> </GetCreds> </soap:Body> </soap:Envelope>
Now I know its interacting with the right namespace, but it should be returning some proper information about the server its interacting with, however the response is "Failed to authenticate the proper username and password" Any idea what I could be doing wrong? I know the password is 100% right. Here is the code as well<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetCreds xmlns="http://tempuri.org/ControlNET/svrLogin"> <Username>username</Username> <Password>********(hidden)**********</Password> </GetCreds> </soap:Body> </soap:Envelope>
Any ideas?#!c:/perl/bin use SOAP::Lite+trace => 'all'; use XML::Simple; use Data::Dumper; system("cls"); $method = 'GetCreds'; $ep = 'http://website.com/services/svrLogin.asmx'; $uri = 'http://tempuri.org/ControlNET/svrLogin'; $xml = '<Username>username</Username> <Password>********(hidden)**********</Password>'; $soap = SOAP::Lite -> proxy ($ep) -> uri($uri) -> on_action( sub { join '', $uri, $_[1] } ) -> readable(1) -> call ($method => SOAP::Data->type('xml' => $xml)); print Dumper($soap);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: soap-lite issue
by alwaysuseperl (Novice) on Jul 14, 2010 at 05:13 UTC |