on 10-26-2006 4:24 AM
Hey guys,
I have a requirement where I need to call a stored procedure through a JDBC adapter. The particularity in this call is that I need to send the complete source XML payload as a string in just one element and not mapping each element with input variables of the store procedure.
I need to know if there is a way to get the incoming XML payload as one big String within XI.
Any inputs will be helpful !!!
Cheers,
Mauricio
Hi,
This is not possible using Graphical Mapping. You need to look into Java / XSL or ABAP mapping to do the same.
REgards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you write a JAVA Mapping , you need to implement the StreamTransfromationClass which implements execute and setParameter methods.
In the execute method , you get the Source XML as an InputStream and the need to push the Output XML as the output stream.
You can use a DOM or SAX parser to prase the XML source and create the target XML.
To get the entire Source into s String, use this code,
BufferedReader in = new BufferedReader(new InputStreamReader(inp));
StringBuffer buffer = new StringBuffer();
String line="";
while ((line = in.readLine()) != null) {
buffer.append(line);
}
String sourcexml=buffer.toString();
Take a look at thise blog for Java Mapping,
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
Regards,
Bhavesh
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.