Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HTTP Authentication and XML
Message
 
À
30/04/2008 12:29:14
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01314247
Message ID:
01314403
Vues:
22
Jay
Try something similar to:
local lcURL, lxmlObj, lcResponse
lcURL = "http://balblabla"
lxmlObj = CreateObject("Microsoft.XMLHTTP")
lxmlObj.Open( "POST", lcURL, .F. )
** depending on the xml data passed later on, you may need:
lxmlObj.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
*****
lxmlObj.Send( "UserName="+TheUserNameComesHere )
lxmlObj.Send( "PassWord="+Passwordcomeshere )
lcResponse = lxmlObj.ResponseText
Jaime

>I'm having a hard time understanding how this is supposed to work. I was trying to use Rick Strahl's SOAP Manager, but now I'm not sure it's going to work for me. This is a section from documentation that is supposed to give an example of how the requests are made to their server.
>
>What I know:
>
>URL
>UserName
>PassWord
>ANSI Message to be sent
>
>What I can't figure out is how to send it in the right way. Their programmer who has no experience with Foxpro (go figure!) said that this uses "pure HTTP for the authentication, then uses SOAP for the XML document." Any help greatly appreciated.
>
>
>SOAP Request over HTTP Transport
>
>POST /Realtime/services/realtime HTTP/1.0
>Content-Type: text/xml; charset=utf-8
>Accept: application/soap+xml, application/dime, multipart/related, text/*
>User-Agent: Axis/1.0
>Host: teligibility.transactions.mckhboc.com
>Cache-Control: no-cache
>Pragma: no-cache
>SOAPAction: ""
>Content-Length: 888
>Authorization: Basic d2Vic2VydmljZTpTb2FwVXNlcjE=
>
><?xml version="1.0" encoding="UTF-8"?>
><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
>instance">
>
> <soapenv:Body>
>  <ns1:submitRealtimeRequest soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:ns1="urn:realtime">
>   <request xsi:type="xsd:string">ISA*00*          *00*          *ZZ*123456         *ZZ*MCKESSON_TSH
>   *031013*1636*U*00401*000000001*0*T*:~GS*HS*123456CM*MMOSCC*20031013*1636*000000001*X*004010X092~ST*270*
>000000001~BHT*0022*13*200112141357*20011214*1357*~HL*1**20*1~NM1*PR*2******PI*MMOSCC~HL*2*1*21*1~NM1*1P
>*2******SV*EXG033~HL*3*2*22*0~NM1*IL*1~REF*HJ*1234567890~DTP*472*RD8*20030101-20030101~EQ*30~SE*12*0000
>00001~GE*000001*000000001~IEA*00001*000000001~</request>
>  </ns1:submitRealtimeRequest>
> </soapenv:Body>
></soapenv:Envelope>
>
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform