Stylus studio to convert Edifact message to edi xml using mule studio


Description:
United Nations/Electronic Data Interchange For Administration, Commerce and Transport (UN/EDIFACT) is the international EDI standard developed under the United Nations. The work of maintenance and further development of this standard is done through the United Nations Centre for Trade Facilitation and Electronic Business (UN/CEFACT) under the UN Economic Commission for Europe, in the Finance Domain working group UN CEFACT TBG5. EDIFACT has been adopted by the International Organization for Standardization (ISO) as the ISO standard ISO 9735.
The EDIFACT standard provides


  • A set of syntax rules to structure data,
  • An interactive exchange protocol (I-EDI),
  • Standard messages which allow multi-country and multi-industry exchange.
See below for an example of an EDIFACT message used to answer to a product availability request:
  • ' is a segment terminator
  • + is a data element separator
  •  : is a component data element separator
  •  ? is a release character
Note: The line breaks after each segment in this example have been added for readability. There are typically no line breaks in EDI data.
UNH+1+PAORES:93:1:IA'- This is the header segment which is required at the start of every message. This code specifies that the message name and version is PAORES 93 revision 1 and it was defined by the organisation IA (IATA).
IFT+3+NO MORE FLIGHTS' - This is an "Interactive Free Text" segment containing the text "NO MORE FLIGHTS".
UNT+13+1' - This is the tail segment. It indicated that the message sent contains 13 segments.

[edit] Structure

EDIFACT has a hierarchical structure where the top level is referred to as an interchange, and lower levels contain multiple messages which consist of segments, which in turn consist of composites. The final iteration is an element which is derived from the United Nations Trade Data Element Directory (UNTDED) and are normalised throughout the EDIFACT standard.
A group or segment can be mandatory (M) or conditional (C) and can be specified to repeat. For example, C99 indicates between 0 and 99 repetitions of a segment or group, while M99 signifies between 1 and 99 repetitions.
A group, like a message, is a sequence of segments or groups. The first segment or group beneath a group must be mandatory, and the group should be made conditional if the logic of the situation demands it.
            Service String Advice     UNA   Conditional
     _____  Interchange Header        UNB   Mandatory
    |  ___  Functional Group Header   UNG   Conditional
    | |  _  Message Header            UNH   Mandatory
    | | |   User Data Segments              As required
    | | |_  Message Trailer           UNT   Mandatory
    | |___  Functional Group Trailer  UNE   Conditional
    |_____  Interchange Trailer       UNZ   Mandatory

[edit] Current state of EDIFACT

There is an apparent battle between XML and EDIFACT. An equivalent XML message has a larger file size than an EDIFACT message, but it is easier for users to read (although this is not necessary because the contents are created to be read by computers). Another possible explanation is that compatibility is being favored over performance, since more tools exist to work with XML data than with EDIFACT. EDIFACT-messages can be as much as one tenth the size of XML-messages. That makes XML less attractive for very high volume applications.
An advantage of EDIFACT is the availability of agreed message-contents, which XML must leverage to develop its own similar agreed contents. RosettaNet is one of the emerging XML standards and is widely used in semiconductors and high tech industries.
UBL is another currently being adopted by Scandinavian governments as a legally required standard for sending invoices to governments, and was enforced in February 2005 that all invoices to the Danish government must be sent in an electronic format.
ebXML is another XML standard built by UN/CEFACT (along with EDIFACT), and is often seen as a standard best suited for small and medium enterprises.
However, EDIFACT is likely to remain the most widely used in high tech, civil aviation, retail and tourism industries, due to the amount of software that leverages the standard, and the need for integration between new systems and legacy systems.[citation needed]
Europe has a large EDIFACT installed base because it adopted the technology early, while the Asian region adopted B2B in later implementations and is therefore using more XML standards.
EDIFACT will grow further in Europe's energy market where it is a current requirement.
 For under standing of Edifact Message click below three link
For Example under standing 

How to do:
XMl to Java object and java object to xml creation using JAXB
So download
stylus-studio-enterprise-16-x64.exe 

After Install 




Code 0: edifactmessage.xml
?
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd">
    <http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="8080" basePath="/edimessage" doc:name="HTTP Listener Configuration"/>
    <flow name="edifactmessageFlow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <cxf:jaxws-service doc:name="CXF" serviceClass="com.kartik.edi.message.IEdifactMessage"/>
        <component>
        <singleton-object class="com.kartik.edi.message.impl.EdifactMessageImpl" />
        </component>
    </flow>
