ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MRM on JavaCompute - WMBv61

Post new topic  Reply to topic
 MRM on JavaCompute - WMBv61 « View previous topic :: View next topic » 
Author Message
felipe.mq
PostPosted: Mon Dec 22, 2008 11:40 am    Post subject: MRM on JavaCompute - WMBv61 Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

Hi people,
I am trying to develop a JavaCompute Node that receives a XML message from a queue and sends a MRM message (based on a copybook) to another queue, but I don't know how to create the MRM message. Can anyone help me?
Another problem is that sometimes I need to generate another XML message, and when I do that, the headers of the XML don't appear to me.

I've got something similar to

<Element1><ElementA></ElementA><ElementB></ElementB><ElementC></ElementC></Element1> ,

but without

<?xml version="1.0" encoding="UTF-8"?>

I know it's not so complicated, but I didn't find anything related in the internet.

Thanks.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Dec 22, 2008 1:22 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Doing this is pretty easy in a normal compute node using ESQL

If you create the Message set from your copybook then you can easily setup the output message to use it as the format of the output.
Make sure you create the right physical formats for your message.

You didn't state if the input message and output message are identical. If this is the case, create a CWF & an XML physical format in the message set. Then all you have to do is setup the right properties and output messate format.
If they are not then a bit of mapping will be required.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
felipe.mq
PostPosted: Mon Dec 22, 2008 4:25 pm    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

Yes, in ESQL I have it done.
Input and Output aren't identical. I'll need to do some mapping.
But, my doubt is that when I get the message root, I call the method createLastChild or something like that, and I set the name of the node to "MRM", I don't know if this is the correct way.
For example, in the package com.ibm.broker.plugin there are some classes like MbBLOB, MbXML, MbXMLNSC, but I didn't found one to MRM. Is this normal?
So, if I set MessageSet, MessageType and MessageFormat, is everything ok?

Thanks again.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Mon Dec 22, 2008 9:35 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

its normal, as your target message format is "MRM" so you have to initiate it.
here are some samples snippet
MbElement mrmOut =
outMessage.getRootElement().createElementAsLastChild("MRM");

then create one by one element and assign the values to it
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
felipe.mq
PostPosted: Tue Dec 23, 2008 12:29 pm    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

I've got the solution to that problem, but now I have another one.
I think it's when I set up the message properties, like below.

messageSet.setValue("F6BG5PS002001");
messageType.setValue("MessageType");
messageFormat.setValue("CWF");

After configured I created the new child like:

MbElement mrmOut =
outMessage.getRootElement().createElementAsLastChild("MRM");

And then I start creating/setting up the elements of the message, but I can't see any validation of the elements that I create.

So, I deploy the new bar file and when I send a message, the logs show the following:

Code:
( ['MQROOT' : 0x93d2b08]
  (0x01000000):RecoverableException = (
    (0x03000000):File            = 'F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp' (CHARACTER)
    (0x03000000):Line            = 739 (INTEGER)
    (0x03000000):Function        = 'ImbDataFlowNode::createExceptionList' (CHARACTER)
    (0x03000000):Type            = 'ComIbmMQOutputNode' (CHARACTER)
    (0x03000000):Name            = 'Traducao_Envio_ConsultaProtocolo#FCMComposite_1_2' (CHARACTER)
    (0x03000000):Label           = 'Traducao_Envio_ConsultaProtocolo.MQOutput' (CHARACTER)
    (0x03000000):Catalog         = 'BIPv610' (CHARACTER)
    (0x03000000):Severity        = 3 (INTEGER)
    (0x03000000):Number          = 2230 (INTEGER)
    (0x03000000):Text            = 'Node throwing exception' (CHARACTER)
    (0x01000000):ParserException = (
      (0x03000000):File     = 'F:\build\S610_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbSyntaxElement.cpp' (CHARACTER)
      (0x03000000):Line     = 565 (INTEGER)
      (0x03000000):Function = 'CpContext::loadWorker' (CHARACTER)
      (0x03000000):Type     = '' (CHARACTER)
      (0x03000000):Name     = '' (CHARACTER)
      (0x03000000):Label    = '' (CHARACTER)
      (0x03000000):Catalog  = 'BIPv610' (CHARACTER)
      (0x03000000):Severity = 3 (INTEGER)
      (0x03000000):Number   = 5136 (INTEGER)
      (0x03000000):Text     = 'Invalid Wire format retreived. ' (CHARACTER)
      (0x01000000):Insert   = (
        (0x03000000):Type = 5 (INTEGER)
        (0x03000000):Text = '' (CHARACTER)
      )
    )
  )
)


Anyone knows how can I solve this problem?

Thanks Again
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Dec 23, 2008 11:38 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Check the actual physical wire format in the message set.

CWF is close but not quite there.
If you change the
messageFormat.SetValue to that it should get past this particular problem.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
felipe.mq
PostPosted: Wed Dec 24, 2008 4:10 am    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

Sorry, but I didn't understand.
Should I change messageFormat.SetValue() to what?

When I look the message set definition I've got something like:



Properties Hierarchy

-Message Set
-XML Wire Formats
-Custom Wire Formats
-----CWF
-Tagged/Delimited String Format

The CWF is there and when I look the elements of a message
I can configure them in the CWF Local Element Tab (in Properties of the message).

Thanks again.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 24, 2008 4:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You sure is says
Custom wire format
---- CWF

and not
Custom wire format
---- CWF
------- CWF1 ?

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
felipe.mq
PostPosted: Wed Dec 24, 2008 4:25 am    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

CWF1?

No, in the definition I have:

Custom wire format
---- CWF
Back to top
View user's profile Send private message
felipe.mq
PostPosted: Wed Dec 24, 2008 4:36 am    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

Does anyone have a complete example of this that I'm trying to do?

Thanks
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Dec 24, 2008 6:01 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

You should be using CWF1 rather than CWF.
If you were using an XML format, it would be XML1.
When you add a physical format to a model the toolkit adds a format type using this format of name.

If you add (for example) a Reset Content Descriptor node to your flow. Do'nt wirte it up but configure it with your messages set. When you come to the format bit you are presented with the Physical formats you have defined in the Model. CWF1, XML1 or TDS1.
If there are none in the drop down, then you have not created your Message set properly.
Take a look at the Message Models Documentation for more information.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 24, 2008 6:56 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

smdavies99 wrote:
You should be using CWF1 rather than CWF.
If you were using an XML format, it would be XML1.
When you add a physical format to a model the toolkit adds a format type using this format of name.


Unless you override it.

The BIP5131 clearly indicates that the Message Format is not being set to the value that felipe.mq thinks it is, instead being set to ''.

felipe.mq: It's not clear what your "messageFormat" (and others) variable is, nor whether calling it's setValue() method has any use. It's also not clear that you shouldn't be doing that *after* you create the MRM child element, rather than before it.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 01, 2009 4:30 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

felipe.mq: if you are still having problems, please post again with a clear description of your problem(s). If not, please post a short note saying that it is solved. Thanks
Back to top
View user's profile Send private message
felipe.mq
PostPosted: Mon Jan 05, 2009 9:02 am    Post subject: Reply with quote

Newbie

Joined: 22 Dec 2008
Posts: 7

Hi everybody.
Thanks for the help. I wasn't able to set the correct values to the fields related to Message Properties, so they were empty. I removed some lines of code that made a copy of headers and then the values of Message Properties were Ok.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » MRM on JavaCompute - WMBv61
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.