on ‎2007 Nov 02 10:18 AM
Hi,
I have the following requirement:
1. A document is scanned and a TIFF image is saved in a directory
2. The File adapter picks up the image file and sends into XI
3. The binary data is converted into XML so a Web Service can be called (this web service will store the image in a database application)
<b>The part I am struggling with is the convert of the incoming binary data into a XML format document which will allow the Web Service to be called.</b>
Graphical mapping cannot be used therefore I am left with 3 options:
1. XSLT mapping
2. Java mapping
3. ABAP mapping
Can anyone suggest the best option to use in these circumstances and provide some sample snippet of code on how to do it.
I am alright at XSLT mapping but this is beyond me and Java mapping is completely new to me as I have very limited Java knowledge.
Thanks for your help
Colin.
Request clarification before answering.
The question is: How would the webservice expect the file?
An option is using base64 encoding. See this blog for an example:
/people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
Instead of using an adapter modile, you can use Java or ABAP Mapping for the conversion. The webservice needs to decode the base64.
Another option is sending the file as an attachment. Here you can use the functionality of sending several files from file adapter. You have to apply an XML as main payload and the TIFF as attachment. Then you need not do anything special in mapping.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Colin,
can you process attachments in ur target WS?
If yes, you don't need to convert it to XML, just send the file as attachment..
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Colin
I think this maybe do-able using XSLT.
There is a similar function within Stylus Studio which may help convert other formats to XML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi colin,
it can be achieved using java mapping
refer this pdf
regards
Ramesh P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Colin
Look for the below link
<b>***Reward point if helpfull</b>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.