We have a requirement to map the incoming JSON request into a SOAP XML request to invoke back-end web-service. The schema definition of the XML request has the namespace configured as given below:
The "Field2" field has an empty namespace defined and the back-end is expecting us to send the empty namespace in the request being sent to them. However, after mapping it, API Connect is skipping the empty namespace and not passing it to the back-end which is causing failures. Has anyone faced such issue and what was the work-around to pass the empty namespace?
Definition:
ReqMsg:
type: object
properties:
Header:
type: object
properties:
Field1:
type: string
Field2:
type: string
xml:
namespace: ''
xml:
namespace: 'urn:abc'
Expected request by back-end:
<ReqMsg xmlns="urn:abc">
<Header>
<Field1>Create</Field1>
<Field2 xmlns="">ABC</Field2>
</Header>
</ReqMsg>
Request being sent by APIC:
<ReqMsg xmlns="urn:abc">
<Header>
<Field1>Create</Field1>
<Field2>ABC</Field2>
</Header>
</ReqMsg>