How are you calling the Web Service? With teh SOAP toolkit?
If so you need to pass the binary data as BINARY not as a string. You can use
lcbin = CAST( lcFile as BLOB)
and that should give you a proper representation in the SOAP package. If that doesn't work also try CreateBinary().
+++ Rick ---
>Hi,
>
>I have a problem in consuming a webservice in which I must pass a base64-encoded string as parameter. (This is the WSDL:
http://ws.interfax.net/dfs.asmx?WSDL)
>
>The 4th parameter of the SendFax-method is the FileData ans should be
base64-encoded. I have tried everything I could think of. lmFile = filetostring(
) and passing lmFile by reference (or by value)
>I tried putting the data of the file in an array and passing the array by reference. I base64-encoded the file and put that in an array and passed it by reference.
>I read the file, encoded that and passed that. Nothing works...
>
>I can't believe I am the first VFP-programmer who stumbles on this problem so if you can shed some light, please...