on 10-17-2008 11:06 AM
hi
I am working on FILE(XML) to JDBC Scenario.
Here i have to send whole file to a single field in DB.
Field type in DB is BLOB,so it can accomidate whole file,but how can i do Many to One in Mapping,hope its not possible.Let me know if any one came across to this type of scenario
Thanks
Prabhakar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In addition to the above, try this...
use a java mapping to conver the input stream to string, u can use SAX parser and n the write method between the DATA xml tags call the variable.pass it to DB, should work out.
Let me know if u require qny help on the code.
Edited by: Ibrahim on Oct 19, 2008 6:35 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkata
Use Normal mapping that will allow you to read a file. Normal for XML and even using FCC if require. In interface mapping use a XSLT or Java mapping to parse all the fields into one single field as a string.
Now the scenario at Interface mapping will be
Source(n fields) -> Graphical mapping(1 to 1 or 1to1 woth additonal) -> Target (from Graphical mapping) -> Java or XSLT (Combinig fields many to 1) -> Target2 ( 1Field) for your JDBC
Check this thread for XSLT code
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The Link give my Prateek has the same stuff you need.
You need to use XSLT mapping and use CDATA in it,it will concatenate the whole XML payload(along with the XML tags) and send to one field.
>>I WANT TO WHOLE INPUT XML TO A TARGET(BLOB ).
Please don't use Capital letters in your post,its equivalent to shouting at other in SDN.
Thanx
Aamir
Its possible through a java mapping. Java mapping can convert the full payload into a single string, which you can pass on to the target node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your message mapping involve the XSLT mapping to achieve the desired result.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.