Working of Optional attributes versus objects in a Published SOAP Webservice
Good afternoon, I have a SOAP Webservice which has The following structure: With this structure I would expect the following: Entity01 is always sent and has 0 to x Entity02 objects attached. If there are Entity02 objects, AttributeA should always be present and not empty. AttributeB is either left out or included and not empty. When I use SoapUI to Test the Webservice, it accepts the request when I don't inlcude AttributeA in it. Am I overlooking something here? Could it be that because Entity02 is Optional, all underlying attributes are Optional as well? I would expect it to break due to the absence of AttributeA. Thanks!
It should indeed break. If I try this, SOAP UI receives an incomplete response:
com.mendix.integration.WebserviceException: Attribute 'Attribute1' is neither optional nor nillable but mapped value 'MyFirstModule.EntityB.MyFirstModule.EntityB.Attribute1' is null for operation 'Operation'