0 Replies Latest reply on Aug 16, 2005 5:10 AM by Srivats Chandrasekaran

    how to pass no parameters

    Srivats Chandrasekaran Newbie

      i am using a client progrom to access a method inside the service, which is deployed in the jboss.net.
      the method doesnt take in any parameters and it returns a string

      String endpoint =
       "http://10.1.30.57:7070/jboss-net/services/ServiceName";
       String methodName = "servicemethod";
       System.out.println( " I HAVE GOT THE CONNECTION");
       Service service = new Service();
       Call call = (Call) service.createCall();
      
       call.setTargetEndpointAddress( new java.net.URL(endpoint) );
       call.setOperationName(methodName);
      
       call.addParameter("name",org.jboss.axis.Constants.XSD_STRING,ParameterMode.IN);
       call.setReturnType(org.jboss.axis.Constants.XSD_STRING);
      
       //String ret = (String) call.invoke( new Object[] { "AXIS" } );
       String ret = (String) call.invoke( new Object[]{ null } );
       System.out.println(ret);
      


      How do i pass a parameter when my method doesnt accep any. I have tried passing null and it doesnt work.

      Thks in advance
      Srivats