</mule>



Code 1:IEdifactMessage.java
?
package com.kartik.edi.message;

import javax.jws.WebService;

@WebService(targetNamespace="http://www.kartik.com")
public interface IEdifactMessage {
String generatePaymulEdiToXml(String edimessage);

String generatePaymulXmlToEdi(String xml);
}

Code 2:EdifactMessageImpl.java
?
package com.kartik.edi.message.impl;

import javax.jws.WebService;

import com.kartik.edi.message.IEdifactMessage;
import com.kartik.edi.message.helper.EdiToEdiXmlConvert;

@WebService(endpointInterface="com.kartik.edi.message.IEdifactMessage", targetNamespace="http://www.kartik.com")
public class EdifactMessageImpl implements IEdifactMessage{

@Override
public String generatePaymulEdiToXml(String edimessage) {
System.out.println(edimessage);
EdiToEdiXmlConvert xml=new EdiToEdiXmlConvert();
String xxx = xml.ediToEdiXml(edimessage);
System.out.println(xxx);
return xxx;
}

@Override
public String generatePaymulXmlToEdi(String xml) {
System.out.println(xml);
EdiToEdiXmlConvert edi=new EdiToEdiXmlConvert();
String xxx = edi.ediXmlToEdi(xml);
System.out.println(xxx);
return xxx;
}

}



Code 3:EdiToEdiXmlConvert.java
?
package com.kartik.edi.message.helper;

import java.io.StringReader;
import java.io.StringWriter;

import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

import com.ddtek.xmlconverter.ConvertFromXML;
import com.ddtek.xmlconverter.ConvertToXML;
import com.ddtek.xmlconverter.ConverterFactory;

public class EdiToEdiXmlConvert {
/**

* @param edimessage edimessage
* @return String
*/
public String ediToEdiXml(String edimessage){
ConverterFactory cf = new ConverterFactory();
String strResult = null;
try {
ConvertToXML c2x = cf.newConvertToXML("EDI");
StreamSource source = new StreamSource(new StringReader(edimessage));
StringWriter writer = new StringWriter();
   StreamResult result = new StreamResult(writer);
c2x.convert(source, result);
 strResult = writer.toString();
System.out.println(" Converted " +strResult);
} catch (Exception e) {
e.printStackTrace();
}
return strResult;

}

/**

* @param xml xml
* @return String
*/
public String ediXmlToEdi(String xml){
String strResult = null;

ConverterFactory cf = new ConverterFactory();
try {
ConvertFromXML c2x = cf.newConvertFromXML("EDI");
StreamSource source = new StreamSource(new StringReader(xml));
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
c2x.convert(source, result);
strResult = writer.toString();
System.out.println(" Converted " +strResult);
} catch (Exception e) {
e.printStackTrace();
}
return strResult;
}

}


Soap Input : 
?
UNH+1+PAYMUL:D:96A:UN'
BGM+452+123456'
DTM+137:20140508:102'
LIN+1'
DTM+203:20140508:102'
RFF+AEK:12344567'
BUS++DO'
MOA+9:50000.00:DKK'
FII+OR+21490810494433:Teledk::DKK+NDEADKKK:25:17+DK'
SEQ++1'
MOA+9:50000.00'
RFF+CR:99812344567'
PAI+::42'
FII+BF+21494371257077:DANCORP+NDEADKKK:25:17'
NAD+BE+++WESTBENGAL+KARTIK 20+MANDAL++1212+DK'
PRC+11'
FTX+PMD+++Invoice 928'
UNT+18+1'



