1:n Transformation using JAVA Mapping Scenario

10-11  Source: Network gathering  Views:0 

Hi Frnds,
I done a scenario using 1:n Transformation Scenario using XSLT,Graphical Mapping.
But i want to develop scenario Using JAVA Mapping.
Can anybody done the same scenario using JAVA Mapping share the links..
Raj Sekhar
You can use SAX parser for this
firstly create a StringBuffer sb object which will store our target output
when startDocument() gets called append the xml declaration in this method
sb.append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
next for the Test element you have your startElement() method called which will contain the name of your source tag i.e Test
for this , you will need to set a variable boolean isTest to true which was initialised as a false value.
in the characters method you will get the value present in this tag.
test the variable isTest for true value.
if it is true then append the following
sb.append("<Test1>"name"</Test1>"); //name is the buffer passed in characters method
at the end your endelement() will be called
here reset the value of isTest to false.
in your endDocument()
lastly convert to byte[] and then to outputStream format
Edited by: Progirl Progirl on Jul 4, 2008 2:00 PM
Related articles
  • 1:n Transformation using JAVA Mapping Scenario 10-11

    Hi Frnds, I done a scenario using 1:n Transformation Scenario using XSLT,Graphical Mapping. But i want to develop scenario Using JAVA Mapping. Can anybody done the same scenario using JAVA Mapping share the links.. Regards, Raj SekharYou can use SAX

  • XSLT-transformation in Java-Mapping with javax.xml 10-11

    Hi, we wanna use javax.xml for transformations in Java-Mapping. Inside the Java-mapping we read in XSL-files to transform a XML-stream. With XSLT 1.0 everything works fine - but with XSLT 2.0 we are getting runtime errors. Is it possible that javax.x

  • RFC Lookup using Java Mapping program - Examples 10-11

    Dear Experts, I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and neve

  • File to JDBC using JAVA Mapping 11-30

    Hello,   Can u explain me about the above scenario of File to JDBC using JAVA Mapping.    Iam new to XI explain above in detail. *Points will be Rewarded* Thanks&Regards, RavichandKone.HI, If your mapping is one to one then dont go for java mapping u

  • N:1 Mapping Possible using Java Mapping? 10-11

    All, Is it possible to do a N:1 mapping using Java Mapping? If yes , how? Reason for this question is that the execute() of the Java Mapping is going to take the source / request message as the InputStream . In the case of N:1 mapping , as we have mu

  • How TO Use Java Mapping In XI 10-11

    Hi Experts, please help me , How TO Use Java Mapping In XI? Thanks MaheshHi, Just refer the following links for java mapping:- 1./people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs 2./peopl

  • XML Structure Conversion using JAVA Mapping 10-11

    Hi Experts, I am having a requirement in which i want to convert the contents of source xml structure into a string and map it to the target field. Source Structure: <SRC> <Node1>ABCD</Node> <Node2>XYZ</Node2> <Node3>12

  • Dynamic file name while using java mapping 10-11

    Hi All, i need help. I am using java mapping to convert xml file in zip file. Now i need to set output file name as SiteId_TimeStamp.zip. Site id is comping in xml file. How can i do this? I tried many thing but didnt get the solution.. As their is n

  • Query on processing a PDF file using Java mapping 11-30

    Hi All, i am trying to process a XML and PDF file using Java mapping, it is successful in XML but unable to do for PDF. below is the code i am using... can any one guide me how to process PDF's.. byte byte1 = 0;      java.io.ByteArrayOutputStream bos

  • Can any one please send me sample programs using java mapping.. 11-30

    <b>Can any one please send me sample programs using java mapping with input and output?</b> please let me know how to get started with java mapping? Prerequisites for java mapping ? What are the jars need to be deployed for SAX,DOM.  And how t

  • Multi Mapping using JAVA Mapping 1:n Transformation--Urgent?? 10-11

    Hi, I have to make a 1:n Mapping with the JAVA Mapping. The situation is as follows: I have 1 ORDER with n positions and I have to convert this order to n ORDERS with 1 position in each order. My problem is, that I have to use the header-data of the

  • Message splitting using java mapping and BPM 10-11

    Hi all, I have a PLAIN FILE to IDOC Scenario. We decide to use javamapping instead of message mapping because we have several hierachical structures. We has more than one IDOC for file. And the mapping it's unable to detect the another header and cre

  • Splitting using Java mapping 10-11

    Hi,     I am working on a file to IDOC scenario.In the input file am getting data for multiple idocs.The file structure is such that in the sender communication channel am not able to identify the recordsets and hence cannot set the number of records

  • Without BPM:Call RFC using JCO in interface mapping using java mapping 10-11

    Hi all I have a very small scenario where REQUEST from the customer comes via Web Service all i have to do is to read the request using SOAP adapter and call an interface mapping(lets say the name is IM_TEST) inside which there is a JAVA MAPPING prog

  • RFC Lookup using Java Mapping issues 10-11

    Dear Experts, I am trying to use RFC Lookup in my Java program but for some reason I am getting a null point exception on the result variable when the program is executing the following code(rfcin = result.getContent();). Could anyone give me some ad

  • Error using Java Mapping 10-11

    Hi All, I am working on scenario with help of this blog for java mapping http://www.riyaz.net/blog/xipi-java-mapping-demystified/ I am getting error while i test the interface mapping as Problem while building Tree view Unable to display tree view; E

  • Read Attachments using Java Mapping API 10-11

    Hello, after investigating the Java Mapping API a little deeper I found some very interesting Interfaces "InputAttachments" and "Attachments" which could do exactly what is required: Reading attachments and convert them into base64 cod

  • Use java mapping class on PI 7.0 10-11

    Hi experts, I have a problem with a java mapping class on PI 7.0, maybe somebody could help me. I have a java mapping that call a webservice using AXIS library. If I run on my PC the java mapping is working. I load on Imported Archive the Java mappin

  • Digitally Signing specific SOAP elements using Java Mapping 10-11

    Hello SDNers, Iu2019m having trouble creating java mappings to sign and verify digital signatures.  Iu2019m new to Java so this is proving difficult.  I understand the basic concepts of OO programming and utilizing classes/objects to build the progra

  • Can a Java Mapping be used on non-xml data 10-11

    I would like to use a java mapping to transform non-xml formatted data to an IDOC or XML format. 1) Does the input or output of a Java Map have to be XML. 2) If possible can the test feature be used to load and test a non-xml data file. 3) Any commen