Six Stars

SEND NULL TXMLMAP TESBPROVIDERRESPONSE

Hi,

 

I have to send a NULL value at the field "Age", which is an integer.

 

1.JPG

I thought that null value could be sent leaving the field empty but I am having some problems with my soap server when I send this. Somehow I am not being able to send the field as "NULL".

 

This is how I should send the field with XML:

 

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

 

How can I add this with talend? I have seen the "set namespace" option but I am having some errors if I put "xsi:nil="true""

  • ESB
Tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars

Re: SEND NULL TXMLMAP TESBPROVIDERRESPONSE

You can do this by setting the namespace and an attribute on the element. Right click on the element and you will see the options.

 

txmlmap.png

 

It produces XML like below.....

 

<?xml version="1.0" encoding="UTF-8"?>
<root>
<PriceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PriceList>
</root>
Rilhia Solutions
3 REPLIES
Eleven Stars

Re: SEND NULL TXMLMAP TESBPROVIDERRESPONSE

What problems are you getting when you leave it blank?

Rilhia Solutions
Six Stars

Re: SEND NULL TXMLMAP TESBPROVIDERRESPONSE

The SOAP server don't like the way Talend send NULL with leaving it blank.

 

This is how I send the data with leaving it blank:

<tnsSmiley TonguericeList/>

 

This is how the data should be sent, with the xsi:nil="true" wich means that the data is null. I don't know how to add this with txmlmap!

 

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

Eleven Stars

Re: SEND NULL TXMLMAP TESBPROVIDERRESPONSE

You can do this by setting the namespace and an attribute on the element. Right click on the element and you will see the options.

 

txmlmap.png

 

It produces XML like below.....

 

<?xml version="1.0" encoding="UTF-8"?>
<root>
<PriceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></PriceList>
</root>
Rilhia Solutions