Read-only methods for webservices with JavaBeans

  • Thread starter Andreas Horstmann
  • Start date
A

Andreas Horstmann

Hello,

unfortunately i wrote this thread before in german, so i will do this
in english again.

Here we've got a standalone application which stores several data on
an SQL Server. In the last time we added a webservice to display and
sometimes modify several information from this data via webpages
(JSP). Many functions are already implemented and working fine. We
have webservicemethods returning objects stored in javabeans. To get
the data out of the beans, we have to use some get methods. Some data
is "READ-ONLY", so we don't want any set method there. The problem is:

If we don't write some "dummy" Set-Methods, wscompile will not
generate the needed get-Methods. We find that writing dummy-methods is
not a very fine way.

Is there another easy posibility to make the getMethods available for
the client without writing dummy set methods like this?

// That's what we don't need but have to write in order to make
wscompile ready to produce the getMethod
public void setName(String value) {}

// That's what we need only
public String getName()
{
return name;
}

Greetings and thnx a lot!

Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top