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 RPC/Literal vs Document/Literal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "RPC/Literal vs Document/Literal" Watch "RPC/Literal vs Document/Literal" New topic

RPC/Literal vs Document/Literal

khan gul
Ranch Hand

Joined: Jan 27, 2011
Posts: 30
I am not very clear on understanding the difference between RPC/Literal vs Document/Literal (Wrapped).

II am using Top Down approach by writing the wsdl first and then generating the java code using wsdl2java utility provided by cxf.

When i published the web service using Document/literal (wrapped) the soap message looks like this:

<soapenv:Envelope xmlns:soapenv=""

where add is the name of the part inside the message tag in the wsdl. As per documentation the part name MUST be same as the Method name in wrapped Document/Literal

But when I use the RPC/Literal the soap message looks like this:

<soapenv:Envelope xmlns:soapenv="" xmlns:rpc="">

where add is the method name.

I am not sure what exactly is the difference between them. Both RPC/Literal and Document/Literal (wrapped) has the Method name as the first child of the Body ( As per documentation the part name MUST be same as the Method name in wrapped Document/Literal). As I am able to create complexTypes in the <types><schema..> section for both RPC and Document (wrapped), so my question is what exactly is the diffence between them?

Ravi C Kota
Ranch Hand

Joined: Jan 29, 2008
Posts: 61
Hi Khan,

You are not the only one who is confused totally on this. You can include me .

Now, read this post. One gentleman had the same question

Few more good links

Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
wood burning stoves
subject: RPC/Literal vs Document/Literal
Similar Threads
SOAP body - multiply choice parts
soap fault return empty <detail> element.
How to get document object From SOAP Message?
Unable to send a SOAP request to a service implementing Provider
What's Wrong with this simple WSDL