Hi All,
I have wriiten a RFC lookup for mapping the company code. But I am not getting the result while parsing the XML. I have tested the code and without parsing I am getting the correct value in XML. Can anybody send the code for parsing the XML data using DOM.
Below is the code which I am using .
try {
docResponse = builder.parse(in);
if (docResponse == null) {
importanttrace.addWarning("docResponse is null");
}
res = docResponse.getElementsByTagName("COMPANYID").item(0).getFirstChild().getNodeValue();
if (res == null) {
importanttrace.addWarning("res is null");
}
}
catch (Exception e) {
importanttrace.addWarning("Error when parsing RFC Response - " + e.getMessage());
}
try {
// Free resources, close the accessor..
if (accessor != null) {
try {
accessor.close();
} catch (LookupException e) {
importanttrace.addWarning( "Error while closing accessor " + e.getMessage());
}
}
} catch (Exception e) {
importanttrace.addWarning("Result value not found in DOM - " + e);
}
// return the result obtained above
return res;
Thanks,
Aparna