Hi !
I'm working on a new webservice in VFP9 to send claims to a clearinghouse. Done
webservices with insurance companies before and it was a piece of cake
using westwind connection since everything was adding parameters to the
oSoap, sending the request and receiving a response. But this time I need a
Webservices/Webconnection
expert cause can't figure out a section which says AuthenticationHeader which
goes at the
beginning of the request and I know is the username and password part but
haven't found a way to send this before the other parameters. They send me a
code sample as follows:
**********************************TEST*CODE****************************************
Dim proxy As New svcServiceReference.EdiFileTransferSoapClient()
Dim AuthenticationHeader As svcServiceReference.AuthenticationHeader
AuthenticationHeader = New svcServiceReference.AuthenticationHeader
AuthenticationHeader.Username = "Username1"
AuthenticationHeader.Password = "Password1"
'file
Dim file As New svcServiceReference.EdiFile
file.FileName = "testfile"
Dim strFilePath = "C:\yourfiles\yourfile.txt"
Dim strBody = ""
Dim rdr As New StreamReader(strFilePath)
strBody = rdr.ReadToEnd()
rdr.Close()
file.FileBody = New String() {strBody}
file.RowDelimiter = "~"
Dim response As New svcServiceReference.Result
'Dim liMsgIDs As New List(Of String)
'liMsgIDs.Add("1")
'liMsgIDs.Add("2")
'liMsgIDs.Add("3")
'Dim strMsgIDs As String()
'strMsgIDs = liMsgIDs.ToArray()
'response = proxy.MarkFilesAsDownloaded(AuthenticationHeader, strMsgIDs)
'file.FileType = "837FILE"
'response = proxy.SendCustomFile(AuthenticationHeader, file)
response = proxy.SendX12File(AuthenticationHeader, file.FileName,
file.FileBody(0), file.FileDate, True)
Tried using the Header in oHTTP and all the techniques regarding complex
parameters in the help files but receive the same response "Unable to
Authenticate" and right now trying RawXML for this section as follows:
oHTTP = CREATE("wwHTTP")
oHTTP.nConnectTimeout = 360
oSOAP = CREATE("wwSOAP")
oSOAP.oHTTP = oHTTP
lcRequest = "<AuthenticationHeader>" + ;
lcUserPassword + ;
"</AuthenticationHeader>"
oSOAP.AddParameter("AuthenticationHeader", lcRequest, "RawXML")
oSOAP.AddParameter("Filename", lcFile)
oSOAP.AddParameter("Body", lcFileBody)
oSOAP.AddParameter("FileDate", lcFileDate)
lcStringXML = oSOAP.CallWSDLMethod("SendX12File", lcURL)
I ran out of ideas, Is there any guru out there that may help me figure out the
Authentication Header section?
Regards,
AiR
Aida I. Rivera-BenÃtez, MSMIS
AiR Information Systems, Inc.
San Juan, Puerto Rico
[email protected]
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/a336919869d4473484f79166b7453...@billingpc
** 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.