1 Reply Latest reply on Feb 10, 2006 1:59 PM by mmdave

    Handling out/inout parameters

    guiguidac

      I'm a porblem using holder to handle inout parameters.

      Indeed, the value of the param received by my client is the same as the value sent.

      Here is a part of what I do :
      -------------------------------

      Client :

      String endpointURL = "http://localhost:8080/myservice2-servlet/MyService";
      Service service = new Service();
      Call call = (Call) service.createCall();
      call.setTargetEndpointAddress(new java.net.URL(endpointURL) );
      call.setOperationName(new QName("http://melsens-03:8080/myservice2-servlet/MyService", "serviceMethod") );
      call.addParameter("arg1", XMLType.XSD_STRING, ParameterMode.INOUT);
      call.setReturnType(XMLType.XSD_STRING);
      String arg1 = "hello";
      String adr = (String) call.invoke(new Object[] {arg1});
      Map output = call.getOutputParams();
      String ret = (String)output.get(new QName("arg1"));

      Service :

      public class MyService
      {
      public String serviceMethod(StringHolder arg1) {
      arg1.value = arg1.value + "world !";
      }
      }


      When I run this, after invoking serviceMethod, the variable ret = "hello" and not "hello world !".


      Does anybody have an idea of my problem ??

      Thank you

      Guillaume