I have a problem:
- I am working at a Java EE project, the GUI is writting by other persons.
- I cretaed the database
- I wrote a Java SE application (with Netbeans 7.1) which contains the entities (I let Netbeans generate these from database and fitted them)
- I wrote the testclasses, wrote the ejbs and tested them.
- I than wrote a singleton webservice in which the other beans are injected.
- I the webservice, I got the expected result: it's possible to get the list of all instances (rows in the database), get an instance of an instance by ID, update and save it: all CRUD operations are OK.
- In the Client, a Java SE Application (with Netbeans 7.1), I added a "web service client" by specifying the WSDL URL (of the webservice created in 6).
All what I got are detached objects. Every object with its all fields (as strings) EXCEPT THE ID (Primary Key). instead of an update, I got an insert (cause the edited object has no ID on the client). Remove doesn't work at all. Other operations (findAll, findById) are OK. Do I have to use DTOs (Data Transfer Objects)? I read that these are not more needed as of ejb3.1
On the client, for a findAll operation, Netbeans does not accept to use the entities: it forces me to use the autogenerated "dtos", which have almost the same fileds (except thhe primary key or ID) as the entities but as strings.