aspose file tools*
The moose likes Web Services and the fly likes Exception BasicCall.java:505 with invoke method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Exception BasicCall.java:505 with invoke method" Watch "Exception BasicCall.java:505 with invoke method" New topic
Author

Exception BasicCall.java:505 with invoke method

sandhya ko
Greenhorn

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(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);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception BasicCall.java:505 with invoke method
 
Similar Threads
Error in client for webservice on websphere 4.0
Problem in passing parameters through java client to .Net WS
Unabel to hit the webservice usind DII approach
Accessing a secure webservice...plz help
javax.rpc.call problem