Hi
I'm currently working on sync-proxy to SOAP scenario.
Target webservice expects xsi:nil="true" for a few null fields in the request and in the response also it sends the same for some of the null fields. Source system (ECC) wants blank whereever xsi:nil="true" is present in the response message.
I'm using the constant function xsi:nil in message mapping (graphical) and able to send xsi:nil="true" in the request to WS.
In the response mapping, I'm using isNil boolean function. But the SOAP response mapping is failing because webservice sends the namespace associated with xsi (xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance") in the SOAP envelope and PI discards the envelope message.
Below is the response sent by webservice.
Below is the SOAP response received by PI at mapping step. As xsi namespace is missing in the payload, PI throws mapping error:
Error: The prefix "xsi" for attribute "xsi:nil" associated with an element type "errorField" is not bound.
- I've also tried creating an xslt mapping to insert xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" at the root node createWorkOrderResponse. But as the message fails before executing the mapping (while parsing the response xml), it didnt work.
- I've also used "Do not use SOAP envelope" option and xmlanonymizerbean but nothing worked. The message fails at adapter level.
Please let me know my options to resolve this issue. As it's a sync-scenario, I'm trying to implement a simple solution to handle this error.
Regards
Praveen.