cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping

Former Member
0 Kudos

Hi All,

I have created a class in NWDS, created a JAR file and and imported in XI. While Testing the Interface Mapping

on Test Tab page of Interface Mapping in IR, it is throwing an error "Prblem when Building Tree: XML not well-forme".

How can i check the XML which is being generated as a result of Mapping Program?

How can i debug this?

Thanks and Regards,

Alok.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

did you test the mapping in NDS itself?

try giving the input file there itself (in NDS) and check the output.

Former Member
0 Kudos

Hi Shabarish,

How to test in NDS? Bcz I have created one class which extends DefaultHandler and Implements StreamTransformation interface.

I dont have main method.

Could you please guide me to test in NDS?

Thanks and Regards,

Alok.

stefan_grube
Active Contributor
0 Kudos

Just add a main method:


public static void main (String[] args) {
  try {
    InputStream in = new FileInputStream(new File("in.xml"));
    OutputStream out = new FileOutputStream(new File("out.xml"));
    YourClass change = new YourClass ();
    change.execute(in, out);
  } catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
  }
}

Regards

Stefan

Former Member
0 Kudos

Hi Stefan,

Where i need to save file in.xml? I mean will it be on local PC or on server.

Thanks and Regards,

Alok.

bhavesh_kantilal
Active Contributor
0 Kudos

Alok,

You will have to have this file in your local machine from where you are planning to test your Java mapping using NWDS.

You will need to give the app path.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Where and How can i provide path? Bcz complete path can not be the parameter.

Regards,

Alok.

bhavesh_kantilal
Active Contributor
0 Kudos

hi,

InputStream in = new FileInputStream(new File("D:/folder/in.xml"));
OutputStream out = new FileOutputStream(new File("D:/out.xml"));

Give the path as shown above.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh/Stefan,

Thanks for the help. I have awarded the point.

Thanks and Regards,

Alok.

Answers (0)