- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi Ashish
Now the Destination ID is correct but I get the following exception. Also tried setting the Message Broker on the FlexContext but same error. The code is as follows.
Pls advise
Rupak
MessageBroker messageBroker = MessageBroker.getMessageBroker(null); //Pass in the Message Broker ID if you have changed it.
FlexContext.setThreadLocalMessageBroker(messageBroker);
DataServiceTransaction dtx = DataServiceTransaction.begin(false);
//DataServiceTransaction dtx = DataServiceTransaction.getCurrentDataServiceTransaction();
dtx.setSendChangesToAdapter(true);
Currency c1 = new Currency();
c1.setCurrencyCode("ABC");
c1.setCurrencyName("Dummy Currency");
c1.setCurrencyLastUpdated(new Date());
c1.setCurrencyId(new Integer(537));
dtx.createItem("TraderWorkStation.Currency", c1);
dtx.commit();
FlexContext.setThreadLocalMessageBroker(null);
TWSServer08/24/2011 11:15:31.736 DEBUG Service.Data.Transaction Started non-jta data service transaction
TWSServer08/24/2011 11:15:31.768 DEBUG Service.Data.Transaction Sending server message to adapter: Flex Message (flex.data.messages.DataMessage)
operation = create
id = {currencyId=537}
clientId = srv:91D4E7AE-B0DB-B0EA-681D-4404F4AC8E96
correlationId = null
destination = TraderWorkStation.Currency
messageId = srv:91D4E7AE-B0DB-B0EA-681D-4404F4AC8E96:0
timestamp = 1314198931739
timeToLive = 0
body = TraderWorkStation.Currency@238
TWSServer08/24/2011 11:15:31.771 DEBUG Service.Data.General Before TraderWorkStation.Currency.createItem (
(TraderWorkStation.Currency) {currencyId=537} (14308998) {
currencyName = Dummy Currency
currencyCode = ABC
currencyId = 537
currencyLastUpdated = Wed Aug 24 11:15:31 EDT 2011
})
TWSServer08/24/2011 11:15:31.797 DEBUG Endpoint.AMF Serializing AMF/HTTP response
Version: 3
(Message #0 targetURI=/1/onStatus, responseURI=)
(Typed Object #0 'flex.messaging.messages.ErrorMessage')
headers = (Object #1)
rootCause = null
body = null
correlationId = "7816F4B3-E6EC-B7CD-A98D-FC5EFF8A3646"
faultDetail = null
faultString = "The item of type, 'TraderWorkStation.Currency', passed to the assembler does not match the assembler's configured entity type, 'TraderWorkStation.package1.Currency'. To convert 'flex.messaging.io.amf.ASObject' to a strong type automatically, set the item-class in the destination."
clientId = "91D4E4EF-9095-35C3-0E30-0059517696E5"
timeToLive = 0.0
destination = "AdminControlService"
timestamp = 1.314198931792E12
extendedData = null
faultCode = "Server.Processing"
messageId = "91D4EF9D-F0F1-D3D1-5F9B-2F636C098859"
Message was edited by: RupakKhurana
Views
Replies
Total Likes