on 12-22-2009 5:58 AM
Hi All,
I need to do an RFC Look Up in a Java Mapping program. The response structure of the Function Module to be called consists of only one node called RESULT. In order to read the value exported by the function module in this export parameter RESULT, I am using the following code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = null;
factory.setNamespaceAware(false);
factory.setValidating(false);
Document docResponse = null;
InputStream in1 = result.getContent();
docResponse = builder.parse(in1);
String output = docResponse.getDocumentElement().getFirstChild().getNodeValue();
The function module works correctly and returns the expected result when tested in SE37. However, on running the above code, the statement docResponse.getDocumentElement().getFirstChild().getNodeValue(); always returns the value NULL and not the expected value that is actually returned by the RFC.
Kindly let me know where could I be going wrong.
Thanks in advance.
Hi Sreehari,
Your DOM code looks correct, it might be something with the overall code of java mapping. Just have a look at this blog /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
and compare you code with it. See whether you can fine tune your coding to get the rigth response.
Regards
Suraj
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.