Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HTTP Authentication and XML
Message
 
To
01/05/2008 08:15:05
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01314247
Message ID:
01314607
Views:
26
That's something they should tell you. Ask their programmer to send you some code in asp or whatever he uses, or just a simple html file that does the call. It's possible for instance to pass the username and password in one call, like in lxmlObj.Send( "UserName="+lcUserName+"&Password="+lcPassword ).

Jaime

>I really appreciate the help with this.
>
>I'm getting a user name and password form popping up on this line (the username is not the real one here):
>
>
>lcUserName = "MyUserName"
>lxmlObj.Send( "UserName="+lcUserName )
>
>
>How do I know that the server is expecting "UserName=MyUserName" as a parameter? Is that something they should tell me or is it generic?
>
>
>>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform