hi,

I am trying to get some info off a webservice using SOAP lite.

The service definition is
http://xserv.dell.com/services/assetservice.asmx?op=GetAssetInformation

and this is my code:

#!/usr/bin/env perl

use warnings;
use strict;

use diagnostics;
use Data::Dumper;
use SOAP::Lite +trace => "debug";

my $soap_url = "http://xserv.dell.com/services/assetservice.asmx"; ;
my $guid = "9aecf-8a97-4581-9a91-74b3d9a6ee2d";
my $appname = "nagios" ;
my $tag = "167cxw1" ;

my $client = SOAP::Lite->new( proxy => $soap_url );
$client->on_action ( sub {
        "http://support.dell.com/WebServices/GetAssetInformation";; } );

my $call = $client->call('GetAssetInformation',
    SOAP::Data->name('guid')->value($guid),
    SOAP::Data->name('applicationName')->value($appname),
    SOAP::Data->name('serviceTags')->value($tag),
);

die $call->faultstring if ( $call->fault) ;

print $call->result;



This is the result:
$ perl kk.pl
SOAP::Transport::HTTP::Client::send_receive: POST
http://xserv.dell.com/services/assetservice.asmx HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 597
Content-Type: text/xml; charset=utf-8
SOAPAction: http://support.dell.com/WebServices/GetAssetInformation

<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:soap="http://schemas.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><GetAssetInformation><guid
xsi:type="xsd:string">9aecf-8a97-4581-9a91-74b3d9a6ee2d</guid><applicationName
xsi:type="xsd:string">nagios</applicationName><serviceTags
xsi:type="xsd:string">167cxw1</serviceTags></GetAssetInformation></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Date: Wed, 30 Oct 2013 20:38:58 GMT
Server: Unauthorized-Use-Prohibited
Content-Length: 322
Content-Type: text/xml; charset=utf-8
Client-Date: Wed, 30 Oct 2013 20:38:58 GMT
Client-Peer: 143.166.84.118:80
Client-Response-Num: 1
P3p: CP="BUS CAO CNT COM CUR DEV DSP INT NAV OUR PSA PSD SAM STA TAI UNI"
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";><soap:Body><GetAssetInformationResponse
xmlns="http://support.dell.com/WebServices/";
/></soap:Body></soap:Envelope>

Provided this is my first contact with this kind of service, I really
do not have a clue as to what else to try.

TIA,
--
Groeten,
natxo

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to