Symptom #
Using the Transwise web service and the doBooking operation, DTL elements marked as Don’t Create Element appear in the outgoing SOAP envelope.
The web service returns the following error:
Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'deliveryNoteInfo', because the {nillable} property of 'deliveryNoteInfo' is false
Using a web proxy, such as Fiddler, to review the outgoing call there is a deliveryNoteInfo xsi:nil=”true” node even though the element shouldn’t have been created. Please see the following article for further details on how to use a web proxy with the TaskCentre web service connector:
How to use a web proxy to view HTTP traffic through the TaskCentre Web Service Connector
Cause #
The WSDL exposed by the web service has nillable=”true” set for the deliveryNoteInfo element of the doBooking operation. This is the reason why the empty element is created by the WSCT.
The error message returned from the server does not reflect the schema definition. This is a problem with the web service and not with the Web Service Connector tool, however, the following solution can be applied to prevent the error from occurring.
Solution #
Within the WSDL file, modify the deliveryNoteInfo nillable attribute to false then recreate the task using the modified WSDL. This will prevent the deliveryNoteInfo node from being present in the SOAP body.
For details instructions see below:
- Save the WSDL to disk and modify the deliveryNoteInfo in doBooking operation so its nillable attribute is set to falseExample of original definition:Example of modified definition:
- Within the Web Service Connector tool global configuration, recreate the web service connection using the locally editedWSDL file.
- Recreate the task using the new web service global connection.
- Launch the new task and verify that the WSCT does not send the empty deliveryNoteInfo element.