Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

JAX-WS and RPC

843833Feb 28 2007 — edited Sep 11 2007
Hi all,

I just started doing some development using Java Web Services. I would like to write a Web Service Client to a RPC based Web Service.

Now from Goolging, I believe JAX-RPC has been superseded by JAX-WS; and that JAX-WS does not support RPC type of Web Services.

Is that correct?

If so, what is the new model of Web Service? I like to know this so that I can potentially modify the actual Web Service to not use RPC.

Another question. Whatever this new model of Web Service that JAX-WS like, do other technologies support it? E.g., .NET?

Thanks.

Hon Hwang.

Comments

jwenting
there are 2 programming models for web services: RPC and document centric.

JAX-RPC (as the name suggests) is RPC centric.
JAX-WS is document centric.

They're not mutually exclusive, and a standards compliant library (which AFAIK JAX-WS is) will allow both.

So while you cannot use classes created for JAX-RPC with JAX-WS, you can do the same things with both (the programming model to achieve those things is just a bit different).
843833
JAX-WS does not support rpc/encoded. JAX-WS is WS-I Basic Profile conformant for Web Services Interoperability which mandates literal mode only and supports document/literal and rpc/literal modes.

JAX-WS is more document centric.

Yes, you can modify the webservice that is rpc/encoded to be document/literal or rpc/literal.
843833
This is not true, you can create rpc/encoded web services by adding this annotation:

@SOAPBinding(style = Style.RPC, use = Use.ENCODED)
843833
You can only do that with JAX-RPC, JAX-WS does not support rpc/encoded.
843833
There is one webservice i need to co-operate with, but it has it's WSDL file in rpc/encoded style, so what shall I do ?

Would it be much work for those guys to generate rpc/literal WSDL or do they need to change something more than just that file ?

If they refuse to do anything, then what shall I do, use JAX-RPC instead JAX-WS ?
843833
Just changing the WSDL from rpc/encoded to rpc/literal would not be sufficient. The actual endpoint would have to be modified to support the change as well. This may or may not be a lot of work.

If an endpoint must use rpc/encoded, then you pretty much have to use JAX-RPC.
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 9 2007
Added on Feb 28 2007
6 comments
191 views