on 03-24-2014 6:06 AM
HI All
I have a requirement please suggest me a design
ECC sends a input message to PI with filename and directory through proxy
Sender channel has to pick the image file from the directory and send back the binary data back to proxy
I believe we need to go for BPM .Please let me know if there is any alternative for the same.
Regards
sandeep
Hi,
The scenario can be done by ECC(proxy async) -> PI -> ECC(proxy async).
In your message mapping, you can use file input stream to read the file in an AL11 directory. This is assuming the ECC file system is mounted in your XI file system. Otherwise, you need to use an FTP api in Java to access the ECC directory (also assuming you are allowed to do an ftp call).
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
The suggestion still stands. In message mapping, the filename and directory will be used by the Java FTP API to access the file in ECC, encode it in base64 and then send to abap proxy.
As far as I know, it is not possible to dynamically determine the source filename and directory in a file sender cc.
Regards,
Mark
Dear Sandeep
While it is technically possible to read a file through Java mapping/UDF, please note that this goes against J2EE EJB restrictions.
This is also documented in SAP's JavaDocs for PI
Java mapping programs are not permitted to be stateful. You are therefore not permitted to perform actions such as writing data to a database table during a Java mapping. The Integration Server cannot track such side effects. Therefore, if an attempt is made to resend a message that has not been received by the receiver, the data may inadvertently be written to the database twice in a Java mapping.
Note for Java mapping programs (user-defined functions and Imported Archives), the programming restrictions imposed on J2EE application providers and especially the restrictions imposed on J2EE EJB providers are valid. This means for example, you should not
- load and use JDBC drivers (use instead the Lookup API),
- use class loaders,
- use the package java.io (writing to or reading from file system),
- create and manage threads,
- change system properties (using java.lang.System.setProperties()),
- listen on, accept connections on, or multicast from a network socket.
For more on these restrictions, see chapter 25.1.2 of the EJB 2.1 specification.
Rgds
Eng Swee
Hi Mark
Unfortunately, I don't have a readily available solution to suggest. The tricky part is that file pickup is normally done at a sender communication channel based on polling. However, the requirement here needs it to be on the receiving end.
One idea I could think of is to develop a custom adapter (not module) that would be used at the receiver communication channel. This adapter would receive the synchronous request message (from the sender proxy channel), retrieve the file (via Java IO API), and construct the response message back.
Will be quite an effort though!
Rgds
Eng Swee
Hi Sandeep - See if you can make use of sync/async bridge.
Refer to the page 17 and scenario 6 VARIANT 2: SYNC/ASYN BRIDGE BY MEANS OF MODULE PROCESSOR in the below document.
in the file receiver /sender channel, use execute OS commands option to fetch the file from your FTP server.
i.e. you have to write a custom program(java,perl etc) which will take the file name from the proxy message and fetch that file from FTP and place it on another location.
From that location, your sender channel can pick and send it to proxy..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
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.