The moose likes Web Services and the fly likes Exception with invoke method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Exception with invoke method" Watch "Exception with invoke method" New topic

Exception with invoke method

sandhya ko

Joined: Sep 29, 2006
Posts: 1
I am calling a webservice passing 3 parameters to it and am getting the following exception.Can somebody help me resolving it??As soon as it hits the invoke command it is thrwing the exception.

java.rmi.RemoteException: Server was unable to process request. --> Object reference not set to an instance of an object.
at com.sun.xml.rpc.client.dii.BasicCall.invoke(

private String namespace="";
private String wsdlservice="IKeyNACR";
private String wsdlport="IKeyNACRSoap";

ServiceFactory factory = ServiceFactory.newInstance();
Service service = (Service) factory.createService(new QName(namespace,wsdlservice));
QName portName = new QName(namespace,wsdlport);
QName operationName = new QName(namespace,"GetAccountRelationships");

Call call = (Call)service.createCall(portName,operationName);
call.setProperty (Call.ENCODINGSTYLE_URI_PROPERTY,"");

call.addParameter("EastWestIndicator", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("inputValue", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("inputTypeIndicator", XMLType.XSD_STRING, ParameterMode.IN);

call.setTargetEndpointAddress("webservice URL is passed here");

Object[] strQuery = {"E", "A000056913", "PROFILE"};
Object resp = (String)call.invoke(strQuery);
I agree. Here's the link:
subject: Exception with invoke method
It's not a secret anymore!