Originally posted by Venkatesh Rangamani:
I have a Doc/Literal web service with two methods and both the methods take the same argument data type.
Exactly. This situation arises because your web service is RPC by design. Doc/Literal is for Document-Oriented web services where the 'Method' is either implied by the type of the document itself or by the content of the document (i.e. the service can inspect it and then decide what to do with).
Example: An RPC design may require two methods for a Purchase Order (PO), new(PO) and revise(PO). A document oriented web service would simply accept the PO - if it carries a known identifier the PO is sent to the revision process - if the identifier is new it is sent to the new PO process.
So if you are creating an RPC web service then use RPC/literal. If you are creating a document based Web service then use Document/literal.
There is one work around, the 'wrapped document pattern' that lets you do RPC things with the document/literal style - from a design perspective this is a bad idea. Essentially you define a different envelope document for each method that you wish to express and then you stuff your document into these envelopes.
So rather than simply handing your PO to the clerk (who doesn't want to bother with figuring out whether this pertains to an already existing PO) for processing, you are now required to put new POs in a blue envelope, while revised POs go into a yellow envelope ....