# Formatting using a line feed inside a tag

**URL:** <https://techcommunity.softwareag.com/t/formatting-using-a-line-feed-inside-a-tag/193816>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [March 24, 2017, 7:12pm UTC](https://techcommunity.softwareag.com/t/formatting-using-a-line-feed-inside-a-tag/193816 "2017-03-24T19:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [March 24, 2017, 7:12pm UTC](https://techcommunity.softwareag.com/t/formatting-using-a-line-feed-inside-a-tag/193816/1 "2017-03-24T19:12:25Z")

</div>

Hello,

A java application is exposed via web service that we need to call from Natural in order to pass a “file” inside one of the tags. The IDL generated from the WSDL looks like this:

```auto
/* Generated by Software AG, IDL Extractor for WSDL (9.12.0.0.332) on 2017-03-24 at 10:12:34
/* Optimized for usage with Natural Wrapper.
/* URI=http://gapp013-dev.tcc.etn.com:8081/PollartShippingDocs/PollartShippingDocEngineService (binding for SOAP 1.1)
library 'DBSYSTEM' is
	program 'WS00140N' is
		define data parameter
		1 arg0 (AV)	In
		1 arg1 (AV)	In
		1 return (AV)	Out
		end-define
```

The arg1 parameter is what is to contain the “file” which would look something like this:

```auto
SHIPW34VSTA184                                                               
G1SHIPTEST1 20010719                                                         
G210 KENT ROAD MASCOT NSW 2020                         
G4AUSTRALIA                                                                  
S16341071010719EMERY 0000000000000000000000000000FPEMAM        
S21 0000030000000000000000000000000000000000000000000000000000000000000000
S22 0000030000000000000000000000000000000000000000000000000000000000000000
G1FAAS79370 20000307                                                         
G2C/O EMERY WORLDWIDE ATLANTA 205 SOUTHFIELD PARWAY                   
G4FOREST PARK GA30299                                           
S16569284000307EMERY 0000000000000000000000000000FPEMAM        
S2002 0004000000000000000000000000000000000000000000000000000000000000000000
S2003 0000030000000000000000000000000000000000000000000000000000000000000000
S2008 0000030000000000000000000000000000000000000000000000000000000000000000
S2009 0000010000000000000000000000000000000000000000000000000000000000000000
S2012 0000010000000000000000000000000000000000000000000000000000000000000000
S2014 0000040000000000000000000000000000000000000000000000000000000000000000
S2016 0000020000000000000000000000000000000000000000000000000000000000000000
S2017 0000030000000000000000000000000000000000000000000000000000000000000000
S2018 0000020000000000000000000000000000000000000000000000000000000000000000
S2019 0000100000000000000000000000000000000000000000000000000000000000000000
```

Hence, a sample request payload would be like this:

```auto
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated by Software AG, EntireX XML Mapping Editor (9.12.0.0.332) on 2017-03-24 at 10:13:04 -->
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header></SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <m:readFile xmlns:m="http://service.order.pollart.eaton.com/">
         <arg0>20170324140732</arg0>
         <arg1>SHIPW34VSTA184                                                               
G1SHIPTEST1 20010719                                                         
G210 KENT ROAD MASCOT NSW 2020                         
G4AUSTRALIA                                                                  
S16341071010719EMERY 0000000000000000000000000000FPEMAM        
S21 0000030000000000000000000000000000000000000000000000000000000000000000
S22 0000030000000000000000000000000000000000000000000000000000000000000000
G1FAAS79370 20000307                                                         
G2C/O EMERY WORLDWIDE ATLANTA 205 SOUTHFIELD PARWAY                   
G4FOREST PARK GA30299                                           
S16569284000307EMERY 0000000000000000000000000000FPEMAM        
S2002 0004000000000000000000000000000000000000000000000000000000000000000000
S2003 0000030000000000000000000000000000000000000000000000000000000000000000
S2008 0000030000000000000000000000000000000000000000000000000000000000000000
S2009 0000010000000000000000000000000000000000000000000000000000000000000000
S2012 0000010000000000000000000000000000000000000000000000000000000000000000
S2014 0000040000000000000000000000000000000000000000000000000000000000000000
S2016 0000020000000000000000000000000000000000000000000000000000000000000000
S2017 0000030000000000000000000000000000000000000000000000000000000000000000
S2018 0000020000000000000000000000000000000000000000000000000000000000000000
S2019 0000100000000000000000000000000000000000000000000000000000000000000000</arg1>
      </m:readFile>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
```

Implicit in the arg1 parameter, I would think, in order to keep that from just being a string of characters because XML doesn’t really see the line breaks is an actual line feed (LF) character. Therefore, to build the content of the data, the Natural program put an EBCDIC x’25’ character at the end of each line. However that failed because for some reason they were translated into ASCII x’20’ characters (spaces).

Next I tried having Natural put ’ ’ at the end of each line, but I still am not sure that works as the XML RPC Server logs show this came through as ‘&#xA;’.

What do I need to put at the end of each line in the Natural program when building arg1’s data to produce the results I need so that the Java server program will see multi-line data appropriately?

Thanks in advance!

-Brian

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [March 27, 2017, 10:10am UTC](https://techcommunity.softwareag.com/t/formatting-using-a-line-feed-inside-a-tag/193816/2 "2017-03-27T10:10:13Z")

</div>

Hello Brian,

I see 2 simple solutions, but maybe they are too simple 😃

1. Just use the EntireX Java RPC Server to call the Java program from Natural.
2. Define arg1 as an array, each array item contains one line.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:38pm UTC](https://techcommunity.softwareag.com/t/formatting-using-a-line-feed-inside-a-tag/193816/3 "2021-04-02T15:38:09Z")

</div>


