Author |
Message
|
Srini_P |
Posted: Mon Mar 01, 2010 9:17 pm Post subject: How to export more than one operation using mq export WPS? |
|
|
Newbie
Joined: 26 Feb 2010 Posts: 7
|
Hi All,
I have developed an SCA module with mq export binding and it has more than one operation in the Interface.
But It is executing every time only one operation. I used function selector as Native function selector.
and method binding as "handleMessage" for both methods.
My Environment:
WID 6.1
WPS 6.1.
OS: Win XP.
I am listening on a Queue which gets the XML messages.
What function selector needs to be used to execute appropriate method on the interface?
Thanks in advance. |
|
Back to top |
|
 |
Srini_P |
Posted: Wed Mar 03, 2010 7:30 am Post subject: |
|
|
Newbie
Joined: 26 Feb 2010 Posts: 7
|
Quote: |
Hi All,
I have developed an SCA module with mq export binding and it has more than one operation in the Interface.
But It is executing every time only one operation. I used function selector as Native function selector.
and method binding as "handleMessage" for both methods.
My Environment:
WID 6.1
WPS 6.1.
OS: Win XP.
I am listening on a Queue which gets the XML messages.
What function selector needs to be used to execute appropriate method on the interface?
Thanks in advance. |
Anybody have any idea to handle multiple operations on Java Interface using the mqbinding in export. |
|
Back to top |
|
 |
wooda |
Posted: Tue Mar 09, 2010 3:06 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
For >1 operation you must use a different function selector, the default "Constant" function selector will always invoke one operation with the native method value "handleMessage". In your case it will select the first one it finds that matches.
You need to
a.) determine what in the incoming message can be used to determine which operation to invoke.
b.) select an appropriate supplied function selector OR write a custom function selector to correctly return a value that can be mapped to a specific operation (mapping is in the method binding) "native method" (is the string the function selector returns) => operation name. |
|
Back to top |
|
 |
Srini_P |
Posted: Tue Mar 09, 2010 6:52 am Post subject: |
|
|
Newbie
Joined: 26 Feb 2010 Posts: 7
|
Quote: |
You need to
a.) determine what in the incoming message can be used to determine which operation to invoke.
b.) select an appropriate supplied function selector OR write a custom function selector to correctly return a value that can be mapped to a specific operation (mapping is in the method binding) "native method" (is the string the function selector returns) => operation name. |
I am trying to use the functionselector as "Use JMS default function selector " and mapped the method binding to the operation name in the native method.
How to add edit the MQRFH2 header to add the TargetfunctionName? |
|
Back to top |
|
 |
wooda |
Posted: Tue Mar 09, 2010 6:57 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Well TargetfunctionName is a JMS property which MQ stores natively in the RFH2 header. JMS properties are stored by MQ in the <usr> folder in the RFH2 header name value data.
So the easiest way is to put a JMS message to MQ with a String property called TargetfunctionName and then take a look at the RFH2 header that Mq has created....... |
|
Back to top |
|
 |
Srini_P |
Posted: Tue Mar 09, 2010 7:56 am Post subject: |
|
|
Newbie
Joined: 26 Feb 2010 Posts: 7
|
Quote: |
So the easiest way is to put a JMS message to MQ with a String property called TargetfunctionName and then take a look at the RFH2 header that Mq has created....... |
I am adding the targetfucntionname in the ESQL by using the following code.
SET OutputRoot.MQRFH2.usr.TargetFunctionName = 'HelloOSOperation';
But I am getting following exception in trace node.
(0x03000000):Text = 'Invalid parser sequence' (CHARACTER)
I am new to the ESQL, what is the correct code snippet to add it.
Thanks in advance.. |
|
Back to top |
|
 |
wooda |
Posted: Thu Mar 11, 2010 3:57 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
What are using to send the JMS request ? A client application or WPS or something else ? |
|
Back to top |
|
 |
Srini_P |
Posted: Thu Mar 11, 2010 7:17 am Post subject: |
|
|
Newbie
Joined: 26 Feb 2010 Posts: 7
|
Quote: |
What are using to send the JMS request ? A client application or WPS or something else ? |
To answer your question: Message broker flow is sending the message to WPS mq export Queue.
I got the working solution by using the function selector as "MQ uses type information as native function".
Thanks for your help.... |
|
Back to top |
|
 |
|