cancel
Showing results for 
Search instead for 
Did you mean: 

xsi:nil="true" in the response message

Former Member
0 Kudos

All,

I have a SOAP to SOAP scenario. It involves one to one field graphical mapping. Simple fields with no attributes. The problem now is that the response I am getting back for the some of the empty fields from the target system is:

- <GetDpmSubProjectPhotonViewResponse xmlns=http://ABC xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

- <GetDpmSubProjectPhotonViewResult>

<StatusCode>0</StatusCode>

<StatusMessage>Sub Project information retrieved successfully</StatusMessage>

<SubProjectKey>dsdd</SubProjectKey>

<Name>Safeway Horton Hears a Who Floorstand x48 (DVD Version)</Name>

<ShipDate>2008-11-10T00:00:00</ShipDate>

<DisplayQuantity>1279</DisplayQuantity>

<CreativeCost xsi:nil="true" />

<DisplayCost xsi:nil="true" />

<CorrugateCost xsi:nil="true" />

<PopCost xsi:nil="true" />

<GroupYear>2008</GroupYear>

<CompanyKey>1</CompanyKey>

- <RetailAccountPhotonViews>

- <RetailAccountPhotonView>

<Name>SAFEWAY</Name>

</RetailAccountPhotonView>

</RetailAccountPhotonViews>

</GetDpmSubProjectPhotonViewResult>

</GetDpmSubProjectPhotonViewResponse>

This after one to one mapping in PI becomes:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns1:MT_DPMSubProjectServiceResponse xmlns:ns1=http://xyzzz>

<Status_Code>0</Status_Code>

<Status_Message>Sub Project information retrieved successfully</Status_Message>

<Sub_Project_Key>asdds</Sub_Project_Key>

<Sub_Project_Name>Safeway Horton Hears a Who Floorstand x48 (DVD Version)</Sub_Project_Name>

<Sub_Project_Cycle_Ship_Date>2008-11-10T00:00:00</Sub_Project_Cycle_Ship_Date>

<Sub_Project_Display_Qty>1279</Sub_Project_Display_Qty>

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

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

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

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

<Group_YR>2008</Group_YR>

<Company_Key>1</Company_Key>

- <RetailAccountPhotonViews>

- <RetailAccountPhotonView>

<Name>SAFEWAY</Name>

</RetailAccountPhotonView>

</RetailAccountPhotonViews>

</ns1:MT_DPMSubProjectServiceResponse>

How do we ensure that the target system does not send xsi:nil="true" in the response message and or how do I remove it in Pi with XSLT mapping.

Accepted Solutions (0)

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Another possible approach is use java mapping and remove the namespace prefix followed by boolean for those three fields. Keep this java mapping as the first mapping in the interface mapping followed by graphical mapping.Please remember xsi is the namespace prefix for xmlns.

ambrish_mishra
Active Contributor
0 Kudos

Hi Vicky,

Have you mapped the fields one to one through graphical mapping ? You can handle the xsl:nil in graphical mapping by using return as XML and checking the condition in graphical mapping for the fields which have a possibility of returning nil.

Hope it helps!

Ambrish

Bhargavakrishna
Active Contributor
0 Kudos

Hi Vicky,

Refer SAP Note 1786611


you can refer Michal reply in the below blog

http://scn.sap.com/message/8831804#8831804

Regards

Bhargava krishna