This content has been marked as final. Show 5 replies
If I'm reading this right ---
Just write a "wrapper" cffunction that invokes the Java or .NET function/class in question, then "expose" it by setting the access="remote" attribute in the cffunction tag. What it really comes down to is building a wrapper function for it.
Thanks a lot for your answer. That's exactly what I'd like to do. Could you tell me what I have to specify in the "returnType" attribute of the cffunction in order to get a WSDL which precisely returns that .NET or Java type?
Thank you for your help
Have fun! ;)
Hmmm, but now you are exposing the cfcomponent "myVarType" which isn't whether a .NET type nor a Java type. Here is a little example: I'd like to expose the .NET enum type "DayOfWeek" in a webservice. "DayOfWeek" has to be exposed in the WSDL. How can I do that?
myDotNetEnumType = CreateObject(".NET", "System.DayOfWeek");
<cfdump var="#myDotNetEnumType#" />
You can not do what you want to do. And you shouldn't be able to. :-)
Web services are generally used for interop between (often very different) systems, tying a service to a particular type goes against that purpose.
For an enumeration, you should just take a string argument and validate that input in the service for the values you accept ("monday", tuesday", ..). This is much more in the spirit of web services.
Hope that helps.