I am writing the WSDL which has the two operations
Both the operations uses the same schema which has the following structure as shown below.
<UserName maxoccurence=1 and minOccures=1> *Mandatory
<SetOfItems maxoccurence=Unbouned and minOccures=0>
<OrderNumber maxoccurence=1 and minOccures=1>* *Mandatory
The Input for first operation GetLIstOfItemsForUser is UserName
According to the schema OrderNumber is mandatory but since its parent tag (SetOfItems) is optional We don't want to include <SetOfItems> tag or any of its child elements
The input for second operation GetSetOfItemsForOrder is OrderNumber
Is there any problem with this kind of WSDL structure ?
If the parent is not required, the child is not required if there is no parent. The child is only required if the parent is present.
Keep in mind, WSDL's are about defining communication contracts between you and another party (or parties). You may not be able to enforce every possible rule in the WSDL, which is why applications should still validate input. Also, you could split the input for these two methods to separate definitions.