Can I invoke a webservice  from server B which is a remote component on server A
This remote component exists on server A that runs a stored procedure on server 
 A and saves that output in a file format on the server  A
NOTE "c:\output\course.txt"  exists on server A
On server A
<cfcomponent displayname="Export"
             output="false"
             hint="Testing">
                 <cffunction   name="cfn_Course_WS" 
                                  access="remote" >

                <cfargument   name="courseid”
                          type="string" 
                    required="yes"> 

                  <cfstoredproc 

                                procedure="dbo.usp_Course_WS"
                                datasource="#application.dsn#" > 

               <cfprocparam         value="#arguments.CourseID#" 
                                    type="in"
                                    cfsqltype="cf_sql_varchar"
                                    null="no"> 

<cfprocresult  name = "RS_SP2Course"> 
         </cfstoredproc>
                    
                    <cffile action = "write"  
                                                file = "c:\output\course.txt"  
                                                output = 
"#RS_Course.xmlstring#">  
                                
       <cfreturn/>

     </cffunction>

 

</cfcomponent>

On server B
<cfinvoke
   method=" cfn_Course_WS"
   webservice="http://yourdomain.com/web_services/ Export.cfc?wsdl">

   <cfinvokeargument name="CourseID" value="123">
</cfinvoke>

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

Reply via email to