Want only Getter but no Setter.....JAX-RPC value type

Consider the following class,

public class A

{

private int param_1;

private int param_2;

public A(){}

public int getParam_1()

{

return param_1;

}

public void setParam_1(int param_1)

{

this.param_1=param_1;

}

public int getParam_2()

{

return param_2;

}

public void setParam_2(int param_2)

{

this.param_2=param_2;

}

}

When i use this class as input parameter in a Web service method,

it works perfectly allright as it should.

But i want client side only to get the value of param_1 field, dont want them to set the value.In that case what should i do?

When client side generates java files from WSDL its getting setter for param_1, how can i prevent them from setting the param_1 value?

Looking from your response.... Thanks

[916 byte] By [recluse_nisa] at [2007-10-2 17:50:33]
# 1

Unfortunately, you cannot get on the the getter methods. As for the parameter names, this is a limitation of JAX-RPC. If you are not using rpc/encoding, consider using JAX-WS instead. It has many more customizations to control the Java->WSDL and WSDL->Java mappings. You can get JAX-WS as part of JWSDP (http://java.sun.com/webservices/downloads/webservicespack.html)

or from Java.net at http://jax-ws.dev.java.net.

dkohlerta at 2007-7-13 19:08:50 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...