How to send nil or null in XML from IBM Rational Integration Tester

Technote (FAQ)


Question

Set an XML node to nil with xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" when using IBM Rational Integration Tester

Cause

An empty node in XML implicitly sends an empty string. In order to send a nil or null in XML it is necessary to set xsi:nil="true" as an attribute on the element where xsi refers to the namespace "http://www.w3.org/2001/XMLSchema-instance". This document explains how to achieve the same effect from IBM Rational Integration Tester.

Answer

Imagine a node namded "offences" which currently has no value defined, and which should be nil but which should not be omitted from the XML generated.

Firstly we must make the stub sent null values. To do this open the stub, select the "Output" tab, right click the "text(String) {XML}" node and select "properties", and check "Send NULL values". This will send the output:

<offences/>

Now right click the "offences" node and select "Add Child" and "Text". A "(Text)" node will be added below "offences". Double click the new node to open the field editor and change the Action Type to "Null". The output will now be:

<offences xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>


This will need to be done for each node which should be nil.


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Test Workbench
Rational Integration Tester

Software version:

8.0, 8.0.0.1, 8.0.0.2, 8.0.0.3, 8.0.1, 8.0.1.1, 8.0.1.2, 8.0.1.3, 8.0.1.4, 8.5

Operating system(s):

AIX, Linux, OS X, Solaris, Windows

Reference #:

1644740

Modified date:

2013-10-07

Translate my page

Machine Translation

Content navigation