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="xxxxxxxxxxxxxxxx" 
type="formfield">
      <cfhttpparam name="ppurfile" file="#expandPath('ppur-test.xml')#" 
type="file">
      <cfhttpparam name="method" value="dataSubmit" type="url">
</cfhttp>
<cfoutput>#htmlEditFormat(cfhttp.FileContent)#</cfoutput>
|

ppur_v0.cfc

|<cffunction name="dataSubmit" access="remote" output="no" returntype="xml">
      <cfargument name="authentication" type="string" required="yes" 
hint="authentication value">
      <cfargument name="ppurFile" type="string" required="yes" hint="file 
upload field">

         <cfset var dataResult = "">
      <cfset var rootpath = getDirectoryFromPath(getCurrentTemplatePath())>

      <cfset path = 
replace(rootpath,"htdocs/pur-loader/ws/","uploadedFiles/ppur/","ONE")>

      <cffile action="upload" filefield="ppurFile" destination="#path#" 
nameconflict="overwrite">

      <cfset var validate = xmlValidate(cffile.serverDirectory&  '/'&  
cffile.serverFile,replace(rootpath,'/ws/','/schema/ppur-data-transmission.xsd','ONE'))>
...
</cffunction>
|

I.E.  How would one pass a 'file' to a web service?  Or can you only 
pass the content of the file as a string?  Which is differernt and 
apparently does not work for what we are trying to do.  When I did that, 
we would start getting 'java heap out of memory' errors dealing with the 
quanty of content we need to pass to this web service.

To clarify, is there a way to pass a file reference through a web 
service object that can be used in a <cffile action="upload"...> tag in 
the <cffunction...> block?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342890
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to