| Author |
DataObjects sent from client service web are null in the web service
|
stella atsafack
Greenhorn
Joined: Feb 09, 2010
Posts: 2
|
|
hi,
i have created a web service and generated through jax-ws some classes for the web service client.
fisrtly all of my classes are not generated. In fact, i want to send an array of data to the web service but i have build two classes, the first one (Measure)which contains two string and the second one(arrayofMeasure) which is an arraylist of Measure.
When i generate through wsdl my classes in the service web client, the class Measure doesn't appear, the class ArrayofMeasure is empty but i have no error and when i make some changes in the classes of client, i can see data objects but when i call the web service, my data objects is empty.
could you please tell me how i can build my class arrayof measure or is there an error somewhere else?
Thanks
regards,
Stella
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2186
|
|
Hi!
If you are doing WSDL-first development, you can declare an array type like this:
If you are doing Java-first development, I suggest that you avoid ArrayofMeasure altogether and return data of the type Measure[].
Best wishes!
|
 |
stella atsafack
Greenhorn
Joined: Feb 09, 2010
Posts: 2
|
|
Thanks
i would like to use measure[] but in fact, i'm supposed not to use it.My boss ask me to use List<Measure>.
I don't know if i can use soap to resolve this problem.
have you any idea about his use?
|
 |
Ivan Krizsan
Bartender
Joined: Oct 04, 2006
Posts: 2186
|
|
Hi!
stella atsafack wrote:i would like to use measure[] but in fact, i'm supposed not to use it.My boss ask me to use List<Measure>.
Well, there you have your problem.
If you still want to use List, then you can give custom JAXB mappings a try. For example, take a look at the following webpage: http://java.sun.com/webservices/docs/1.5/tutorial/doc/JAXBUsing4.html
Best wishes!
|
 |
 |
|
|
subject: DataObjects sent from client service web are null in the web service
|
|
|