Created the proxy program from the WSDL file and did the following code:
Code: Select all
** Load the Proxy and Support Class Libraries
DO EdifileTransferProxy
*** Create an instance of the Proxy
LOCAL loProxy as EdiFileTransferProxy
loProxy = CREATEOBJECT("EdiFileTransferProxy","V4")
***loProxy.oService.IgnoreCertificateErrors()
LOCAL loBridge as wwDotNetBridge
loBridge = loProxy.oBridge
LOCAL loService as EdiFileTransfer.EdiFileTransfer
loService = loProxy.oService
loBridge.SetProperty(loService,"Url",lcUrl)
loProxy.oService.HttpLogin(lcUsername, lcPassword,.F.)
lcRequest = loProxy.SendX12File(LcFile, lcFileBody, lcFileDate, lcFixX12Envelope)
IF loProxy.LERROR
? loProxy.cErrorMsg
RETURN
ENDIF
The generated program section for this SendX12File request is:
Code: Select all
FUNCTION SendX12File(FileName as String,Body as String,FileDate as String,FixX12Envelope as Boolean) as FileTransferResult
LOCAL loException as Exception, lvResult as FileTransferResult
THIS.lError = .F.
this.cErrorMsg = ""
lvResult = .F.
TRY
lvResult = this.oBridge.InvokeMethod(this.oService, "SendX12File", FileName,Body,FileDate,FixX12Envelope)
CATCH to loException
THIS.GetErrorDetail(loException)
ENDTRY
RETURN lvResult
ENDFUNC
* SendX12File
Code: Select all
POST /webservices/editransfer/edifiletransfer.asmx HTTP/1.1
Host: www.server.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length:
length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<AuthenticationHeader lmlns="https://www.server.com/ws/EdiFileTransfer/">
<Username>string</Username>
<Password>string</Password>
</AuthenticationHeader>
</soap12:Header>
<soap12:Body>
<SendX12File xmlns="https://www.server.com/ws/EdiFileTransfer/">
<FileName>string</FileName>
<Body>string</Body>
<FileDate>string</FileDate>
<FixX12Envelope>boolean</FixX12Envelope>
</SendX12File>
</soap12:Body>
</soap12:Envelope>