Skip to Content
0
Former Member
Jun 13, 2006 at 06:46 AM

Java Mapping Code

10 Views

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