HTTPS Post for XML Gateway

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

HTTPS Post for XML Gateway

Stephen Smiroldo-4
Hello,

I'm working on integrating identity verification using Experian services but have virtually no experience in doing HTTP requests. I have documentation from Experian and am looking through Lasso 8.6 documentation for HTTP requests (specifically p.29). I'm not sure how to make an HTTP request using Lasso and then receive the response.

Below is an example Experian gives for their POST request. What do I need to do in Lasso to send the request and then receive a response? This is probably really simple, but I'm just not getting how to translate Experian's examples into Lasso code and manipulation.

POST / fraudsol/xmlgateway/ HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 1901
Authorization: Basic dGFzdGlkOnBTc3N3b1Ja
&NETCON_TRANS=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UT
F-8%22%3F%3E%3CNetConnectRequest+xmlns%3D%22http%3A%2F%2Fwww.experian.com%2F
NetConnect%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema+i
nstance%22%3E%3CEAI%3EABCD1234%3C%2FEAI%3E%3CDBHost%3E PRECISE_ID_TEST
%3C%2FDBHost%3E%3CReferenceId%3EReference+Id%3C%2FReferenceId%3E%3CRequest+xm
lns%3D%22http%3A%2F%2Fwww.experian.com%2FWebDelivery%22%3E%3CProducts%3E%3C
CreditProfile%3E%3CSubscriber%3E%3CPreamble%3ETEST%3C%2FPreamble%3E%3COpInitials
%3ETN%3C%2FOpInitials%3E%3CSubCode%3E5991007%3C%2FSubCode%3E%3C%2FSubscrib
er%3E%3CPrimaryApplicant%3E%3CName%3E%3CSurname%3EANDERSON%3C%2FSurname%
3E%3CFirst%3ELAURIE%3C%2FFirst%3E%3C%2FName...


Experian gave the following XML structure to use for sending the request:

<?xml version="1.0" encoding="UTF-8"?>
<NetConnectResponse xmlns="http://www.experian.com/NetCon"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.experian.com/NetCon NetCon.xsd">
<CompletionCode>0000</COmpletionCode>
<ReferenceId>Reference Id</ReferenceId>
<Products>
.
.
</Products>
<NetConnectRequest>


Thanks,
Stephen




#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

Tim Taplin
Use include_url

you can add the xml string to the request using -postparams = yourxmlstring and if needed set content type using -sendMimeHeaders

I do something like