Soap output: 
?
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<EDIFACT>
<UNB>
<UNB01>
<UNB0101><!--0001: Syntax identifier-->UNOA<!--UN/ECE level A--></UNB0101>
<UNB0102><!--0002: Syntax version number-->4<!--Version 4--></UNB0102>
</UNB01>
<UNB02>
<UNB0201><!--0004: Interchange sender identification-->SENDER</UNB0201>
</UNB02>
<UNB03>
<UNB0301><!--0010: Interchange recipient identification-->RECIPIENT</UNB0301>
</UNB03>
<UNB04>
<UNB0401><!--0017: Date-->20161130</UNB0401>
<UNB0402><!--0019: Time-->1242</UNB0402>
</UNB04>
<UNB05><!--0020: Interchange control reference-->DDXC MATERIALIZED SEGMENT</UNB05>
</UNB>
<PAYMUL>
<UNH>
<UNH01><!--0062: Message reference number-->1</UNH01>
<UNH02>
<UNH0201><!--0065: Message type-->PAYMUL<!--Multiple payment order message--></UNH0201>
<UNH0202><!--0052: Message version number-->D<!--Draft version--></UNH0202>
<UNH0203><!--0054: Message release number-->96A<!--Release 1996 - A--></UNH0203>
<UNH0204><!--0051: Controlling agency, coded-->UN<!--UN/ECE/TRADE/WP.4--></UNH0204>
</UNH02>
</UNH>
<BGM>
<BGM01>
<BGM0101><!--1001: DOCUMENT/MESSAGE NAME, CODED-->452<!--Multiple payment order--></BGM0101>
</BGM01>
<BGM02><!--1004: Document/message number-->123456</BGM02>
</BGM>
<DTM>
<DTM01>
<DTM0101><!--2005: Date/time/period qualifier-->137<!--Document/message date/time--></DTM0101>
<DTM0102><!--2380: Date/time/period-->20140508</DTM0102>
<DTM0103><!--2379: Date/time/period format qualifier-->102<!--CCYYMMDD--></DTM0103>
</DTM01>
</DTM>
<GROUP_4>
<LIN>
<LIN01><!--1082: LINE ITEM NUMBER-->1</LIN01>
</LIN>
<DTM>
<DTM01>
<DTM0101><!--2005: Date/time/period qualifier-->203<!--Execution date/time, requested--></DTM0101>
<DTM0102><!--2380: Date/time/period-->20140508</DTM0102>
<DTM0103><!--2379: Date/time/period format qualifier-->102<!--CCYYMMDD--></DTM0103>
</DTM01>
</DTM>
<RFF>
<RFF01>
<RFF0101><!--1153: Reference qualifier-->AEK<!--Payment order number--></RFF0101>
<RFF0102><!--1154: Reference number-->12344567</RFF0102>
</RFF01>
</RFF>
<BUS>
<BUS02><!--3279: GEOGRAPHIC ENVIRONMENT, CODED-->DO<!--Domestic--></BUS02>
</BUS>
<GROUP_5>
<MOA>
<MOA01>
<MOA0101><!--5025: Monetary amount type qualifier-->9<!--Amount due/amount payable--></MOA0101>
<MOA0102><!--5004: Monetary amount-->50000.00</MOA0102>
<MOA0103><!--6345: Currency, coded-->DKK</MOA0103>
</MOA01>
</MOA>
</GROUP_5>
<GROUP_6>
<FII>
<FII01><!--3035: PARTY QUALIFIER-->OR<!--Ordered bank--></FII01>
<FII02>
<FII0201><!--3194: Account holder number-->21490810494433</FII0201>
<FII0202><!--3192: Account holder name-->Teledk</FII0202>
<FII0204><!--6345: Currency, coded-->DKK</FII0204>
</FII02>
<FII03>
<FII0301><!--3433: Institution name identification-->NDEADKKK</FII0301>
<FII0302><!--1131: Code list qualifier-->25<!--Bank identification--></FII0302>
<FII0303><!--3055: Code list responsible agency, coded-->17<!--S.W.I.F.T.--></FII0303>
</FII03>
<FII04><!--3207: Country, coded-->DK</FII04>
</FII>
</GROUP_6>
<GROUP_11>
<SEQ>
<SEQ02>
<SEQ0201><!--1050: Sequence number-->1</SEQ0201>
</SEQ02>
</SEQ>
<MOA>
<MOA01>
<MOA0101><!--5025: Monetary amount type qualifier-->9<!--Amount due/amount payable--></MOA0101>
<MOA0102><!--5004: Monetary amount-->50000.00</MOA0102>
</MOA01>
</MOA>
<RFF>
<RFF01>
<RFF0101><!--1153: Reference qualifier-->CR<!--Customer reference number--></RFF0101>
<RFF0102><!--1154: Reference number-->99812344567</RFF0102>
</RFF01>
</RFF>
<PAI>
<PAI01>
<PAI0103><!--4461: Payment means, coded-->42<!--Payment to bank account--></PAI0103>
</PAI01>
</PAI>
<GROUP_12>
<FII>
<FII01><!--3035: PARTY QUALIFIER-->BF<!--Beneficiary's bank--></FII01>
<FII02>
<FII0201><!--3194: Account holder number-->21494371257077</FII0201>
<FII0202><!--3192: Account holder name-->DANCORP</FII0202>
</FII02>
<FII03>
<FII0301><!--3433: Institution name identification-->NDEADKKK</FII0301>
<FII0302><!--1131: Code list qualifier-->25<!--Bank identification--></FII0302>
<FII0303><!--3055: Code list responsible agency, coded-->17<!--S.W.I.F.T.--></FII0303>
</FII03>
</FII>
</GROUP_12>
<GROUP_13>
<NAD>
<NAD01><!--3035: PARTY QUALIFIER-->BE<!--Beneficiary--></NAD01>
<NAD04>
<NAD0401><!--3036: Party name-->WESTBENGAL</NAD0401>
</NAD04>
<NAD05>
<NAD0501><!--3042: Street and number/p.o. box-->KARTIK 20</NAD0501>
</NAD05>
<NAD06><!--3164: CITY NAME-->MANDAL</NAD06>
<NAD08><!--3251: POSTCODE IDENTIFICATION-->1212</NAD08>
<NAD09><!--3207: Country, coded-->DK</NAD09>
</NAD>
</GROUP_13>
<GROUP_16>
<PRC>
<PRC01>
<PRC0101><!--7187: Process type identification-->11<!--Processing of unstructured information--></PRC0101>
</PRC01>
</PRC>
<FTX>
<FTX01><!--4451: TEXT SUBJECT QUALIFIER-->PMD<!--Payment detail/remittance information--></FTX01>
<FTX04>
<FTX0401><!--4440: Free text-->Invoice 928</FTX0401>
</FTX04>
</FTX>
</GROUP_16>
</GROUP_11>
</GROUP_4>
<UNT>
<UNT01><!--0074: Number of segments in a message-->18</UNT01>
<UNT02><!--0062: Message reference number-->1</UNT02>
</UNT>
</PAYMUL>
<UNZ>
<UNZ01><!--0036: Interchange control count-->1</UNZ01>
<UNZ02><!--0020: Interchange control reference-->DDXC MATERIALIZED SEGMENT</UNZ02>
</UNZ>
</EDIFACT>]]>

