Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing image from a VFP app to a .NET web service
Message
From
05/02/2004 05:25:06
Sanero Daniela
Calcol Informatica
Legnano, Italy
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web Services
Title:
Passing image from a VFP app to a .NET web service
Miscellaneous
Thread ID:
00874347
Message ID:
00874347
Views:
43
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
Next
Reply
Map
View

Click here to load this message in the networking platform