From the screenshots of the mappings I gather that the occurrences for all attributes are set to 1. This means that the attribute/field needs to be present. Setting the nillable option would allow the field to be nill, but does require it to be present. From the last screenshot you can see that the Documentdata is optional as the occurrence is 0..1, maybe a change in the definition that is read in is needed to make the attributes optional as well.
Now the webservice allows you to optionally provide a documentdata part, but if you provide this all fields are required.
Looks like Mendix is complying to the webservice's definition and SOAPui is not. You are in luck that the webservice is accepting your SOAPcall allthough it is missing some attributes. Like Erwin said: if you want the attributes to be optional, the webservice that you have imported, should have it defined like that.
Ok thank you for your answers. So just to make sure the definition of the occurrence of an element can’t be changed manually in mendix because it is provided by the service definition (XSD file)?
In my case and many other SAP SOAP services, it is no problem to provide empty elements like based on the service definition.
For example, I have a service definition which has an optional element <Item> (see code below) in this item element I only provide the <Documentnumer>. It is no problem for the SAP System to work with this message. But mendix wants to make sure, that I fill out all attributes of the optional <item> element. This behavior makes totally sense mendix ensures based on the export mapping that the data input is correct.
My next Question is: Can I somehow send empty elements like <Documenttype></Documenttype> from mendix to my service. My problem would be solved if I could send such a request to my service.
Because if I have a user interface and just skip the input filed mendix pops up with the “elements can’t be nillable error” and if I provide some string like ‘ ’ SAP wont accept the request.
<item> <Deletevalue></Deletevalue> <Documenttype></Documenttype> <Documentnumber>12345</Documentnumber> <Documentpart></Documentpart> <Documentversion></Documentversion> <Originaltype></Originaltype> <Language></Language> <Sourcedatacarrier></Sourcedatacarrier> <Storagecategory></Storagecategory> <Docfile></Docfile> <Format></Format> <Description></Description> <PhObjid></PhObjid> </item>