on 03-27-2006 11:24 PM
Hello -
1. How can i use an IDOC to map to an xml file using Java mapping in an IDOC -> XI -> XML file scenario?
2. How can i test this scenario outside XI, i mean using Eclipse?
3. How can i create a test data for IDOC for the above scenario in XML format to test it using Java program?
Thanks,
Tirumal
Hi,
<i>***1. How can i use an IDOC to map to an xml file using Java mapping in an IDOC -> XI -> XML file scenario?</i>
It will be a direct xml to xml mapping. Is your requirement requires Java Mapping? Otherwise you can easily do without that - check this-
<i>***2. How can i test this scenario outside XI, i mean using Eclipse?</i>
You need to have XML input for this. Just try to get the IDoc XML or create xml input based on the Idoc Structure. You can make use of WE60 to get IDOC xsd .
<i>***3. How can i create a test data for IDOC for the above scenario in XML format to test it using Java program?</i>
Go to Tcode WE19 in the R/3 and generate the outbound Idoc . And then use that xml ( for question no 2). as a test data to test independently.
Hope this helps..
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Moorthy -
In reply to your question whether i need to use JAVA mapping, Yes, i have to because i am converting the IDOC to cXML and message mapping does not include the <!DOCTYPE... statement after the <xml...
So to add that line i can use the XSLT mapping but XSLT tries to add extra characters "[]" at the end of the <!DOCTYPE ...> statement.
So i am using Java mapping.
Looks like i am using the Java mapping just to add only that extra line <!DOCTYPE...> and to remove the "[]" caused by XSLT mapping.
Let me know if you have a simpler way to do this and i will try to follow your answers and will respond back.
Thanks,
Tirumal
hi,
If your requirement is that you want to add just that <!DOCTYPE.. field, this can be done very easily with Java Mapping. Just push this into your OutputStream in the <b>Start Document()</b> method of your <b>SAX parser</b>, after <xml version.....>.
The rest of the fields, can be written directly to the Output Stream in the respective methods StartElement, EndElement and Chars.
For testing in a standalone, store your input IDOC strcutre in a File and then use the main methods to create the FileInputSteam , FileOutputStream and call the execture method from it,
<b>FileInputStream fi = new FileInputStream("sorucefilepath.xml")
FileOutputStream fo = new FileOutputStream("destinationfileoath.xml
obj.execute(fi,fo);</b>
Regards,
Bhavesh
hi,
>>>>1. How can i use an IDOC to map to an xml file using Java mapping in an IDOC -> XI -> XML file scenario?
IDOC in your case is just an XML document
so your java mapping maps xml to xml ...
>>>>>2. How can i test this scenario outside XI, i mean using Eclipse?
you can have a file with IDOC-XML and test it with standard in any java IDE as xml file to xml filr for example and then just copy the DOM part to a standard java mapping
>>>>3. How can i create a test data for IDOC for the above scenario in XML format to test it using Java program?
use the test tab in integration repository
and ten source view
Regards,
michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.