Migrating JAX-RPC to JAX-WS

Discussion in 'Java' started by Karl Uppiano, Dec 15, 2006.

  1. Karl Uppiano

    Karl Uppiano Guest

    I am having difficulty migrating a JAX-RPC application to JAX-WS.

    The JAX-RPC web service uses custom parameters and return data carrier
    classes. The data carrier classes look something like this:

    public class WsProperty {
    int key;
    int value;
    }

    The JAX-RPC web methods look something like this:

    public WsProperty[] getProperties() throws RemoteException;

    public void setProperties(WsProperty[] properties) throws
    RemoteException;

    The resulting WSDL contains descriptors for the params and return types
    along with the method itself.

    My JAX-WS web methods look something like this:

    @WebMethod()
    @WebResult(name = "WsPropertyArray")
    public WsProperty[] getProperties() throws RemoteException {
    ...
    }

    @WebMethod()
    public void setProperties(@WebParam(name = "WsPropertyArray")
    WsProperty[] properties) throws RemoteException {
    ...
    }

    The problem is, I do not see any description of the custom data type in the
    WSDL. Although the NetBeans tools seem to generate generic objects with
    similar names, they do not implement anything beyond the base Object
    methods. I could use reflection to get the data, but that seems wrong. Any
    suggestions?
     
    Karl Uppiano, Dec 15, 2006
    #1
    1. Advertising

  2. Karl Uppiano

    Karl Uppiano Guest

    "Karl Uppiano" <> wrote in message
    news:MBFgh.32$386.6@trndny01...
    >I am having difficulty migrating a JAX-RPC application to JAX-WS.
    >
    > The JAX-RPC web service uses custom parameters and return data carrier
    > classes. The data carrier classes look something like this:
    >
    > public class WsProperty {
    > int key;
    > int value;
    > }
    >
    > The JAX-RPC web methods look something like this:
    >
    > public WsProperty[] getProperties() throws RemoteException;
    >
    > public void setProperties(WsProperty[] properties) throws
    > RemoteException;
    >
    > The resulting WSDL contains descriptors for the params and return types
    > along with the method itself.
    >
    > My JAX-WS web methods look something like this:
    >
    > @WebMethod()
    > @WebResult(name = "WsPropertyArray")
    > public WsProperty[] getProperties() throws RemoteException {
    > ...
    > }
    >
    > @WebMethod()
    > public void setProperties(@WebParam(name = "WsPropertyArray")
    > WsProperty[] properties) throws RemoteException {
    > ...
    > }
    >
    > The problem is, I do not see any description of the custom data type in
    > the WSDL. Although the NetBeans tools seem to generate generic objects
    > with similar names, they do not implement anything beyond the base Object
    > methods. I could use reflection to get the data, but that seems wrong. Any
    > suggestions?


    P.S., Oops, typo alert: the data carrier members are public.

    public class WsProperty {
    public int key;
    public int value;
    }
     
    Karl Uppiano, Dec 15, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abhijeet

    Sending Attachments with JAX-RPC

    Abhijeet, Sep 9, 2003, in forum: Java
    Replies:
    1
    Views:
    504
    Jelle Maybach
    Sep 9, 2003
  2. Jeff
    Replies:
    0
    Views:
    3,509
  3. Karl Uppiano
    Replies:
    3
    Views:
    652
    Karl Uppiano
    Dec 19, 2006
  4. Replies:
    0
    Views:
    730
  5. Sascha Roth
    Replies:
    2
    Views:
    821
    Sascha Roth
    Jul 3, 2009
Loading...

Share This Page