SOAP XML – A different way to pass nil

I have been working on some standard Oracle ERP Cloud SOAP payloads and found something different.

Suppose you want to update the End Date field on the Trading Partner Item, you can simply send the below request to set the date.

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:typ="http://xmlns.oracle.com/apps/scm/productModel/items/tradingPartnerItems/tradingPartnerItemServiceV2/types/&quot;
xmlns:trad="http://xmlns.oracle.com/apps/scm/productModel/items/tradingPartnerItems/tradingPartnerItemServiceV2/&quot; >
<soapenv:Header/>
<soapenv:Body>
<typ:updateTradingPartnerItem>
<typ:tradingPartnerItem>
<trad:TradingPartnerItemId>300000063693002</trad:TradingPartnerItemId>
<trad:EndDate>2019-09-21</trad:EndDate>
</typ:tradingPartnerItem>
</typ:updateTradingPartnerItem>
</soapenv:Body>
</soapenv:Envelope>

However what if you want to make the field update to no value or null value, or simply blank, however you want to put it.

In that scenario, you cannot simply use any of the below forms of the XML Attributes.

<!-- 1. --> <trad:EndDate>NULL</trad:EndDate>
<!-- 2. --> <trad:EndDate>nil</trad:EndDate>
<!-- 3. --> <trad:EndDate></trad:EndDate>

The only way in which you can achieve the operation i.e. setting the attribute to no value in the database is, if you pass it in the below format.

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:typ="http://xmlns.oracle.com/apps/scm/productModel/items/tradingPartnerItems/tradingPartnerItemServiceV2/types/&quot;
xmlns:trad="http://xmlns.oracle.com/apps/scm/productModel/items/tradingPartnerItems/tradingPartnerItemServiceV2/&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soapenv:Header/>
<soapenv:Body>
<typ:updateTradingPartnerItem>
<typ:tradingPartnerItem>
<trad:TradingPartnerItemId>300000063693002</trad:TradingPartnerItemId>
<trad:EndDate xsi:nil="true" />
</typ:tradingPartnerItem>
</typ:updateTradingPartnerItem>
</soapenv:Body>
</soapenv:Envelope>

A different namespace is also required for setting the xsi:nil=”true”. Make sure you include that in your request.

Oracle why you bug!!

So I have been using OBIEE for some time now for reporting purpose in my organization. Although its an easy to use tool there are good amount of bugs in it and for such a widely used tool some of the bugs outright seems stupid.

For instance you cannot delete records properly from a Fixed Value List if it has more than 10 records.

Here is a sample of that, I created a Fixed list with 10 + records. See how it asks for deletion of the element correctly but deletes an element different altogether. It should have deleted “Record 12” but deleted “Record 2”

The reason is simply bad coding. So there is a javascript function “LovPanel.NVEntry.remove” which does the removal of record from the list. But it does not work!!

Oracle if you are listening fix this.