on 06-13-2006 7:46 AM
Hi....
I have done java mapping using file to file scenario....
I have created two data types, two message types, two message interfaces... in imported archives i have imported
dom4j-1.6.1.zip and itext.jar files..
i have written my java code like this:
package com.xmltopdf;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import com.lowagie.text.xml.XmlToPdf;
public class MyXmlToPdf {
public MyXmlToPdf(String inputFile, String outputFile){
try {
XmlToPdf xtp = new XmlToPdf();
System.out.println("Ravi");
xtp.parse(new FileInputStream(inputFile), new FileOutputStream(outputFile));
}catch(Exception e ) {
System.out.println(e);
}
}
}
in message mapping i have invoked "MyXmlToPdf(String,String) constructor like this:
MyXmlToPdf xmt= MyXmlTOPdf("C:
source
filetofile.xml","C:
source
file.pdf");
return "";
and i have configured my communication channel, reciever determination, sender aggrement, reciver aggrement, and interface determination.....
so please tell me whether my code is correct or not... if its correct why i am not getting the pdf file.. if its not correct please tell me whats wrong in my code...
Thanks & Regards
Ravi Shankar B
Hi Ravi,
Normally Java mapping is used to convert an source XML message to target XML message.If your requirement is to generate a PDF file for the source XML try to write a File adapter module at the receiver end to do this job.
The problem could be your File path. Please check the following:
1. Did you check your source file C:\source\filetofile.xml is available in <b>XI server</b>?
2. Try to give the filename like this : <b>C:/source/filetofile.xml</b>
Please let me know if u need further help.
Regards,
Ananth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.