When I try to create the entity class to do a create with in the web service all of the methods for the entity class error.
The same exact code (cut and pasted) in a similarly generated Java SE test application compiles and creates a record just fine. Am I missing something simple?
here is the entity POJO below. It has no zero arg constructor but the compiler should provide that. Neither does the SE version.
If I move the setter calls into the processRequest method this problem goes away. This solution has allowed me to move forward with my development of the web service client, but I would still like to understand the cause of this error.
Vijitha Kumara wrote:What "of.createBankdata();" returns? And were you able to import the package "webservice.Bankdata" through the IDE (not manually by typing the entire thing)?
I think the issue here is calling any kind of method above the method declarations in the Servlet.
I think there is probably some lesson I really need to learn about Servlets in here somewhere. Because this makes no sense to me.
Vijitha Kumara wrote:Oh! I missed it, Yes you need to use them inside methods, it's no difference form any other regular Java class as far as using methods from objects.
For readers who may be looking at this because they did the same silly thing I did. You can do any setup method calls in the servlet init() method.