I have a scenerio to convert UTF-8 file format to latin-1/ISO 8859-1 in OSB 12C JCA FTP Adapter.Kindly help me to do the same.
Thanks in advance.
- Rajesh
For inbound requests and outbound responses, the JCA adapter sends
messages to JCA proxy services with UTF-8 encoding.
But in the pipeline you change the encoding from UTF-8 to 'ISO 8859-1' which supports Latin-1.
1.) Open the pipeline
2.) Add the Transport Header component in the project pipeline.
3.) Click oh that Transport Header component and open properties.
4.) Select the Direction value from dropdown 'Outbound request' or 'Inbound Response'.
5.) In the header select the protocol type 'jca'.
6.) Add Action in header by clicking on + sign.
7.) In Action select 'SET' and in name select 'Content encoding' and in value put the encoding value as 'ISO 8859-1'.
8.) Save the project and test.
There is another way using X-query functions you can use that as well in the pipeline.
Related
Following instructions provided in https://developer.ibm.com/tutorials/mq-jms-application-development-with-spring-boot/, I developed a sample Spring boot web application in order to be able to send and receive messages over IBM MQ using JMS template.
In case of a MQ server not on local host, I updated the application.properties file with:
ibm.mq.conn-name=<my-server-host-name>(<my-server-port>)
Unfortunately this is not the appropriate property as the application is searching for a queue manager on localhost.
I did not find in the documentation anything about the property to use for that. And yes, I gave a try to ibm.mq.host and ibm.mq.port.
For IBM config you need to provide the following properties:
Yml extension:
ibm:
mq:
queueManager: {queueManagerName}
channel: {channelName}
connName: localhost(1415)
user: {UserName}
property extension:
ibm.mq.queueManager={queueManagerName}
ibm.mq.channel={channelName}
ibm.mq.connName=localhost(1415)
ibm.mq.user={userName}
connName you can find in the Listener directory:
In my case IP address is equal: localhost
Port is equal: 1415
channelName you can find in Channels directory.
As per https://github.com/ibm-messaging/mq-jms-spring the default connection properties for mq-jms-spring-boot-starter are
The default attributes are
ibm.mq.queueManager=QM1
ibm.mq.channel=DEV.ADMIN.SVRCONN
ibm.mq.connName=localhost(1414)
ibm.mq.user=admin
ibm.mq.password=passw0rd
You will most likely need to set connName, user and password. The default port is 1414, but if you are running MQ in the cloud then you will need to look up in you cloud what port to use. You will get the port from the same place you look up the server url.
You may also need to supply TLS parameters - https://github.com/ibm-messaging/mq-jms-spring#tls-related-options
You can find sample code here - https://github.com/ibm-messaging/mq-dev-patterns/tree/master/Spring-JMS The 101 sample ( https://github.com/ibm-messaging/mq-dev-patterns/tree/master/Spring-JMS/src/main/java/com/ibm/mq/samples/jms/spring/level101 ) has very little code, so a good test of whether the connection parameters are right.
Alter channel page https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q085170_.htm shows that I can use Disconnect interval (DISCINT) in server connection channel alter command, however I get error message which claims that it can only be used for server or sender channel types, but not for server connection channel types.
Maybe MQ command level is too low for DISCINT attribute? How can I check that?
Operating System is Linux for that particular workgroup server...
This knowledge center page for MQ v 7.0.1 indicates that alter chl DISCINT is only valid on zOS.
Also, this page says: This attribute is valid for channel types Server connection (z/OSĀ® only)
Maybe you are using an older version of MQ? There are many different ways to check your MQ version - from the command line try dspmqver.
The Properties file of a file watcher contains many attributes. I was not able to find the use of certain attributes. The attributes are
FTPModeBinary and
FTPConnectionPASV
these take true or false as its value.
Can anyone please help me to understand the use of these attributes?
"Binary" (as opposed to "text") transfers the file exactly as-is without doing any end-of-line conversions (like LF to CR/LF).
"Passive" means that the FTP server always opens a listening socket for the data connection and the client connects to it. (FTP uses a separate TCP channel for the actual data transfer.) Traditionally, FTP would have the sender open a connection to the receiver but this began breaking when people started residing behind NAT firewalls as there's no easy way to open a connection back to the client in that case. Without passive, it's actually possible to instruct two FTP servers to transfer a file between themselves without ever passing through the client.
Can you please tell me specifically what kind of data flows through which port during an FTP connection?
To be specific, I'd like to know whether contents of the directory and the server response codes flow through port 20.
FTP uses two types of connections: (1) the control connection (default port 21), which is used to send commands to the server and receive status codes back, and (2) the data connection (default port 20), which is used to transfer the content requested from the server: the content of a file or a directory listing, for example. I recommend to use a network protocol analyzer to see it with your own eyes. FTP specification RFC959 is written in an easily understandable manner, don't afraid to have a look at it.
The other day i tried to add new remote MQGR through MQ explorer but it failed with below error:
AMQ4052 Coded character set ID error. Cannot convert a command message to the CCSID of the target queue manager.
The ccsid used by remote QMGR is 5488, and the ccsid of local pc where the MQ explorer installed is 1381, i suppose.
My question is:
How to configure the value of ccsid used by MQ Explorer?
What kind of ccsid am i supposed to select for MQExplorer in order to communicate with remote QMGR? Besides this, where can i find the information about the ccsid compatibility?
From the MQ perspective, when communicating through client and server, what is the procedure to check CCSID compatibility? I know the MQ has data conversion table installed on OS, such as files under /usr/lib/nls/loc/iconvTable for AIX. Then how does the MQ make use of it?
Thanks in advance
You can set your environment variable MQCCSID.
The supported conversions depend on the platform the queue manager is running on, see Code Page Conversions for a list of supported conversions.
as far as I know, it uses iconv on Unix, I don't know how it handles that on Windows exactly.