Can I have a message declared for dicument style service with two parts say ABC1 & ABC2 each referring to 2 different top level elements from the types section.
<part name="ABC1" type="mh:topElem"/>
<part name="ABC2" type="mh:topElem"/>
If yes, let us say I want to use one of the message part as input in a operation getABC() and the part I want to use is ABC1
How do I specify the same in the below definition???
<input name="ip" message="mh:ABCMessage"/>
Originally posted by Mike Pandey:
The part definition needs to be having name and element attributes in the below case. Apologize for that.
To be BP compliant yes; however WSDL 1.1 makes no such restriction.
Can I have a message declared for document style service with two parts say ABC1 & ABC2 each referring to 2 different top level elements from the types section.
So something like:
According to Which style of WSDL should I use? you can - however in the vast majority of practical cases you would only have one part in the message for a document/literal messaging style.
When you use document/literal the operation name specified in the portType never appears in the SOAP envelope. This means that the message implies the operation. So often messages are designed with only one part so that the document type in the request implies the operation. If you have multiple parts in the message you create the more complicated scenario where document type combination and order in the request imply the operation.
This is why the Basic Profile requires:
5.3.1 Bindings and Parts
There are various interpretations about how many wsdl:part elements are permitted or required for document-literal and rpc-literal bindings and how they must be defined.
R2201 A document-literal binding in a DESCRIPTION MUST, in each of its soapbind:body element(s), have at most one part listed in the parts attribute, if the parts attribute is specified.
R2210 If a document-literal binding in a DESCRIPTION does not specify the parts attribute on a soapbind:body element, the corresponding abstract wsdl:message MUST define zero or one wsdl:parts.
So by extension a BP compliant document/literal WSDL should have at most one part definition per message. So:
Can I have a message declared for document style service with two parts
let us say I want to use one of the message part as input in a operation getABC() as input in a operation getABC() and the part I want to use is ABC1. How do I specify the same in the below definition???
(PS: Having an operation name of "getABC" is downright confusing when you are only sending input)
WSDL 1.1 lets you do this:
and its even BP compliant because only one part is specified. However WSDL 1.1 allows you to specify multiple parts while BP doesn't. So if you are creating a BP compliant web service a different route is safer:
Your may be interested in this old topic document Vs rpc message styles.