local('response_value' = include_url(#url, -sendMIMEheaders = #headers, -postparams = #myxml));

the documentation on sendMIMEheaders should help you sort out content type if needed.

I can offer more detailed examples if you get stumped.

Tim Taplin

On Apr 18, 2013, at 9:47 AM, Stephen Smiroldo <[hidden email]> wrote:

> Hello,
>
> I'm working on integrating identity verification using Experian services but have virtually no experience in doing HTTP requests. I have documentation from Experian and am looking through Lasso 8.6 documentation for HTTP requests (specifically p.29). I'm not sure how to make an HTTP request using Lasso and then receive the response.
>
> Below is an example Experian gives for their POST request. What do I need to do in Lasso to send the request and then receive a response? This is probably really simple, but I'm just not getting how to translate Experian's examples into Lasso code and manipulation.
>
> POST / fraudsol/xmlgateway/ HTTP/1.1
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 1901
> Authorization: Basic dGFzdGlkOnBTc3N3b1Ja
> &NETCON_TRANS=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UT
> F-8%22%3F%3E%3CNetConnectRequest+xmlns%3D%22http%3A%2F%2Fwww.experian.com%2F
> NetConnect%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema+i
> nstance%22%3E%3CEAI%3EABCD1234%3C%2FEAI%3E%3CDBHost%3E PRECISE_ID_TEST
> %3C%2FDBHost%3E%3CReferenceId%3EReference+Id%3C%2FReferenceId%3E%3CRequest+xm
> lns%3D%22http%3A%2F%2Fwww.experian.com%2FWebDelivery%22%3E%3CProducts%3E%3C
> CreditProfile%3E%3CSubscriber%3E%3CPreamble%3ETEST%3C%2FPreamble%3E%3COpInitials
> %3ETN%3C%2FOpInitials%3E%3CSubCode%3E5991007%3C%2FSubCode%3E%3C%2FSubscrib
> er%3E%3CPrimaryApplicant%3E%3CName%3E%3CSurname%3EANDERSON%3C%2FSurname%
> 3E%3CFirst%3ELAURIE%3C%2FFirst%3E%3C%2FName...
>
>
> Experian gave the following XML structure to use for sending the request:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <NetConnectResponse xmlns="http://www.experian.com/NetCon"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.experian.com/NetCon NetCon.xsd">
> <CompletionCode>0000</COmpletionCode>
> <ReferenceId>Reference Id</ReferenceId>
> <Products>
> .
> .
> </Products>
> <NetConnectRequest>
>
>
> Thanks,
> Stephen
>
>
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

Todd Vainisi-2
In reply to this post by Stephen Smiroldo-4
You probably want to look at the include_url tag, which has a syntax like this:

local('response' = include_url($url, -SendMIMEHeaders=$send, -POSTparams=#post_values) );

You can put your xml formatted data for experian in -POSTparams.



#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

Todd Vainisi-2
In reply to this post by Stephen Smiroldo-4
Blast it, Tim!  Why do I bother?  Lol.



#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

Tim Taplin
independent confirmation is never a bad thing.

Tim

On Apr 18, 2013, at 10:15 AM, [hidden email] wrote:

> Blast it, Tim!  Why do I bother?  Lol.
>
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

Stephen Smiroldo-4
Thanks, both of you, for the quick response (and chuckle)! Always good to get more than one answer even though they were almost identical!  ;-)

I'll work with it and see what I can figure out. Good to know I can just use the include_url tag!


On Apr 18, 2013, at 12:20 PM, Tim Taplin <[hidden email]> wrote:

> independent confirmation is never a bad thing.
>
> Tim
>
> On Apr 18, 2013, at 10:15 AM, [hidden email] wrote:
>
>> Blast it, Tim!  Why do I bother?  Lol.
>>
>>
>>
>> #############################################################
>>
>> Attend the Lasso Developer Conference 2013!
>> Sept 12-14, 2013 in Niagara Falls, Canada
>> http://www.lassosoft.com/LDC-niagara-falls-2013
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso
>> [hidden email]
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
>
> #############################################################
>
> Attend the Lasso Developer Conference 2013!
> Sept 12-14, 2013 in Niagara Falls, Canada
> http://www.lassosoft.com/LDC-niagara-falls-2013
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list Lasso
> [hidden email]
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: HTTPS Post for XML Gateway

stevepiercy
In reply to this post by Stephen Smiroldo-4
There are code examples and methods on TagSwap that do exactly
this, except the response is a string or some other data type.
http://www.lassosoft.com/tagswap/detail/AuthorizeNet_AIM

It's not that much harder to form or parse XML.
http://lasso.2283332.n4.nabble.com/Authorize-net-CIM-ARB-xmltree-and-SOAP-tp3156481p3156486.html

For the XML bit, suggest using XML_tree.
http://www.lassosoft.com/tagswap/detail/xml_tree

--steve


On 4/18/13 at 11:47 AM, [hidden email] (Stephen
Smiroldo) pronounced:

>Hello,
>
>I'm working on integrating identity verification using Experian
>services but have virtually no experience in doing HTTP
>requests. I have documentation from Experian and am looking
>through Lasso 8.6 documentation for HTTP requests (specifically
>p.29). I'm not sure how to make an HTTP request using Lasso and
>then receive the response.
>
>Below is an example Experian gives for their POST request. What
>do I need to do in Lasso to send the request and then receive a
>response? This is probably really simple, but I'm just not
>getting how to translate Experian's examples into Lasso code
>and manipulation.
>
>POST / fraudsol/xmlgateway/ HTTP/1.1
>Content-Type: application/x-www-form-urlencoded
>Content-Length: 1901
>Authorization: Basic dGFzdGlkOnBTc3N3b1Ja
>&NETCON_TRANS=%3C%3Fxml+version%3D%221.0%22+encoding%3D%22UT
>F-8%22%3F%3E%3CNetConnectRequest+xmlns%3D%22http%3A%2F%2Fwww.experian.com%2F
>NetConnect%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema+i
>nstance%22%3E%3CEAI%3EABCD1234%3C%2FEAI%3E%3CDBHost%3E PRECISE_ID_TEST
>%3C%2FDBHost%3E%3CReferenceId%3EReference+Id%3C%2FReferenceId%3E%3CRequest+xm
>lns%3D%22http%3A%2F%2Fwww.experian.com%2FWebDelivery%22%3E%3CProducts%3E%3C
>CreditProfile%3E%3CSubscriber%3E%3CPreamble%3ETEST%3C%2FPreamble%3E%3COpInitials
>%3ETN%3C%2FOpInitials%3E%3CSubCode%3E5991007%3C%2FSubCode%3E%3C%2FSubscrib
>er%3E%3CPrimaryApplicant%3E%3CName%3E%3CSurname%3EANDERSON%3C%2FSurname%
>3E%3CFirst%3ELAURIE%3C%2FFirst%3E%3C%2FName...
>
>
>Experian gave the following XML structure to use for sending the request:
>
><?xml version="1.0" encoding="UTF-8"?>
><NetConnectResponse xmlns="http://www.experian.com/NetCon"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:schemaLocation="http://www.experian.com/NetCon NetCon.xsd">
><CompletionCode>0000</COmpletionCode>
><ReferenceId>Reference Id</ReferenceId>
><Products>
>.
>.
></Products>
><NetConnectRequest>
>
>
>Thanks,
>Stephen
>
>
>
>
>#############################################################
>
>Attend the Lasso Developer Conference 2013!
>Sept 12-14, 2013 in Niagara Falls, Canada
>http://www.lassosoft.com/LDC-niagara-falls-2013
>
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list Lasso
>[hidden email]
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################

Attend the Lasso Developer Conference 2013!
Sept 12-14, 2013 in Niagara Falls, Canada
http://www.lassosoft.com/LDC-niagara-falls-2013

#############################################################
This message is sent to you because you are subscribed to
  the mailing list Lasso
[hidden email]
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>