Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing image from a VFP app to a .NET web service
Message
De
05/02/2004 05:25:06
Sanero Daniela
Calcol Informatica
Legnano, Italie
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Titre:
Passing image from a VFP app to a .NET web service
Divers
Thread ID:
00874347
Message ID:
00874347
Vues:
42
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform