Hi everybody, I'm trying to write a web service that take an XML file, read some information and then print that. The problem is that during the execution of the client I receive a null pointer exception, but I will explain that later, after showing you the code.
Here is a fragment of the XML file (just to gave you the idea of the structure)
First of all, I've created two beans to contain the info I need
Then I've created another class that parse the document and save the data from the tags <prodotto> and <confezione> into the respective objects.
The server must be something like this
The client instead is
Unfortunately, even if there isn't syntax error, the logic of ws is wrong, cause after the client is launched and the first operation (a simple listing of all elements with the respective data: "id", "nome", "categoria", and the various "tipo", "peso", "prezzo" of confezione) is selected, the output is
I think that the array "confezioni" isn't filled but I don't know why, and I hope that someone with more experience than me can gave a look to the code and help me finding out where the problem is (and by the way, my english is a little rust, sorry )
Joined: Mar 21, 2011
Can be a problem of BeanUtil.deserialize that doesn't know how to work with "confezione"'s objects? How can i handle this?