Read Object Message using JMS Adapter
Hi,
My JMS queue receives an object message.I want to read that object message using JMS adapter.Currently the JMS Adapter payload type is given options to read only 'TextMessage','BytesMessage','MapMessage'.How to read ObjectMesage using this adapter?Please help me on this?
Hi,
As far as i know, JMS Object Messages is not supported by XI JMS adapter.
you need to have the JMS provider to transform the message to bytes messages.
(Refer to SAP note 856346)
Similar Messages
-
Dequeue jms messages using JMS adapter
Hi,
I have created jms server, modules, queue from console-messaging-jms modules.
I am trying to create a soa composite to consume message from this queue.
In JMS adapter wizard - step 7 - i have selected the destination queue. In this step, what should be the jndi name?
do i need to update weblogic-ra.xml file?
Can someone please point me to the steps/doc to create jms adapter to consume message from Oracle Weblogic JMS? (basically configure deployment descriptor)
Thanks
GaneshBy passing username/password in the outbound connection pool, i was able to connect to the secured weblogic jms..
This was my config for eis/wls/Queue connection pool..
AcknowledgeMode java.lang.String AUTO_ACKNOWLEDGE
ConnectionFactoryLocation java.lang.String weblogic.jms.XAConnectionFactory
FactoryProperties java.lang.String
IsTopic java.lang.Boolean false
IsTransacted java.lang.Boolean false
Password java.lang.String weblogic123
Username java.lang.String weblogic
After making the change ( remember to hit enter after modifying password and username fields, else change wont persist) , i saved it with a new deployment plan and updated the deployment with the new plan. Then redeployed the composite containing the jms adapter and I am able to see a consumer created for the queue. -
How to read Java Object message from JMS Queue using JMS Adapter .
Dear All,
In my scenario i have to read a java object message from JMS Queue . I tried by using the JMS Adaper ,but i am not getting any Payload . Can any one tell me is there any special settings for JMS Adapter to read the Java Object message .
I am able to read the Message successfully thru JMS Adapter but in SXMB_MONI it is not showing any payload .
I also went in Message monitoring but i am getting this type of message in Sender JMS Adapter in Audit Log.
JMS Message ID XXXXX Message Type Null unknown.Payload can not be read and will be empty.
JMS Message ID XXXXX Payload Empty can not read.
Please Help.
LateefHi,
As far as i know, JMS Object Messages is not supported by XI JMS adapter.
you need to have the JMS provider to transform the message to bytes messages.
(Refer to SAP note 856346) -
How to Set JMS property and Read JMS property in BPEL using JMS adapter
Does any one know how to set or read more than one JMS property in BPEL using JMS adapter. My queue server is Oracle JMS server.
Any help and sample is well appreciatedHi Van
I have noted that only the attribute "type" is missing. It seems that when you create a "string" property, the attribute "type" is droped from the XML. If you use another type (as "integer" or "double") it stays there.
If you try to read your properties, except for the "type" attribute, you should be successful, as I am. If you need, please tell me your email, I can send you my code.
Source Code:
in ASSIGN activity (process which SENDS the JMS message):
<assign name="TESTES">
<copy>
<from expression="'string'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@type"/>
</copy>
<copy>
<from expression="'name'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@name"/>
</copy>
<copy>
<from expression="'value1'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[1]/@value"/>
</copy>
<bpelx:append>
<bpelx:from>
<Property name="" type="" value=""
xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/"/>
</bpelx:from>
<bpelx:to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties"/>
</bpelx:append>
<copy>
<from expression="'string'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@type"/>
</copy>
<copy>
<from expression="'name2'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@name"/>
</copy>
<copy>
<from expression="'value2'"/>
<to variable="HeaderJms" part="outboundHeader"
query="/ns5:JMSOutboundHeadersAndProperties/ns5:JMSOutboundProperties/ns5:Property[2]/@value"/>
</copy>
</assign>
in ASSIGN activity (process which READS the JMS message)
<assign name="Assign_1">
<copy>
<from variable="Variable_1" part="inboundHeader"
query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@name"/>
<to variable="temp"/>
</copy>
<copy>
<from variable="Variable_1" part="inboundHeader"
query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[10]/@value"/>
<to variable="temp"/>
</copy>
<copy>
<from variable="Variable_1" part="inboundHeader"
query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@name"/>
<to variable="temp"/>
</copy>
<copy>
<from variable="Variable_1" part="inboundHeader"
query="/ns3:JMSInboundHeadersAndProperties/ns3:JMSInboundProperties/ns3:Property[12]/@value"/>
<to variable="temp"/>
</copy>
</assign>
Note that I do not try to read the "type" attribute, otherwise it will fail.
Here is the JMS Header Message received:
<inboundHeader>
<JMSInboundHeadersAndProperties xmlns="http://xmlns.oracle.com/pcbpel/adapter/jms/">
<JMSInboundHeaders>
<JMSCorrelationID>
bpel://localhost/pi_lms-c001e/BpelPiAtualizacaoC001E~1.0/3200025-BpInv0-BpSeq1.6-2
</JMSCorrelationID>
<JMSDeliveryMode>2</JMSDeliveryMode>
<JMSExpiration>0</JMSExpiration>
<JMSMessageID>ID:467DFA1FA1ED459EBF37F51F596C3F12</JMSMessageID>
<JMSPriority>4</JMSPriority>
<JMSRedelivered>false</JMSRedelivered>
<JMSType>com.mercurio.lms.integration.c001eip.c001EIntegrationPoint</JMSType>
<JMSTimestamp>1201552046253</JMSTimestamp>
</JMSInboundHeaders>
- <JMSInboundProperties>
<Property name="JMSXDeliveryCount" type="integer" value="1"/>
<Property name="JMSXRecvTimestamp" type="long" value="1201552046698"/>
<Property name="JMSXUserID" value="lms_dev_int_v1_user"/>
<Property name="JMS_OracleDeliveryMode" value="2"/>
<Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
<Property name="JMS_OracleDelay" type="long" value="0"/>
<Property name="JMSXState" type="integer" value="0"/>
<Property name="IAS_VERSION" value="10.1.3"/>
<Property name="JMS_OracleDeliveryMode" value="2"/>
<Property name="name" value="value1"/> ("type" attribute was droped!!!)
<Property name="JMS_OracleTimestamp" type="long" value="1201552046253"/>
<Property name="name2" value="value2"/> ("type" attribute was droped!!!)
</JMSInboundProperties>
</JMSInboundHeadersAndProperties>
</inboundHeader>
Regards
Marcelo -
Polling messages based on priority in BPEL using JMS adapter
Hi All,
Is it possible to poll the messages based on the priority in BPEL using JMS adapter?
I could set the priority for the messages but while polling it is picking the messages in FIFO(First in First out) order. But I want the messages to be picked on priority.Any help is appreciated.Do you only want to pick up messeges with a certain priority? So anything larger than say priority 2?
You can try this: Oracle JCA Adapter for JMS - 11g Release 1 (11.1.1.5.0)
Message SelectorThis field is also optional. It filters messages based on header and property information. The message selector rule is a Boolean expression. If the expression is true, then the message is consumed. If the expression is false, then the message is rejected.For example, you can enter logic, such as:
JMSPriority > 3. Based on this, messages with a priority greater than 3 are consumed; all other messages are rejected.
JMSType = 'car' AND color = 'blue' AND weight > 2500
Country in ('UK', 'US', 'France') -
I want to use ODI to read XML messages from JMS queue and then process it..
I want to use oracle ODI (Oracle Data Integrator) to read XML messages from JMS queue and then process it.. i also want to process and validate the data in it....
Could anyone please tell me the steps to achieve the same. I tried some ways which i got on OTN, but not able to implement it exactly...
As i m very new to ODI, it will be great if you provide detailed steps..
Thanks in advance for your help....Hi,
Were you able to do it? We are facing this same issue now and, despite the fact the docs say otherwise, it does not seem to be a trivial task.
TIA,
Tedi -
hi,
I am trying to enqueue the message to Oracle database Queue(i.e. AQADM.QUEUE_MESSAGE) by using JMS Provider Oracle Enterprise Messaging Service (OEMS) using the potion Oracle Advance Queuing .I am Reading the message from xml file using File adapter to enqueue it to database queue. I have configured the JMS Configuration at WebLogic console.
I have created the queue in database by using following Script
CREATE USER aqadm IDENTIFIED BY aqadm;
GRANT my_aq_adm_role TO aqadm;
/* create AQ queue user: */
CREATE USER aquser IDENTIFIED BY aquser;
GRANT my_aq_user_role TO aquser;
CONNECT aqadm/aqadm;
/* create a message type: */
CREATE OR REPLACE
TYPE AQADM.QUEUE_MESSAGE_TYPE AS OBJECT
title VARCHAR2(30),
text VARCHAR2(500)
GRANT EXECUTE ON AQADM.QUEUE_MESSAGE_TYPE TO my_aq_user_role;
GRANT UNLIMITED TABLESPACE TO aqadm;
begin
DBMS_AQADM.CREATE_QUEUE_TABLE(
queue_table => 'aqadm.queue_message_table',
queue_payload_type => 'aqadm.queue_message_type');
END;
begin
DBMS_AQADM.CREATE_QUEUE(
queue_name => 'aqadm.message_queue',
queue_table => 'aqadm.queue_message_table');
END;
/* individual queues are started using the start_queue procedures */
begin
DBMS_AQADM.START_QUEUE(
queue_name => 'aqadm.message_queue');
END;
I am using the following XSD for input message :-
<?xml version= '1.0' encoding= 'UTF-8' ?>
<schema targetNamespace="http://xmlns.oracle.com/xdb/AQADM" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:AQADM="http://xmlns.oracle.com/xdb/AQADM" elementFormDefault="unqualified" attributeFormDefault="qualified">
<complexType name="QUEUE_MESSAGE_TYPE">
<sequence>
<element name="TITLE" nillable="true" minOccurs="0">
<simpleType>
<restriction base="string">
<maxLength value="30"/>
</restriction>
</simpleType>
</element>
<element name="TEXT" nillable="true" minOccurs="0">
<simpleType>
<restriction base="string">
<maxLength value="500"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
<element name="QUEUE_MESSAGE_TYPE" type="AQADM:QUEUE_MESSAGE_TYPE"/>
</schema>
During AQ queuing by using JMS adapter. i am geting following error message:-
JMS-108: Messages of type TextMessage not allowed with Destinations containing payload of type AQADM.QUEUE_MESSAGE_TYPE.
Please help mehi,
I am trying to enqueue the message to Oracle database Queue(i.e. AQADM.QUEUE_MESSAGE) by using JMS Provider Oracle Enterprise Messaging Service (OEMS) using the potion Oracle Advance Queuing .I am Reading the message from xml file using File adapter to enqueue it to database queue. I have configured the JMS Configuration at WebLogic console.
I have created the queue in database by using following Script
CREATE USER aqadm IDENTIFIED BY aqadm;
GRANT my_aq_adm_role TO aqadm;
/* create AQ queue user: */
CREATE USER aquser IDENTIFIED BY aquser;
GRANT my_aq_user_role TO aquser;
CONNECT aqadm/aqadm;
/* create a message type: */
CREATE OR REPLACE
TYPE AQADM.QUEUE_MESSAGE_TYPE AS OBJECT
title VARCHAR2(30),
text VARCHAR2(500)
GRANT EXECUTE ON AQADM.QUEUE_MESSAGE_TYPE TO my_aq_user_role;
GRANT UNLIMITED TABLESPACE TO aqadm;
begin
DBMS_AQADM.CREATE_QUEUE_TABLE(
queue_table => 'aqadm.queue_message_table',
queue_payload_type => 'aqadm.queue_message_type');
END;
begin
DBMS_AQADM.CREATE_QUEUE(
queue_name => 'aqadm.message_queue',
queue_table => 'aqadm.queue_message_table');
END;
/* individual queues are started using the start_queue procedures */
begin
DBMS_AQADM.START_QUEUE(
queue_name => 'aqadm.message_queue');
END;
I am using the following XSD for input message :-
<?xml version= '1.0' encoding= 'UTF-8' ?>
<schema targetNamespace="http://xmlns.oracle.com/xdb/AQADM" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:AQADM="http://xmlns.oracle.com/xdb/AQADM" elementFormDefault="unqualified" attributeFormDefault="qualified">
<complexType name="QUEUE_MESSAGE_TYPE">
<sequence>
<element name="TITLE" nillable="true" minOccurs="0">
<simpleType>
<restriction base="string">
<maxLength value="30"/>
</restriction>
</simpleType>
</element>
<element name="TEXT" nillable="true" minOccurs="0">
<simpleType>
<restriction base="string">
<maxLength value="500"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
<element name="QUEUE_MESSAGE_TYPE" type="AQADM:QUEUE_MESSAGE_TYPE"/>
</schema>
During AQ queuing by using JMS adapter. i am geting following error message:-
JMS-108: Messages of type TextMessage not allowed with Destinations containing payload of type AQADM.QUEUE_MESSAGE_TYPE.
Please help me -
How to read mq message through jms
Hi
can anyone tell me how we can read an mq message through jms transport or by using jms adapter.
Thanks in advance.A JMS program will be written typically to lookup administered objects ( namely connection factory and destination) from a jndi tree and use these to connect to the jms provider and read/write message to the destination. So administrators of the JMS provider usually create these objects and bind it to a jndi , which then can be used by the jms applications by doing a lookup from the jndi tree.
Websphere MQ is a messaging provider which provides a native MQ API in many languages including Java for applications to talk to it. This is a IBM proprietary API and is not same as JMS. Later when JMS became more interoperable and the standard for java based messaging applications, IBM introduces the MQ JMS API which is a wrapper around the native MQ API, so that now java clients can talk to MQ using the JMS API. Since jms applications need to lookup the administered objects, IBM came up with the utility called JMSAdmin which allows MQJMS administers to create and bind JMS administered objects. The utility is flexible that it allows the objects to be binded to different type of JNDI trees - file based, ldap based etc. But the most widely used and robust one is the file based.
So as part of configuration the first thing is to create the queue and queue manager objects by the MQ Administrator.
A MQ JMS administrator will then create the JMS wrapper objects using the JMSAdmin utility and bind it to the file based jndi tree ( a file called .bindings)
Now we need the application running in weblogic server ( the JMS Adapter ) to lookup these objects from the file based jndi tree. So for this we create a foreign jms server. A foreign jms server allows to create local jndi links (in weblogic's server jndi tree) for objects in a remote jndi provider (the .bindings file).
Finally the application will look up the local jndi name from the local jndi which will automatically resolve to the remote provider and use it.
The steps in the IBM developer work link folliows this sequence.
Hope this helps. -
How to get the incoming file name using JMS adapter and SOAP adapter
Hi Everybody,
In one of my interface i need to get the file name of incoming flat file using JMS adapter at sender side. and then i am using xslt to convert it to IDOC and then posting to SAP IDOC.
my incoming filname are in this form price<DateTimestamp>.txt. when i do the tranformation this incoming file name should be part of one element in the IDOC which i am posting.
EX:
<IDOC
<REF>price<DateTimestamp>.txt</REF>
</IDOC>
Hope it is clear to everybody. I need your suggestion how i can capture this incoming file name and send it as part of IDOC.
Thanks
rajIf they are passing it in message id or correlation id,
you can access it using
<xsl:variable name="dynamic-conf"
select="map:get($inputparam, 'DynamicConfiguration')" />
<xsl:variable name="dynamic-key"
select="key:create('http://sap.com/xi/XI/System/JMS', 'DCJMSMessageID/ DCJMSCorrelationID')" />
<xsl:variable name="dynamic-value"
select="dyn:get($dynamic-conf, $dynamic-key)" />
Check this:
http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
Thanks,
Beena. -
Problem with Send using JMS Adapter with Websphere MQ
Hi,
We have two scenarios using JMS Adapter with MQ:
1. File->PI->MQ
This works fine and drop the file in MQ correctly.
2. MQ->PI->File
This gives an error reading from the queue: (see highlighted in the log below). It correctly connects to the queue name. But it fails with the message "Could not begin a AF transaction".
Our PI version is 7.0 SP 13
Websphere MQ Version 6.0.
Any idea what could be wrong?
Cluster Node Administration Information Availability Times
Cluster Node Details for Channel CC_JMS_MQ_Sender
Short Log
In the Last 4 Hours Server 0 15_92786
_Sucessfully connected to destination 'queue:///MMPP.PLM.FGH41? CCSID=37&targetClient=1'_
Line 1 / 1
Processing Details for Cluster Node Server 0 15_92786
Type
Time Stamp
Message ID
Explanation
9/2/08 2:27:28 PM 2e6206f0-7925-11dd-bc02-0003bae50b4d Error while processing message '2e6206f0-7925-11dd-bc02-0003bae50b4d'; _detailed error description: com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: Could not begin a AF transaction: TxManagerException: Unable to open transaction: com.sap.engine.services.ts.exceptions.BaseSystemException at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:103) ..._
9/2/08 2:27:28 PM 2e6206f0-7925-11dd-bc02-0003bae50b4d XI message ID corresponding to JMS message with ID 'ID:414d512071736431202020202020202047d9462024028b02' will be created as a new GUID with value '2e6206f0-7925-11dd-bc02-0003bae50b4d'
Amith DharmasiriChecked the drivers installed in :
/usr/sap/<SID>/DVEBMGS<SYSNO>
/j2ee/cluster/server0/bin/ext/com.sap
.aii.af.jmsproviderlib
They are available and properly added to aii_af_jmsproviderlib.sda.
The drivers are:
CL3Export.jar
CL3Nonexport.jar
com.ibm.mq.jar
com.ibm.mqjms.jar
connector.jar
dhbcore.jar
rmm.jar
These were installed per OSS note 747601.
Any other suggestions, why retrieving from MQ doesn't work? -
Missing Messages by JMS Adapter
We are using JMS adapter to send the X12 messages to XI and we are having intermittent issues when the server load is high or server is given a restart.
Some of the messages from MQ are not processed by the adapter and are lost.
We have to resend the messages again.
has anyone face similar problems in prod. Solution for the problem would be awarded full pointsHi,
check the "Transactional JMS Session (Recommended)" check box.
Then no message loss will happen from MQ.If there is any messages loss, go and check the dead lock Queue. -
How to pass a filename to MQHRF2 header in IBM MQ using JMS Adapter in SAP PI
Hi Expers,
Can you please help on ...
how to pass a filename to MQHRF2 header in IBM MQ using JMS Adapter in SAP PI
Thanks,
ChandarHi Chandar,
Could you check the following post Re: Inserting custom header fields inside MQRFH2 (JMS Receiver adapter)?
I hope you find it useful.
Regards! -
Correlation and Async/Sync Communication using JMS adapter without BPM
Hello
1. Pls explain with simple example docs/links --- Correlation
2. Async/Sync Communication using JMS adapter without BPM
If i see blog --- If I go with blog --- /people/sudheer.babu2/blog/2007/01/18/asyncsync-communication-using-jms-adapter-without-bpm-sp-19
Pls explain --- Correlation Settings, select JMSMessageID for the XI Conversation ID.
Pls explain -- Correlation Settings, select XI Conversation ID as jMSCorrelationID.
Can you pls explain me this example with JMSMessageID and JMSCorrelationID context
RegardsHi Henry,
For Correlation, please go through the below link.
/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi
Sync / Async Bridge communication using JMS : http://help.sap.com/saphelp_nw04s/helpdata/en/45/20d251c20a0732e10000000a155369/frameset.htm
Sync / Async communication without BPM in JMS : /people/venkataramanan.parameswaran/blog/2007/01/18/syncasync-communication-in-jms-adapter-without-bpm-sp19
/people/henrique.pinto/blog/2007/08/02/syncasync-scenarios-without-bpm
Hope these help
Regards
Kiran.. -
Async/Sync Communication using JMS adapter without BPM
Hello ,
Pls suggest how Async/Sync Communication using JMS adapter without BPM .
In my scenario I have JMS Sender and then RFC/JDBC as Sync and then again JMS receiver
Pls explain the concept of
JMSMessageID and JMSCorrelationID and how to use it by an example.
RegardsHi,
If you have selected JMSMessageID, JMSCorrelationID, or JMSProperty and entered a JMS message ID in these fields, you should see the Remove 'ID:' Marker from JMSMessageIDindicator. Set the indicator.
This is necessary because the JMS specification stipulates that each JMS message ID starts with 'ID'. However, this conflicts with ISO-11578.
- JMSMessageID (Uniqueness Is JMS-Provider-Dependent)
(String) The unique message ID. Note that this is not a required field and can be null. Since the JMS provider might not use your provided message ID, the Connector sets a special property called $jms.messageid after sending a message. This is to insure that the message ID always is available to the user. To retrieve this value use conn.getProperty("$jms.messageid") in your After Add hook.
- JMSCorrelationID (Uniqueness Is JMS-Sender-Dependent)
(String) This header is set by the application for use by other applications.
Hope this will help you.
Regards
Aashish Sinha
PS : reward points if helpful -
Same file name using JMS adapter on sender side.
Hi Friends,
I got a requirement to capture file name using JMS adapter on the sender side.
Can some one help me in resolving this issue.
Regards,
Jeevan.Hi ,
You can use Dynamic Configuration in mapping.
Create a UDF with input as file name and copy/paste this code
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//conf.removeAll();
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//String filename= conf.get(key);
conf.put(key, fileName);
key= null;
return fileName;
Thanks.
Maybe you are looking for
-
Flash Cards do not work on my Satellite L750
Hello, I own a Toshiba Satellite L750 PSK1WA-03C00R and my flash cards do not work, the function keys work, but my flash cards do not. This model does not come with the Flash Card Support Utility, it does however come with the Value Added Package. I
-
Some questions about standard search help in WD4A
Hello all, I use the SAP standard search help for a business partner number input field. It works fine, but I need to customize the result popup a bit. I have the following issues: 1. After the search I get a table with a list of all found business p
-
I made typing error in /etc/rc.local so the boot-up process hanged. So I went in to single mode by typing 'single" in the editor in grub. Everything worked fine, I booted up in single mode and changed the rc.local but now I can't go back normal, grub
-
Error message0x1005a40a referenced memory 0x00000024. The memory could not be read. Click OK to terminate program. Have updated Java apps as suggested. Thought the problem was resolved, but not so. Still doing it. Window pops up with error message, e
-
Hi I need some help. I just got a new Epson Artisan 710 which prints wirelessly but I can't seem to get it to do just that. I have everything setup on the printer but I don't know what i'm supposed to do on my mac to make it work. Do i need to use Bo