I have still problems with the webservice, my try for transfer image from a VFP app to a .NET webservice does not work.
In the .NET webservice I have a webmethod like this
WebMethod(Description:="Transfer image", EnableSession:=False) _
Public Sub TransferImage(ByVal buffer As Byte())
Dim sw As FileStream = New FileStream("c:\test.jpg", FileMode.OpenOrCreate)
sw.Write(buffer, 0, buffer.Length)
sw.Close()
End Sub
in the VFP app I have something like this
oWs = CREATEOBJECT("MSSOAP.SoapClient")
oWs.MSSoapInit("
http://myservername/myfile.wsdl")
dimension aArr(1)
aArr(1) = FILETOSTR("c:\test.jpg")
* here I have tried to pass the parameter in many way
oWs.TransferImage(aArr)
or
oWs.TransferImage(aArr(1))
or
oWs.TransferImage(FILETOSTR("c:\test.jpg"))
* and I receive an OLE error code 0x80020005
I have tried also to create a cursor with a binary-memo field and replace it with FILETOSTR("c:\test.jpg"), as suggest from Rick to Jerry, and then I tried to pass it to webservice:
oWs.TransferImage(mycursor.mybinaryfield)
but I receive always the same OLE error code
What is wrong?
Thanks in advance
Daniela