• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception BasicCall.java:505 with invoke method  RSS feed

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(BasicCall.java:505)

private String namespace="http://tempuri.org/";
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,"http://schemas.xmlsoap.org/soap/encoding/");

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!