File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataObjects sent from client service web are null in the web service

 
stella atsafack
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic