Question & Answer
Question
How to exclude empty elements from the body of the SOAP envelope?
Answer
On Demand Consulting
Author: Volodymyr Sitarchuk
Scenario
We followed the instructions from:
https://www.ibm.com/support/knowledgecenter/SSMNED_5.0.0/com.ibm.apic.apionprem.doc/tutorial_apionprem_expose_SOAP.html
(Tutorial: Creating a REST API definition that invokes an existing SOAP service)
to expose our Web Service.
However there are a handful of empty XML elements in the SOAP envelope that need to be left out of the message in order to run this scenario successfully.
Solution
In the API Assembly in IBM API Connect select the Map node that builds up the SOAP body and
click on the "Configure options" button located left from the "Map" header:

then in the Advanced XML options switch off the "Include empty XML elements" checkbox that by default is switched on inserting empty elements into the output's XML message.body field

This setting will make sure that no empty elements are carried over and the scenario can be run without issues caused by empty elements.
Author: Volodymyr Sitarchuk
Scenario
We followed the instructions from:
https://www.ibm.com/support/knowledgecenter/SSMNED_5.0.0/com.ibm.apic.apionprem.doc/tutorial_apionprem_expose_SOAP.html
(Tutorial: Creating a REST API definition that invokes an existing SOAP service)
to expose our Web Service.
However there are a handful of empty XML elements in the SOAP envelope that need to be left out of the message in order to run this scenario successfully.
Solution
In the API Assembly in IBM API Connect select the Map node that builds up the SOAP body and
click on the "Configure options" button located left from the "Map" header:

then in the Advanced XML options switch off the "Include empty XML elements" checkbox that by default is switched on inserting empty elements into the output's XML message.body field

This setting will make sure that no empty elements are carried over and the scenario can be run without issues caused by empty elements.
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
Modified date:
16 March 2019
UID
ibm10771871