File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Using parameters with JAX-RPC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using parameters with JAX-RPC" Watch "Using parameters with JAX-RPC" New topic

Using parameters with JAX-RPC

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You can use only primitives and classes that are JAX-RPC value types as parameters or return types for the EJB methods defined in the Web service endpoint interface.

But anybody please tell me what if i wanted to use anything like Collection as method parameter or as a return type

Save India From Corruption - Anna Hazare.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
You should never try to return a collection from a web service - return an array of simple types instead. The standard library provides easy conversion from collections to arrays.

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

that helps .Thank you very much .
Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1183
The beloved Java Web Services in a nutshell of O'Reilly lists the data types that can be used as JAX-RPC method arguments and return values -

  • Java Primitive types
  • Wrapper classes for Java primitive types
  • Standard Java classes
  • Value types
  • Holder classes
  • Arrays

  • Regards,

    William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
    I agree. Here's the link:
    subject: Using parameters with JAX-RPC
    It's not a secret anymore!