I’m kinda new to web Methods and trying to implement the process of passing a string and retrieving it from MQ Series. But got a few issues during test.
Heres what I was trying to invoke:
I passed a string to MQ Series by using PUT Adapter service. When I run the service, the string was passed succesfully to the msgBody of the PUT Service Input(with Reason code: 0 in the msgHeader of Put Service Output).
But when I was trying to retrieve the msg using GET Adapter service, it was returning a NULL msg (with reason code: 2033 and condition code: 1 and NULL in msgBody and msgBodyByteArray).
I havent modified any defaults in the GET/PUT Adapter Service properties like MQMD Header, JMS properties or Input/Output.
Do I have to make change/s to any of these properties to retrieve the desired msg?
Hi MQ_User,
Here i have winxp,WM6.1,MQAdapter6.0.
AS mentioed by you, i replicated the scenario, i gave one string as input to PUT Service and in next step,GET without any input, my MQ connection is configured for one queue, so PUT & GET will work for same queue.Here i have not set any header properties.
Kindly check whether GET service is taking message from the same queue, in which you have put message.
Do let me know what is your scenario?
There is one more way you can GET message from queue, i.e. through Adapter Notifications, kindly refer MWmWebsphereMQAdapterUserGuide.pdf
for more information.
Thanks much for the response. Appreciate your feedback.
I checked the Adapter Settings in both PUT n GET Adapter Services and both are referring to the same queue. (Did u set any MQMD header/JMS properties in PUT Adapter service?)
Actually, my task is to listen on the queue and retrieve the messages (using Adapter Notifications and Listeners). I tried listening on the queue, publish the notify message and trigger on the published document.
But when I was trying to retrieve the msg using pub.string:bytesToString in a custom flow service and run it, popped was a screen with the fields like activation, appLastSeq, errorsTo, errorsFrom etc., (also, msgBody and msgBodyByteArray were mentioned as: Not editable by user)…and when I click OK, end up getting nothing.
do u see anything that i’m missing in the implementation.
Hi MQ_user,
No i have not set any MQHeader/JMS Properties in PUT service.
The Task you mentioned above, is also working fine, jus check whether the namespace of the published notification in trigger is correct and also check the namespace of triggering service.
Input the same notification document to triggering service, the notification has got one (non editable) msgBody field,map msgBody to the input of the service you want to invoke.and leave other fields if not required.
Let me know your concerns.
Appreciate your responses. I verified the namespace of both published notification and triggering service (since they would be selected by browsing; dont think could go wrong in this)
…coming to published Notification doc, it has two fields msgBodyByteArray and msgBody along with _env Reference(envelope).
The triggering service just has one service pub.string:bytesToString and the msgBody of the published document (which is taken as input for the service) is mapped to bytes of the bytesToString serviceIn. When I run the service, i was getting a screen with fields like activation, appLastSeq, errorsTo, errorsFrom etc., (also, msgBody and msgBodyByteArray were mentioned as: Not editable by user)…and when I click OK, end up getting nothing.
Dont understand if I’m missing something in the process. Do really appreciate if you could send me a sample package that depicts the steps.
Also, wondering if that matters between MQ Connection (Non Transactional) and MQ Transactional Connection. I have used
MQ Connection. Went thru the pdfs but couldnt figure out which would be the best for my design.
All i need to do is to pick up the msgs from MQ message Queue and post it to a webservice (No transformation required after picking up msgs from queue…just pick n post)
Hi MQ_User,
This notification published has (non-editable)field i.e. msgBody(string) , other is envelope(document reference).
Following are the details of services inside MQPackage.
Steps:
1)Install the MQPackage.
3)Enable Listener, Enable Adapter Notification for the same connection.
4)Run MQPackage.Services.FlowServices:PutService with appropriate input message you want to put into queue.
5)MQPackage.Listener:MQListener will poll for the message in queue,when message will be there in queue.<MQPackage.AdapterNotification:MQAdapterNotificationPublishDocument will publish notification to broker.
6)Trigger MQPackage.Trigger:MQTrigger, will invoke MQPackage.Services.FlowServices:Subscribing_Service.
7)MQPackage.Services.FlowServices:Subscribing_Service has MQPackage.AdapterNotification:MQAdapterNotificationPublishDocument as input and msgBody is mapped to message(input:pub.flow:debugLog).
Difference between Transactional Connection and Non-Transactional Connection.
Transactional Connection:A transactional connection uses syncpoint processing, which
means that you can group one or more requests into a single
Logical Unit of Work (LUW). You can control these requests
manually (explicit transactions), or you can allow the Integration
Server’s transaction manager control them for you (implicit
transactions).
2)Non-Transactional Connection:A non-transactional connection is stateless and does not use
syncpoint processing. All services associated with a nontransactional
connection perform a single request as an
autonomous unit of work.
For example, when a flow invokes a Get service associated with a
non-transactional connection, then these services remove each
message from the WebSphere MQ immediately after they
processes the message.
Hi Friend
Please ignore this message if it is not relevant.If you use stringTobytes service before PUT service you have to use bytesToString after GET service. For example if you are using stringToStream before PUT you should use streamTostring after GET service, other wise show type mismatch error.You are getting null after GET service b’se you don’t have any messages in the Queue. So first make sure that you have some messages in the queue and then try to retrieve
regards
Jimmy
Thanks for your feedback. Retrieving messages using PUT n GET Service works fine for me. Actually, We can directly map msgBody object of the GET service to a string after GET service (I tried it n worked well)
Jimmy/Puneet:
But I tried to retrieve the msg using Listener/Listener Notification and got stuck. I couldnt trace if the Listener, Listener Notification n Trigger is working properly. When I went thru the Server n Error Log, there wasnt anything related with Listener/Listener Notification/Trigger.
So, Could you suggest how to trace Listener/Listener Notification/Trigger.