Re: How to pass a file to a web service.

2011-03-11 Thread Mack
Use the binary type when declaring the web service parameter for the file content, have a separate parameter for the file name (if necessary) and use the normal CF way to invoke the web service. Theoretically you shouldn't get Out of Memory errors but I haven't tested this... ws.cfc cffunction

How to pass a file to a web service.

2011-03-10 Thread Ian Skinner
What would be the web service equivalent of this HTTP request? wsTest.cfm |cfhttp url=https://secure-devsite/pur-loader/ws/ppur_v0.cfc; method=post multipart=yes cfhttpparam name=authentication value= type=formfield cfhttpparam name=ppurfile

Re: How to pass a file to a web service.

2011-03-10 Thread Dean Lawrence
Ian, you would need to convert the uploaded file to base64 before submitting it to the web service. This essentially will transfer the file as text. Once the web service has it, you would then convert it back to it's original binary format. Ben Nadel has an article describing this process.

Re: How to pass a file to a web service.

2011-03-10 Thread Ian Skinner
On 3/10/2011 8:05 AM, Dean Lawrence wrote: Ian, you would need to convert the uploaded file to base64 before submitting it to the web service. This essentially will transfer the file as text. What would be the result of converting a text file to base64? I'm not dealing with a binary file

Re: How to pass a file to a web service.

2011-03-10 Thread Dean Lawrence
If it is a file, then yes it is binary. The contents may be ASCII text, but the file itself is binary. When you convert the file to base64, you are converting it into a text string. This you can pass to the web service. The web service would then read the string, convert it back binary and use