You don't need to use LWP::UserAgent directly to access SOAP services.
SOAP::Lite probably uses it internally, and you only need to focus on
the SOAP::Lite methods.
You need to explain your difficulties in using SOAP::Lite. My
recommendation is that you turn on debugging, so that you can see the
SOAP envelope generated. Be sure you've read the section on
Interoperability -> Microsoft's .NET.
Paul wrote:
Below is how I was able to use a .NET web service
using LWP perl module with the GET method. How can I
use the same web service using SOAP?
I think I need to use SOAP::Lite module but I couldn't
make it work. Can anybody help?
# Create a user agent object
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent("MyApp/0.1 ");
# Create a request
my $req = HTTP::Request->new(GET =>
"http://my.com/wservices/Slib.asmx/MAT_DES?mode=DEV&ID=28912");
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
# Pass request to the user agent and get
a response back
my $res = $ua->request($req);
open (FP, ">C:/temp/mm.xml");
# Check the outcome of the response
if ($res->is_success)
{
print FP $res->content;
}
else
{
print "Bad luck this time\n";
}
close(FP);
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs