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:
/* 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:
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:
<?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 ‘
’.
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