axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak T J <deepak_t...@yahoo.com>
Subject some problem regarding invoking web services
Date Tue, 05 Jul 2005 11:27:30 GMT
hi
 
I deployed a java class as web service in apache axis and tried calling it using a client
code. But i encountered some problem which i have listed after the code.
 
 import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {
   public static void main(String [] args) throws Exception {
       Options options = new Options(args);
       String endpoint = "http://localhost:" + options.getPort() +
                         "/axis/employee.jws";
// Do argument checking
       args = options.getRemainingArgs();
       if (args == null || args.length != 3) {
           System.err.println("Usage: CalcClient <add|subtract arg1 arg2");
           return;
       }
       String method = args[0];
       //if (!(method.equals("add") || method.equals("subtract"))) {
       //  System.err.println("Usage: CalcClient <add|subtract arg1 arg2");
       //  return;
       //}
// Make the call
       Integer i1 = new Integer(args[1]);
       Integer i2 = new Integer(args[2]);
       Service  service = new Service();
       Call     call    = (Call) service.createCall();
       call.setTargetEndpointAddress(new java.net.URL(endpoint));
       call.setOperationName( method );
       call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);
       call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);
       Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });
       //System.out.println("Got result : " + ret);
    }
}
 
 
when i compile the code i get the error that the "PARAM_MODE_IN symbol can be resolved"
 
since i am new to Web services and software oriented architecture, i have no clue to this
error. Can someone help me put in this.
 
bye
deepak




		
---------------------------------
Yahoo! Sports
 Rekindle the Rivalries. Sign up for Fantasy Football
Mime
View raw message