I have a Service called Property ... what I am trying to do is to populate this service object's instance variables and then retreive those instance variables with get methods . I gave the service session scope ...  The following code is not giving me correct output . I always retreive null instance variables ...

Is what I am trying to achieve possible and can the following code do it ? If so , then the problem is elsewhere ... the populate method is using database code to access mysql ...

String endpointURL = "http://localhost:8080/axis/services/Property";

Service service = new Service();

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

call.setTargetEndpointAddress( new java.net.URL(endpointURL) );

call.setOperationName("setPropertyID");

Integer integer = new Integer(1);

call.invoke(new Object[] {integer});

call.setOperationName("populate");

call.invoke(new Object[] {});

call.setOperationName("getPropertyID");

call.setReturnType( org.apache.axis.encoding.XMLType.XSD_INT );

Integer outPut1 = (Integer) call.invoke(new Object[] {});

out.println("Property ID: " + outPut1.toString());

call.setOperationName("getAddress");

call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );

out.println("Address: " + (String) call.invoke(new Object[] {}));

Reply via email to