Copy link to clipboard
Copied
I have a simple cfc setup for remote calls (web service) that I have written and while it is a slam dunk to consume it from a cf system with cfinvoke I don't have a clue as to what instructions I need to provide to user so that his application (written in Progress 4GL) can make the calls to the service.
<!--- this code has been simplified --->
<cfcomponent>
<cffunction name="uploadFile" access="remote" output="no" returntype="string" >
<cfargument name="email" type="string" required="no" default="">
<cfargument name="pw" type="string" required="no" default="">
<cfargument name="pid" type="string" required="no" default="">
<cfargument name="fileToUpload" type="string" required="no" default="">
<cfargument name="buildID" type="string" required="no" default=""><!--- code removed for authentiction stuff and test file to ensure it is a PDF then write the file to disk --->
<cfsavecontent variable="results">
<result>Done Upload</result>
</cfsavecontent>
<cfreturn results>
</cffunction>
</cfcomponent>
This is what my cfinvoke code looks like...
<cfinvoke method="uploadPdf" returnvariable="results" webservice="http://demo/myWebService.cfc?wsdl">
<cfinvokeargument name="pid" value="#pid#">
<cfinvokeargument name="email" value="#email#">
<cfinvokeargument name="pw" value="#pw#">
<cfinvokeargument name="pdfUpload" value="#binaryData#">
<cfinvokeargument name="description" value="#description#">
<cfinvokeargument name="iNumber" value="#iNumber#">
<cfinvokeargument name="pdfFileName" value="#pdfFileName#">
<cfinvokeargument name="buildID" value="#buildID#">
</cfinvoke>
So how would a non-coldfusion system consume my web service?
Thanks, Peter
Copy link to clipboard
Copied
Check out the docs on this subject--it's pretty straight-forward:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=webservices_19.html
Copy link to clipboard
Copied
I had a look at that web page but I'm still in the dark.
- Peter
Copy link to clipboard
Copied
You would tell your end user the address to the WSDL and tell them to consume it like they would any other SOAP Web Service.
It looks like this PPT gives some instruction on how to do it.
http://www.progress.com/progress/products/documentation/docs/dvwsv/dvwsv.pdf
A simple Google search or the Progress 4GL documentation should tell the end user what to do. It doesn't matter that the Web Service is provided by ColdFusion. It is just like any other SOAP service.
Copy link to clipboard
Copied
Let say your cfc is hosted at "http://myTestSite/testprogram/remoteTest.cfc".
Type "http://myTestSite/testprogram/remoteTest.cfc?wsdl" in a browser and distribute your wsdl file to others who want to consume your web service.
Any other application(other than coldfusion) can also consume the web service from the wsdl.
Thanks
Upendra