I have a webservice method that is supposed to be returning an
array of type Long[]. For some reason, the return value
is not coming back from the call.invoke() method as a long.
I checked the class type name, and the response object is of type:
org.apache.axis.encoding.ser.ArrayDeserializer$ArrayListExtension
Here's the calling code:
Call call = null;
Object response;
QName operation;
QName outputQName;
operation = new QName("ICMEngine", "getTargetIDs");
outputQName = new QName("ICMEngine", "ArrayOf_SOAP-ENC_long");
try
{
call = (Call)service.createCall();
}
catch( ServiceException se )
{
throw new IMClientException("IM_CLIENT_SERVICE_ERROR", se);
}
//
// Initialize the Call object
//
call.setTargetEndpointAddress(serverURL);
call.setOperationName(operation);
call.addParameter("target", XMLType.SOAP_MAP, ParameterMode.IN);
call.setReturnType(outputQName);
call.setOperationStyle("rpc");
// call the SOAP service
try
{
response = call.invoke(new Object[] {target});
}
catch( RemoteException re )
{
throw new
IMClientException("IM_CLIENT_REMOTE_METHOD_INVOCATION_ERROR", re);
}
if( response instanceof Long[] )
return((Long[])response);
return(null);
Do I need to explicitly convert this type? If so, then how?
Thanks,
James