Hi John,

 

I think the first thing is to see the stack trace of the ClassCastException you are getting.  If you go to WEB-INF/flex/services-config.xml, search for level= and change that to Debug, then make sure the <patterns> tag below that has both Message.* and DataService.* in it, it will give you some nice diagnostics on the server side and should include the stack trace for that exception.

 

It looks from the error like this is happening in your assembler’s sync method.   That would abort whatever update operation you are trying to perform.

 

Jeff

 


From: [email protected] [mailto:[email protected]] On Behalf Of John Crosby
Sent: Monday, September 11, 2006 8:56 AM
To: [email protected]
Subject: [flexcoders] FDS: Trouble Pushing Data To the Client

 

We are having some trouble pushing data back to the client based on the results of a server side operation.

Basically after updating some 'preference' data, we need to get the newly generated information for the preference changes. The updates seem to be working, but when we try to refresh the data on the client with DataServiceTransaction.refreshFill() or updateItem() the problems ensue.

Here are some of the details:

Client Side code to retreive the data (ServiceNames is a list of enumerated values for our destination names) :

// LOAN APPLICATION
loanAppReference = service.getDataService(ServiceNames.LOAN_APPLICATION).getItem({loanID: model.user.activeLoanNumber}, model.loanApplication);
service.getDataService(ServiceNames.LOAN_APPLICATION).addEventListener(ResultEvent.RESULT, onLoanApplicationResult);
service.getDataService(ServiceNames.LOAN_APPLICATION).addEventListener(FaultEvent.FAULT, onLoanApplicationFault);


Server Side Code that we have tried to push data to the client

////////////////////////
// RefreshFill
////////////////////////
DataServiceTransaction dst =
DataServiceTransaction.getCurrentDataServiceTransaction( ); dst.refreshFill( "aims.finding", null ); dst.commit( );

 

List loanID = new ArrayList();
loanID.add( newPrefs.getLoanID( ) );
dst.refreshFill( "aims.loanApplication", loanID );

dst.commit( );


This doesn't see to have any effect.

 


////////////////////////
// updateItem
////////////////////////
Map loanID = new HashMap();

 

loanID.put( "loanID", newPrefs.getLoanID( ) ); Object updatedFindings = (Object) new FindingAssembler( ).getFinding( loanID );

 

dst.updateItem( "aims.loanApplication", updatedFindings, null, null );

dst.commit( );

 


Receive The Following Error:

[RPC Fault faultString="Could not invoke sync method on data adapter for destination 'aims.borrowerPreference' due to the following error: class java.lang.ClassCastException:java.lang.String."
faultCode="Server.Processing" faultDetail="null"]

 

Although the aims.borrowerPreferences destination doesn't have anything to do with the aims.finding destination that we are trying to update.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So this is where we stand. If you could point us in the direction of a solution, or something else to try we'd much very happy!

Thanks in advance for any help thrown our way.

John.

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to