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 Process Server (WID/WPS/WAS+) » MQ binding - Business object with array of child BOs

Post new topic  Reply to topic
 MQ binding - Business object with array of child BOs « View previous topic :: View next topic » 
Author Message
bharathvn
PostPosted: Wed Dec 29, 2010 4:47 am    Post subject: MQ binding - Business object with array of child BOs Reply with quote

Newbie

Joined: 25 Mar 2010
Posts: 6

Hello,
I am trying to develop an MQ to MQ scenario in WPS 6.2.
I am trying to fetch the data from input queue with one header and array of line items. for eg. There is a customer business object that contains customer ID and customer name as message header and a list of "City" business objects which containts name of the city as line items.
Line items are dynamically added and should be handled during runtime.
The Message that I am going to put into the queue looks like this,
CU01John02London
CU01 is cusomter ID
John is customer Name
02 is total no of line items
Newyork - should be parsed as first element of child BO

I have configured mq binding-export with fixed width datahandler.
In fixed width data handler, below is my settings,

<?xml version="1.0" encoding="UTF-8"?>
<cfg:bindingConfiguration xmlns:cfg="http://www.ibm.com/xmlns/prod/websphere/bindingconfiguration/6.1.0" name="FWTransformationConfiguration" targetNamespace="http://Temp">
<cfg:typeName>com.ibm.wbiserver.datahandler.fixedwidth.FixedWidthDataHandler</cfg:typeName>
<cfg:propertyBean type="com.ibm.wbiserver.datahandler.fixedwidth.FixedWidthDataHandlerProperties">
<endOfRecordType type="int">1</endOfRecordType>
<padCharacterForNonNumeric> </padCharacterForNonNumeric>
<padCharacterForNumeric>0</padCharacterForNumeric>
<fieldWidth>4</fieldWidth>
<fieldWidth>4</fieldWidth>
<fieldWidth>2</fieldWidth>
<fieldWidth>6</fieldWidth>
</cfg:propertyBean>
<cfg:tag>BindingKind_DataHandler</cfg:tag>
<cfg:tag>BindingType_MQ</cfg:tag>
</cfg:bindingConfiguration>

It is working fine, if I dont specify child BO as array.

If I specify it as array I am getting the below error message
commonj.connector.runtime.DataHandlerException: The input data has more elements than 4 which is the number of entries in the field width property. and listener is getting stopped.

also If I try to add one more line item like below
CU01John02LondonAthens
I am getting below error message commonj.connector.runtime.DataBindingException: java.lang.StringIndexOutOfBoundsException.

Please note that i have also configured the metadata property for child BO as below
metadata:BOPropertyNameASI
xmlns:metadata="http://www.ibm.com/wbiserver/datahandlers/metadata">
<metadata:propertyNameForCount>LineCnt</metadata:propertyNameForCount>
</metadata:BOPropertyNameASI>

can anyone please help me configuring datahandler/binding to support the array of child BOs.

Thanks
Bharath
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Process Server (WID/WPS/WAS+) » MQ binding - Business object with array of child BOs
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.