2 Replies Latest reply on Jul 15, 2004 4:06 AM by diegomemo

    return

    diegomemo

      Hi,
      i'm developing a simple client/server service. This is a my programs:

      SERVER--------------------
      public class testHelloWorld
      {
      public testHelloWorld() {}

      public ?????? getHelloWorldMessage(String name){
      String a=....;
      byte[] b=......;
      return ?????;
      }
      }

      CLIENT-----------------------
      String endpoint ="http://localhost:8080/jboss-net/services/testHelloWorld";
      String methodName = "getHelloWorldMessage";

      Service service = new Service();
      Call call = (Call) service.createCall();

      call.setTargetEndpointAddress( new java.net.URL(endpoint) );
      call.setOperationName(methodName);

      call.addParameter("name",org.apache.axis.Constants.XSD_STRING,ParameterMode.IN);
      call.setReturnType(?????);

      ????? ret = (??????) call.invoke( new Object[] { "AXIS!" } );


      I must return "a" and "b" variable.
      How can i do ?


      thanks

        • 1. Re: return
          thomas.diesler

          Hi Diego,

          there are several ways you can do this.

          #1
          return a custom bean object that contains both properties and use the axis bean serializer/deserializer

          #2
          define a, b as in/out parameters and use holder classes

          How would you solve this problem in plain java? I don't think this is ws specific.

          -thomas

          • 2. Re: return
            diegomemo

            Thanks for your answer, but I have solved in another way. I have put both the elements in a Vector, and the Client has received a SOAP_VECTOR.





            bye