Hi

I’m trying to call a remote method which takes no arguments however I have found no way to do this other than to pass a variable which never gets used (i.e. in the code below I am passing an empty string to the method). I have tried using call.invoke(); but I get a null pointer error. Any ideas?

 

Service service = new Service();

      Call call;

   

      call = (Call) service.createCall();

      call.setTargetEndpointAddress(new URL("http://localhost:8080/axis/servlet/AxisServlet")); //Set the target service host and service location,

      call.setOperationName(new QName("urn:ImageService", "extClear"));

      call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.IN);

      call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );

 

      call.invoke(new Object[]{ "" });

 

I’ve had to set up a method on the server side to take the empty string and call the method I actually want to call! i.e.

 

public void extClear(String s)

{

      clearImage();

}

 

public void clearImage()

{

      //does all the stuff I actually want to do

}

 

Cheers

 

Dan

Reply via email to