[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-beginners
Subject:    SoapLite Error
From:       "Mike Blezien" <mickalo () frontiernet ! net>
Date:       2007-10-29 21:55:47
Message-ID: 000401c81a76$77d378f0$04fea8c0 () DGGTPQ11
[Download RAW message or body]

Hello,

we're trying to put together a SOAP::Lite application but keep getting this
error message:
===========================================================
soaptest.cgi: Element 'XMLRequest' can't be allowed in valid XML message. Died.
at /usr/lib/perl5/site_perl/5.8.8/SOAP/Lite.pm
===========================================================

this is a snip of code being used, the line
" SOAP::Data->name(XMLRequest=>$xmllines), "

seems to be causing the error.
===========================================================
my $soap = SOAP::Lite
    -> uri('https://www.edentifyservices.com/')
    -> proxy('https://www.edentifyservices.com/XMLGateway/Request.asmx')
    -> on_action( sub { return 'http://tempuri.org/ProcessRequest' });

# Format the SOAP envelope
my $method = SOAP::Data->name('ProcessRequest')->attr({xmlns
=>'http://tempuri.org/'});

# Format the SOAP body
my $query = SOAP::Data->name(ProcessRequest => SOAP::Data->value(
 SOAP::Data->name(ServiceName=>'idalert'),
 SOAP::Data->name(XMLRequest=>$xmllines),
 SOAP::Data->name(Userid=>$conf{edentify}->{Userid}),
 SOAP::Data->name(password=>$conf{edentify}->{Password}),
 SOAP::Data->name(Options=>''))
 );

# Query the web service
my $result = $soap->call($method => $query);
=========================================================

This is the way it suppose to be setup according to documentation provided by
the service provider, Edentify. The "$xmllines" is a XML request formatted file
sent in the request. The "$xmllines" looks like this and passed to the 
'XMLRequest=> :
=========================================================

<idalert><username>TotalPayroll</username><candidates><candidate>
<firstname>Karen</firstname><mi>R</mi><lastname>Jones</lastname>
<suffix></suffix><ssn>339448854</ssn><dob>6/25/1965</dob><locator>DD-987654321</locator>
<address><address1>8585 N. Center Ave.</address1><address2></address2>
<city>Jonestown</city><state>NE</state><zip>66654</zip></address>
</candidate></candidates></idalert>

=========================================================

Any help would be much appreciated. This is my first crack using SoapLite :)

Thx's
Mike(mickalo)Blezien
===============================
Thunder Rain Internet Publishing
Providing Internet Solution that Work
===============================


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic