This content has been marked as final.
Show 4 replies
-
1. Re: consuming webservice with input type of enum
pmscse Dec 26, 2006 6:47 AM (in response to eight_is_great)Hi,
Have you had any luck consuming enumerations in the web service? I too have the same problem.
-Prashant -
2. Re: consuming webservice with input type of enum
insuractive Dec 26, 2006 10:21 AM (in response to eight_is_great)I've had problems using Coldfusion to consume web services using non-simple parameters (especially .NET web services). The enumeration type seems to be one of these. Check out this thread for a possible work-around:
http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:30232 -
3. Re: consuming webservice with input type of enum
pmscse Dec 27, 2006 5:40 AM (in response to insuractive)Hi,
Thanks a lot for the response, as I had no hopes of anybody reading my message.
Well, I had read this post earlier, but I believe the person has implemented a java class that can return a enum datatype to the consuming program. I am not sure if this works out. Also I am not sure, how to write a java class that can wrap data and return enumerations.
Also I had yet another method of sending enum datatype to the webservice method, which is as below.
<cfscript>
ps = CreateObject("java", "java.util.Properties");
ps.setProperty("0", "Orange");
ps.setProperty("1", "Mango");
keys = ps.keys();
while (keys.hasMoreElements()){
k = keys.nextElement();
v = ps.getProperty(k);
}
</cfscript>
If you loop and output, you will get the key value pair. But I am not sure if this is an enumerations type.
However, can you let me know if you had a workaround for the enum problem ?
--Prashant -
4. Re: consuming webservice with input type of enum
OneLove Aug 29, 2014 8:29 AM (in response to eight_is_great)Try setting wsversion = 1.
<cfscript>
args = { refreshWSDL=true, wsversion=1 };
ws = createObject("webservice", "http://mysite/test.asmx?wsdl", args);
result = ws.getAccountLinksByUser("test@somewhere.com", "All");
writeDump(result);
</cfscript>Issue using .net web service from ColdFusion - Stack Overflow

