Only 44 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!

Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception with invoke method  RSS feed

sandhya ko
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!