one of the products I need to talk to with my CF application, provides a web
service interface. CF generates the stubs underneath..
I CreateObject() the web service
wsparm = StructNew();
wsparm["refreshWSDL"]="yes";
wsparm["saveJava"]="yes";
wsparm["wsdl2javaArgs"]="-p com.ca.dsm.webservice";
wsparm["port"]="DSMWebServiceAPIService";
if(arguments.server eq "")
arguments.server=this.server;
this.ws=CreateObject("webservice","http://"& arguments.server &
this.wsdl_path,wsparm);
then call methods on this object.
one in particular is giving me fits.
the (wsdl2java called by CF) generated stub looks like this
public void openUnitGroupComputerMembersList(java.lang.String sessionId,
java.lang.String unitGroupId,
com.ca.dsm.webservice.ComputerPropertyFilter[]computerPropertyFilters,
com.ca.dsm.webservice.ComputerPropertiesRequired computerPropertiesRequired,
javax.xml.rpc.holders.LongWrapperHolder openListHandle,
javax.xml.rpc.holders.LongWrapperHolder
totalNoOfComputers){}
I call it like this
outcount =
CreateObject("java","javax.xml.rpc.holders.LongWrapperHolder").init();
handle = CreateObject("java","javax.xml.rpc.holders.LongWrapperHolder").init();
this.ws.openUnitGroupComputerMembersList(this.session,
group_uuid,toJavaArray("com.ca.dsm.webservice.UnitPropertyFilter",filter),
parms , "handle", "outcount");
handle and outcount in quotes tells CF to to the mapping conversions.
but..
I get this error
java.lang.IllegalArgumentException: Can not set java.lang.Long field
javax.xml.rpc.holders.LongWrapperHolder.value to
javax.xml.rpc.holders.LongWrapperHolder
---------------
now, this code has worked since Jan this year without problem.. but I had to
reinstall the server with the web service provider on it. (using the same CD I
used before), and the wsdl (used for the stubs), is identical to that used
before.
CF on my development/test system has not changed since then.
the error points to the line of code above calling
openUnitGroupComputerMembersList
at cfDSMWs2ecfc1883901126$funcGETCOMPUTERS.runFunction(C:\Program
Files\Apache Software Foundation\Tomcat 5.5\webapps\cfusion\home1\DSMWs.cfc:171)
SO, what am I missing?
if the last two parms were correct, the stub code copies the results from the
web service response data like this (into the long variable 'value' in the
holder class.
try {
openListHandle.value = (java.lang.Long) _output.get(new
javax.xml.namespace.QName("urn://www.ca.com/Unicenter/DSM/r11",
"OpenListHandle"));
} catch (java.lang.Exception _exception) {
openListHandle.value = (java.lang.Long)
org.apache.axis.utils.JavaUtils.convert(_output.get(new
javax.xml.namespace.QName("urn://www.ca.com/Unicenter/DSM/r11",
"OpenListHandle")), java.lang.Long.class);
}
try {
totalNoOfComputers.value = (java.lang.Long) _output.get(new
javax.xml.namespace.QName("urn://www.ca.com/Unicenter/DSM/r11",
"totalNoOfComputers"));
} catch (java.lang.Exception _exception) {
totalNoOfComputers.value = (java.lang.Long)
org.apache.axis.utils.JavaUtils.convert(_output.get(new
javax.xml.namespace.QName("urn://www.ca.com/Unicenter/DSM/r11",
"totalNoOfComputers")), java.lang.Long.class);
}
Sam
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324128
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4