• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception BasicCall.java:505 with invoke method

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)

Code:
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.setProperty(Call.SOAPACTION_USE_PROPERTY,Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY,"http://tempuri.org/GetAccountRelationships");

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.setReturnType(XMLType.XSD_STRING);
call.setTargetEndpointAddress("webservice URL is passed here");

Object[] strQuery = {"E", "A000056913", "PROFILE"};
Object resp = (String)call.invoke(strQuery);
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic