JAX-WS and JPA, how to load stub objects using JPA?

Posted by opensas on Stack Overflow See other posts from Stack Overflow or by opensas
Published on 2010-04-04T01:38:25Z Indexed on 2010/04/04 1:43 UTC
Read the original article Hit count: 572

Filed under:
|
|
|
|

I'm trying to develope a soap web service that has to access a mysql db.

I have to replicate an existing service, so I created all the stub object from it's wsdl file

Netbeans created all the necessary stuff for me (new, web service from wsdl), it works ok...

Now I'm trying to use JPA to load all those objects from the database.

So far I was going fine, I created the classes using (new, entity class from database), and then copied all the annotations to the classes generated by wsimport, and it was working fine.

The problem is that netbeans insists on running wsimport again, and then I loose all my annotations...

Is there some way to tell netbeans not to regenerate those files?

I think this situation shoulb be pretty common, I mean developing a web service from a wsdl and then having to fill those objects with data using JPA.

what would be the correct aproach to this kind of situation?

thanks a lot saludos sas

I've also tried inheriting from the stubs, and addign there the persistence annotations, but I had troubles with overlaping members, I'm redeclaring protected properties...

© Stack Overflow or respective owner

Related posts about jax-ws

Related posts about java