on 04-20-2012 8:21 AM
Hi Experts,
We have XI installed on Unix Operating system.Can you please provide your valuable inputs on using the encoding cp1250/Windows-1250 in XI. The target system is Windows based application.
Please note that we are not supposed to use the encoding at channel level. We have used the encoding in java mapping but that doesnt work.
Regards,
N. Jayanth Kumar.
Hi,
PI is a unicode system and there is nothing you can do to change this. The only option you have is to change the encoding of some particular messages (for ths particular Windows-based application) at the time of their input/output, with communication channel settings.
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Greg,
The Java mapping is not working currently. We cant use the encoding in communication channel as we send the encrypted file to the target. I suppose we can convert the data to binary format and then use the encoding in java mapping. Can you let me know your thoughts?
Also can you let me know your thoughts on usage of java mapping to make it work.
Regards,
N. Jayanth Kumar.
Hi,
Let me summarize my understanding of your scenario. For the message received, you want to perform mapping, conversion to Windows-1250 and encryption, then place the binary file on some server. Am I right about that? If so, I can see two general approaches here:
1. The one that you started with, where Java mapping handles all the processing: source to target conversion, changing the encoding and encryption. Finally, data is transferred to some file receiver.
2. Any form of mapping (like graphical one, if you prefer) for source to target conversion, then one of the adapter modules that enable encoding conversion (like TextCodepageConversionBean or MessageTransformBean), and then another adapter module for encryption. See here for a nice example by where he gives an example of encryption in some particular message fields. You could go for an almost identical approach to encrypt the whole message, however.
Hope this helps,
Greg
I strongly believe that you can handle pretty much using java mapping. In the operation mapping first use graphical mapping then specify java mapping as second where you do encoding and encryption. This way you can avoid developing adapter module.
You might refer these links for development. It is not that complicated.
http://www.example-code.com/java/encryption.asp
http://www.java2s.com/Code/Java/Security/Basicsymmetricencryptionexample.htm
http://www.exampledepot.com/egs/javax.crypto/desstring.html
Just a thought. Read the source message in the java mapping and write it on a file. Convert the file content to your required encoding. Then encrypt the content and send the data as outputstream.
Hi Baskar,
Thanks for your inputs. Just to update you, we have already used the java mapping and wrote the data in outputstream using encoding cp1250 and it didnt work. I presume the issue is in PI as it has been installed in Unix OS. More over the output is a Flat File not an XML File. If it was an XML file, we could have set the encoding at the XML Tag directly.
Regards,
N. Jayanth Kumar.
hi Jayanth,
using a Java mapping you can set any encoding you like. A payload in PI can also hold binary data (like PDF or images), so there is no restriction.
If you are going to save the payload using the file adapter you must make sure you use "File type Binary" to avoid the adapter making changes in your data.
what do you mean exactly with " wrote the data in outputstream using encoding cp1250 and it didnt work"?
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.