With the Open method, the username and password are separate parameters: http://tinyurl.com/f4gnb see the method "open (ServerXMLHTTP/IServerXMLHTTPRequest)"
Tracy -----Original Message----- From: Aida I. Rivera-Benítez Sent: Monday, July 17, 2006 5:20 PM Subject: xmlhttp & VFP I'm working on sending an eligibility request and receiving an eligibility file from a webserver. Basically the instructions from the clearinghouse are as follows (I changed the name of the webpage because can't disclose that info): URL: https://www.clearinghouse.com/hipaa/Get271.asp Parameters: Username, Password, X12 These parameters MUST be passed using the the POST method. Username & Password refers to the Username and Password assigned by the clearinghouse. X12 - this parameter holds the content of the corresponding eligibility request file. This is the actual file been transmitted. I'm sending the requested info using the post method but it always responds <Invalid Username or Password> and I doublechecked the user name and password and the values are correct so it must be that I'm missing something. The code is as follows: *** FILE TRANSMISSION TO CLEARINGHOUSE *** LOCAL lcFile AS STRING ,; lcMessage AS STRING ,; lcUsuario AS STRING ,; lcPassword AS STRING ,; lcParametros AS String ,; llReturn AS BOOLEAN ,; lcURL AS STRING ,; lcFiler AS String ,; loXmlHttp AS Microsoft.XMLHTTP SELECT usuario, clave; FROM plugdata; INTO CURSOR xpdata; NOCONSOLE lcUsuario = ALLTRIM(xpdata.usuario) lcPassword = ALLTRIM(xpdata.clave) USE IN xpdata lcFile = FILETOSTR("c:\temp\eligblty.txt") TRY WAIT WINDOW "Sending Eligibility Request, One moment please..." NOWAIT lcURL = "https://www.clearinghouse.com/hipaa/Get271.asp" lcParametros = "Username=" + lcUsuario + "&" + "Password =" + lcPassword loXmlHttp = NEWOBJECT( "Microsoft.XMLHTTP" ) loXmlHttp.open( "POST", lcURL, .F., lcParametros) loXmlHttp.send(lcFile) lcFiler = "c:\temp\eligresp.txt" STRTOFILE(loXmlHttp.responseBody, lcFiler,0) WAIT WINDOW "Response Received!!!" TIMEOUT 5 WAIT CLEAR llXmlHttp = null CATCH TO oException TEXT TO lcMessage TEXTMERGE NOSHOW PRETEXT 3 Error # <<oException.ErrorNo>> occured on line: <<oException.LINENO>> of <<oException.PROCEDURE>>. Offending line of code: <<oException.LineContents>> Error Message: <<oException.Details>> ENDTEXT MESSAGEBOX( lcMessage, 16, PROGRAM()) ENDTRY *************************************** Basically I modified a sample I found on the internet but its not working, please help. Regards. AiR _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.