N.B:
?

1. CDATA Background

CDATA sections are used in XML documents to escape longer blocks of text that could otherwise be interpreted as markup, for example:
<message><![CDATA[<data>some embedded xml</data>]]></message>
Here the string "<data>some embedded xml</data>" is just that; a string, and not XML. Another way of writing this could be:
<message>&lt;data&gt;some embedded xml&lt;/data&gt;</message>
Which is 100% equivalent to the previous version using CDATA; parsing either of these with some parser would return the content as a string and not parsed out as XML.
What if the embedded XML contains a CDATA section? Wouldn't the embedded ]]> terminate the outer <![CDATA[ ? Yes it would! So, you can't embedded a CDATA straight off, but will need to temporarily terminate the outer CDATA to be able to pull this off. Let's say we have the following string:
<data>some embedded xml <![CDATA[<text>with xml</text>]]></data>
and want to put this in an XML document. The result could be either
<message>&lt;data&gt;some embedded xml &lt;![CDATA[&lt;text&gt;with xml&lt;/text&gt;]]&gt;&lt;/data&gt;</message>
with standard XML entities, or (pay attention now..)
<message><![CDATA[<data>some embedded xml <![CDATA[<text>with xml</text>]]]]>><![CDATA[</data>]]></message>
Confused? The first CDATA section wraps the following characters: "<data>some embedded xml <![CDATA[<text>with xml</text>]]" (notice the missing terminating '>' which would have turned the last three characters into a CDATA terminator), then comes a single ">" (which doesn't need to be entitized into &gt; since it can't be mistaken for any markup), and then another CDATA containing the string "</data>". Assembling these three strings gives us the original, and so will a parsing XML processor with either method.

2. CDATA in SoapUI

It is (unfortunately) quite common that SOAP messages contain some part of the payload in a request or response as a string and not as XML, which has both advantages and disadvantages. In SoapUI these XML strings are not easily validated against a schema (scripting required!), they are not easily asserted with XPath, and using them as targets/sources for property transfers is difficult since they are strings, not XML. Also the extended message viewers in SoapUI Pro (Outline, Overview) show these as strings and not as markup, which can be confusing.
Let's say we have the following response message for an item search:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:sam="http://www.example.org/sample/">
   <soapenv:Header/>
   <soapenv:Body>
      <sam:searchResponse>
         <sam:searchResponse>
            <item><id>1234</id><description><![CDATA[<item><width>123</width><height>345</height>
<length>098</length><isle>A34</isle></item>]]></description><price>123</price>
            </item>
         </sam:searchResponse>
      </sam:searchResponse>
   </soapenv:Body>
