Forums Register Login

Programming web services with JAX WS approach

+Pie Number of slices to send: Send
Hi

I am planning to write a web service based on jax ws .

My basic requirement is that , i need to accept a District or Region name as my Text Input , and in return i need to return all the names of the people of that for that Particular Organization .

I am having a query here , i am using EJB 3.0 Session Beans as my service End Point , please tell me can i store the contents in a ArrayList and return that ??

Please share your ideas . Thank you .
+Pie Number of slices to send: Send
Hi!
As have been said here before, it is better to return an array of items from a method in a web service endpoint implementation class, since it is easier to represent an array in XML.
Best wishes!
+Pie Number of slices to send: Send
Thank you very much .
+Pie Number of slices to send: Send
Hi
As i said , i am trying to return all the Peoples data of that region by returning an Object Array as you mentioned .
(An Array consisting all the People details).

This is my sample code of it .
All this is inside my EJB Implementation code


This is the way i am going to implement , please suggest me if there is anything wrong , as i have seen some code which is making use of @WebResult and i am not making use of it .

Please tell me whether using any @WebResult is necessary ??

+Pie Number of slices to send: Send
Hi!
I suggest that you return an array of Customer, instead of an array of Object.
If you are doing java-first development, then I suspect that there is no reason for using @WebResult, since, at development time, you have neither WSDL nor associated XML schemas.
If you are not happy with the default result of compiling the Java bean class Customer to an XML schema performed by JAX-WS, you may want to consider using JAXB annotations in the Customer class.
Best wishes!
+Pie Number of slices to send: Send

Thank you very much .
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1511 times.
Similar Threads
Proper Exception handling in WebServices
EJB 3 as web service
Creating JAX-WS Client in J2ME
Suggestion for novice to Web Service
Having Problem in sending mail
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:47:01.