Hello,

I appologize for the long posting, but was hoping to get some feedback as to what we are doing wrong. We are trying to integrate with a XML Gateway that uses SOAP. This our first time at trying to use SOAP w/Perl and not having alot of luck. Below is the code snip and Request/Response structures used by the gateway. If you have experience with using SOAP and Perl, I'd really appreciate your assistance. If there is a better way to do this, please contact me directly off the list and be happy to discuss hiring you to put this together correctly.

#####################################################################################
# CODE SNIP
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=>'XMLRequestLine'), # THIS LINE PRODUCES SOAP ERROR
SOAP::Data->name(Userid=>'USERID'}),
SOAP::Data->name(password=>'PWD'),
SOAP::Data->name(Options=>'OPTIONS'))
);

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

print $cgi->header();

if($result->fault)
{
   print "Edentify Web Service Failed!\n";
print join ', ',$result->faultcode,$result->faultstring,$result->faultdetail;
}
else
{
 # Print out the results one by one
print "ResponseType = " . $result->valueof('//ProcessRequestResponse/ProcessRequestResult/EdentifyResponse/responsetype') . "<br>"; print "Code = " . $result->valueof('//ProcessRequestResponse/ProcessRequestResult/EdentifyResponse/code') . "<br>"; print "Message = " . $result->valueof('//ProcessRequestResponse/ProcessRequestResult/EdentifyResponse/message') . "<br>"; print "TransID = " . $result->valueof('//ProcessRequestResponse/ProcessRequestResult/EdentifyResponse/transactionid') . "<br>";
 # NO RESULTS RETURNED.
}
# END CODE SNIP

#################################################################################
# XMLRequest format for above XMLRequest:
XMLRequestLine=<idalert><username>USERNAME</username><candidates>
<candidate><firstname>FNAME</firstname><mi>MNAME</mi><lastname>LNAME</lastname>
<suffix>SUFFIX</suffix>
<locator>ID</locator><ssn>SSN</ssn><dob>BDAY</dob>
<address><address1>ADDR1</address1><address2>ADDR2</address2><city>CITY</city>
<state>STATE</state><zip>ZIP</zip></address></candidate></candidates></idalert>

################################################################################
# SOAP REQUEST/RESPONSE STRUCTURES
################################################################################
# REQUEST
POST /XMLGateway/Request.asmx HTTP/1.1
Host: www.edentifyservices.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/ProcessRequest";

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
 <soap:Body>
   <ProcessRequest xmlns="http://tempuri.org/";>
     <ServiceName>string</ServiceName>
     <XMLRequest>string</XMLRequest>
     <Userid>string</Userid>
     <password>string</password>
     <Options>string</Options>
   </ProcessRequest>
 </soap:Body>
</soap:Envelope>
###############################################################################
RESPONSE
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
 <soap:Body>
   <ProcessRequestResponse xmlns="http://tempuri.org/";>
     <ProcessRequestResult>string</ProcessRequestResult>
   </ProcessRequestResponse>
 </soap:Body>
</soap:Envelope>
#############################################################################


Mike(mickalo)Blezien
===============================
Thunder Rain Internet Publishing
===============================
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to