</soapenv:Envelope>


Input: soap input of second method
?
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<EDIFACT>
<UNB>
<UNB01>
<UNB0101><!--0001: Syntax identifier-->UNOA<!--UN/ECE level A--></UNB0101>
<UNB0102><!--0002: Syntax version number-->4<!--Version 4--></UNB0102>
</UNB01>
<UNB02>
<UNB0201><!--0004: Interchange sender identification-->SENDER</UNB0201>
</UNB02>
<UNB03>
<UNB0301><!--0010: Interchange recipient identification-->RECIPIENT</UNB0301>
</UNB03>
<UNB04>
<UNB0401><!--0017: Date-->20161130</UNB0401>
<UNB0402><!--0019: Time-->1242</UNB0402>
</UNB04>
<UNB05><!--0020: Interchange control reference-->DDXC MATERIALIZED SEGMENT</UNB05>
</UNB>
<PAYMUL>
<UNH>
<UNH01><!--0062: Message reference number-->1</UNH01>
<UNH02>
<UNH0201><!--0065: Message type-->PAYMUL<!--Multiple payment order message--></UNH0201>
<UNH0202><!--0052: Message version number-->D<!--Draft version--></UNH0202>
<UNH0203><!--0054: Message release number-->96A<!--Release 1996 - A--></UNH0203>
<UNH0204><!--0051: Controlling agency, coded-->UN<!--UN/ECE/TRADE/WP.4--></UNH0204>
</UNH02>
</UNH>
<BGM>
<BGM01>
<BGM0101><!--1001: DOCUMENT/MESSAGE NAME, CODED-->452<!--Multiple payment order--></BGM0101>
</BGM01>
<BGM02><!--1004: Document/message number-->123456</BGM02>
</BGM>
<DTM>
<DTM01>
<DTM0101><!--2005: Date/time/period qualifier-->137<!--Document/message date/time--></DTM0101>
<DTM0102><!--2380: Date/time/period-->20140508</DTM0102>
<DTM0103><!--2379: Date/time/period format qualifier-->102<!--CCYYMMDD--></DTM0103>
</DTM01>
</DTM>
<GROUP_4>
<LIN>
<LIN01><!--1082: LINE ITEM NUMBER-->1</LIN01>
</LIN>
<DTM>
<DTM01>
<DTM0101><!--2005: Date/time/period qualifier-->203<!--Execution date/time, requested--></DTM0101>
<DTM0102><!--2380: Date/time/period-->20140508</DTM0102>
<DTM0103><!--2379: Date/time/period format qualifier-->102<!--CCYYMMDD--></DTM0103>
</DTM01>
</DTM>
<RFF>
<RFF01>
<RFF0101><!--1153: Reference qualifier-->AEK<!--Payment order number--></RFF0101>
<RFF0102><!--1154: Reference number-->12344567</RFF0102>
</RFF01>
</RFF>
<BUS>
<BUS02><!--3279: GEOGRAPHIC ENVIRONMENT, CODED-->DO<!--Domestic--></BUS02>
</BUS>
<GROUP_5>
<MOA>
<MOA01>
<MOA0101><!--5025: Monetary amount type qualifier-->9<!--Amount due/amount payable--></MOA0101>
<MOA0102><!--5004: Monetary amount-->50000.00</MOA0102>
<MOA0103><!--6345: Currency, coded-->DKK</MOA0103>
</MOA01>
</MOA>
</GROUP_5>
<GROUP_6>
<FII>
<FII01><!--3035: PARTY QUALIFIER-->OR<!--Ordered bank--></FII01>
<FII02>
<FII0201><!--3194: Account holder number-->21490810494433</FII0201>
<FII0202><!--3192: Account holder name-->Teledk</FII0202>
<FII0204><!--6345: Currency, coded-->DKK</FII0204>
</FII02>
<FII03>
<FII0301><!--3433: Institution name identification-->NDEADKKK</FII0301>
<FII0302><!--1131: Code list qualifier-->25<!--Bank identification--></FII0302>
<FII0303><!--3055: Code list responsible agency, coded-->17<!--S.W.I.F.T.--></FII0303>
</FII03>
<FII04><!--3207: Country, coded-->DK</FII04>
</FII>
</GROUP_6>
<GROUP_11>
<SEQ>
<SEQ02>
<SEQ0201><!--1050: Sequence number-->1</SEQ0201>
</SEQ02>
</SEQ>
<MOA>
<MOA01>
<MOA0101><!--5025: Monetary amount type qualifier-->9<!--Amount due/amount payable--></MOA0101>
<MOA0102><!--5004: Monetary amount-->50000.00</MOA0102>
</MOA01>
</MOA>
<RFF>
<RFF01>
<RFF0101><!--1153: Reference qualifier-->CR<!--Customer reference number--></RFF0101>
<RFF0102><!--1154: Reference number-->99812344567</RFF0102>
</RFF01>
</RFF>
<PAI>
<PAI01>
<PAI0103><!--4461: Payment means, coded-->42<!--Payment to bank account--></PAI0103>
</PAI01>
</PAI>
<GROUP_12>
<FII>
<FII01><!--3035: PARTY QUALIFIER-->BF<!--Beneficiary's bank--></FII01>
<FII02>
<FII0201><!--3194: Account holder number-->21494371257077</FII0201>
<FII0202><!--3192: Account holder name-->DANCORP</FII0202>
</FII02>
<FII03>
<FII0301><!--3433: Institution name identification-->NDEADKKK</FII0301>
<FII0302><!--1131: Code list qualifier-->25<!--Bank identification--></FII0302>
<FII0303><!--3055: Code list responsible agency, coded-->17<!--S.W.I.F.T.--></FII0303>
</FII03>
</FII>
</GROUP_12>
<GROUP_13>
<NAD>
<NAD01><!--3035: PARTY QUALIFIER-->BE<!--Beneficiary--></NAD01>
<NAD04>
<NAD0401><!--3036: Party name-->WESTBENGAL</NAD0401>
</NAD04>
<NAD05>
<NAD0501><!--3042: Street and number/p.o. box-->KARTIK 20</NAD0501>
</NAD05>
<NAD06><!--3164: CITY NAME-->MANDAL</NAD06>
<NAD08><!--3251: POSTCODE IDENTIFICATION-->1212</NAD08>
<NAD09><!--3207: Country, coded-->DK</NAD09>
</NAD>
</GROUP_13>
<GROUP_16>
<PRC>
<PRC01>
<PRC0101><!--7187: Process type identification-->11<!--Processing of unstructured information--></PRC0101>
</PRC01>
</PRC>
<FTX>
<FTX01><!--4451: TEXT SUBJECT QUALIFIER-->PMD<!--Payment detail/remittance information--></FTX01>
<FTX04>
<FTX0401><!--4440: Free text-->Invoice 928</FTX0401>
</FTX04>
</FTX>
</GROUP_16>
</GROUP_11>
</GROUP_4>
<UNT>
<UNT01><!--0074: Number of segments in a message-->18</UNT01>
<UNT02><!--0062: Message reference number-->1</UNT02>
</UNT>
</PAYMUL>
<UNZ>
<UNZ01><!--0036: Interchange control count-->1</UNZ01>
<UNZ02><!--0020: Interchange control reference-->DDXC MATERIALIZED SEGMENT</UNZ02>
</UNZ>
</EDIFACT>]]>


SOAP output:  method two
?
UNA:+.? '
UNB+UNOA:4+SENDER+RECIPIENT+20161130:1242+DDXC MATERIALIZED SEGMENT'
UNH+1+PAYMUL:D:96A:UN'
BGM+452+123456'
DTM+137:20140508:102'
LIN+1'
DTM+203:20140508:102'
RFF+AEK:12344567'
BUS++DO'
MOA+9:50000.00:DKK'
FII+OR+21490810494433:Teledk::DKK+NDEADKKK:25:17+DK'
SEQ++1'
MOA+9:50000.00'
RFF+CR:99812344567'
PAI+::42'
FII+BF+21494371257077:DANCORP+NDEADKKK:25:17'
NAD+BE+++WESTBENGAL+KARTIK 20+MANDAL++1212+DK'
PRC+11'
FTX+PMD+++Invoice 928'
UNT+18+1'
UNZ+1+DDXC MATERIALIZED SEGMENT'


Previous
Next Post »