Space character issue in EntireX XML Servlet.

Hi,

I’m passing an string from my application which has a leading space character followed by some text and then few space characters in an array element.

This XML is passed to EntireX mediator and in mediator ESB message logs I could see the payload getting logged with the spaces in the XML tag. I’m actually invoking a mainframe program exposed as web service from my application through ESB. The XMM for the service is deployed in a App server and it is cached in memory using EntireX XML servlet. From ESB sequence file, I’m making a HttpGateway call to this EntireX XML servlet along with the payload.

Once I make a HttpGateway call to the EntireX XML servlet, the servlet will then identify the corresponding XMM and invokes the Broker stub and eventually the RPC server is called and data is updated in ADABAS.

My problem is the space characters in the payload is not getting updated in mainframe. To identify where it is getting stripped off, I enebled Tracing on EntireX XML servlet and tried sending data.

I could find that the space is available as part of payload in ESB but in EntireX trace logs the space characters isn’t available. Hence from EntireX servlet the space is not propagated to mainframes.

Example of data which I’m sending from my application, just the XML tag of the request XML.

<_DOA192A>TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE</_DOA192A><_DOA192A> TESTSPACE </_DOA192A>[/b]
The SagLogger component output the correct message in ESB logs

<_DOA192A>TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE</_DOA192A><_DOA192A> TESTSPACE </_DOA192A>[/b]

Message getting logged in EntireX trace log.

http-808essor24> 14:29:40.575 …( CP:MapValues.setFromIDS() I:_DOA192A-REQ-DECISION-TEXT=TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE TESTSPACE )
http-808
essor24> 14:29:40.575 …( CP:MapValues.setFromIDS() I:_DOA192A-REQ-DECISION-TEXT=TESTSPACE )

I tried to see whether there are any setting available in EntireX Workbench to specify allowing space characters while generating XMM file but the only thing I could see was Null value suppression which I tried but didn’t solve the issue.

Any help on this is really appreciated.

Thanks.
Gijish

Hi Gijish,

welcome to the wonderful world of XML :o This is standard behavior in XML, you might want to google for “xml:space”.

If you have access to servline24 there are a number of articles in the Knowledge Center, search for product EntireX and “xml:space”. They describe how to add xml:space to your mapping.

BTW did you ever consider to use the XMLWrapperGateway instead of the HttpGateway ? Much simpler and more direct to use …

Thanks very much Rolf for your quick reply.

It worked perfectly. The runtime version which I use is 7.2.1.83. Also I didn’t re-deploy the new XMM. Just specifying xml:space=“preserve” in the request XML seems to be working.

Yeah we are also planning to use XMLWrapperGateway instead of HttpGateway.

Thanks again for your help.

Best regards,
Gijish.