You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ben short <ja...@gmail.com> on 2008/08/28 14:19:36 UTC

Stopping the client from modifying a field

Hi,

Is it possible to stop a client of a webservice from modifying a
field. For instance I return a class that has an Id field that relates
to the database record. I dont what the client to beable to change
this field.

Is this possible?

Regards

Ben Short

Re: Stopping the client from modifying a field

Posted by Daniel Kulp <dk...@apache.org>.
I assume you are talking about JAXB generated types....

The only way I can think of doing this would be to write an xjc plugin that 
would strip off the setter methods from the generated beans for anything you 
don't want settable.   

That said, this would obviously just affect the CXF generated client.   If 
someone uses a different client like .NET or something, you wouldn't be able 
to control what they do.

Dan


On Thursday 28 August 2008 8:19:36 am ben short wrote:
> Hi,
>
> Is it possible to stop a client of a webservice from modifying a
> field. For instance I return a class that has an Id field that relates
> to the database record. I dont what the client to beable to change
> this field.
>
> Is this possible?
>
> Regards
>
> Ben Short



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Stopping the client from modifying a field

Posted by Benson Margulies <bi...@gmail.com>.
Sure, with a security framework. The web service framework's job is
just to carry data around. If you want a security system, you have
code one.

On Thu, Aug 28, 2008 at 8:19 AM, ben short <ja...@gmail.com> wrote:
> Hi,
>
> Is it possible to stop a client of a webservice from modifying a
> field. For instance I return a class that has an Id field that relates
> to the database record. I dont what the client to beable to change
> this field.
>
> Is this possible?
>
> Regards
>
> Ben Short
>