1 Reply Latest reply on Aug 17, 2005 5:26 AM by christy

    DII Call with no param

    anil.saldhana

      Please do not email the developers of JBossWS team with questions. Use the User Forum.

      ============================================
      I have two doubts, it would be great if you could clear me the doubts.

      1. I am written an custom MBean service and have deployed it. Is there any way i can access that service as a web-service directly using soap/wsdl.

      2. If the asnwer to the previous question is no. I wrote a small code which acts as handle on that MBean and exposes all that methods the MBean. How do i pass no parameters to a method via the client.

      Ex: i have a method

      getName(){
      return "FOO";
      }
      CLIENT CODE

      String endpoint = "http://localhost:port/jboss-net/services/ServiceName";
      String methodName = "getName";
      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[]{ "" });
      System.out.println(ret);

      This doesnt seem to work , so does

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

      Cant we at all invoke a method which doesnt accepts any parameters?
      ===========================================



      http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossWSFAQ