This content has been marked as final. Show 4 replies
Yeah, the updateItem call should have the proper value of the "locations" property. The first thing I'd check is that you have set up the "identity" property for the location destination correctly. If it has the wrong property name, it won't be able to map ids to items correctly and so would get the empty value.
If that isn't the problem, could you enable debug logging on the server and include the debug logs? You'd go to WEB-INF/flex/services-config.xml, search for "level=", change that to Debug and be sure that your patterns has both Message.* and Endpoint.*. It should contain enough info so we can see what is going wrong.
Thanks for your reply. Here is the debug message on the server:
[Flex][INFO] Channel endpoint my-secure-http received request.
[Flex][DEBUG] Deserializing AMFX/HTTP request
(Message #0 targetURI=null, responseURI=null)
(Typed Object #0 'flex.messaging.messages.RemotingMessage')
body = (Array #1)
(Typed Object #2 'com.presidio.organization.Organization')
active = 1
billingVendorMasterId = 21
bpmWorkflowName = "aaaaWorkflow.par"
codingVendorMasterId = 102
createWho = "AAAAA3"
lastWho = null
locationSet = (Typed Object #3 'flex.messaging.io.ArrayCollection')
(Byte Array #3, Length 788)
name = "Name is not shown"
organizationCode = "AAAA"
organizationId = 10
uid = "10"
clientId = null
destination = "userMasterService"
DSEndpoint = "my-secure-http"
headers = messageId = "6593CEAC-E963-C47D-D710-396990BB6404"
operation = "checkOrganization"
source = null
timestamp = 0
timeToLive = 0
As you can see, this shows the locationSet has 3 entries. But on the server, when the object arrives, the locationSet is empty. Help, Please!!!
I am actually a little confused. This is a RemotingMessage which means it is sent from the client to the server when you "send" a RemoteObject request. In this case, it is to the destination "userMasterService" to the "checkOrganization" method. Probably this is just a debug call you added and so not related to the original problem? I'm looking to see the messages of type DataMessage... in particular there would be a "batched" message which would contain one or more "update", "create" etc messages.
Hi jvroom -
Thanks for your response. I've been trying everything from sending message back through to the HibernateAssembler and also just trying it through an RPC call. The same behavior is present. I have, however, found a work around for it.....
The Organization java object had the locationSet as a Set/HashSet declared for the set. I did this in order to use the HIbernate set notation, instead of having to use an indexed List. However, when I changed the Java object to a List, then it worked. It appears as though, for some reason, serialization does not work when declaring a Set. Not sure why since the Flex documentation explicitly allows a Set/HashSet on the java side.
Any thoughts about that? Anyway, that was the solution that I found. Hibernate does act a little strangely though given the way the Hibernate Assembler compares the changes. For example, even though I get the entire graph on the client, if I delete one of the locations in the list, the server will only NULL out the foreign key, instead of deleting the row. In my unit test on the server going straight to Hibernate, it deletes the row. So, what I need to do on the client is get the organizations and get the locations seperately. When I delete from the location list, and then commit, it works fine.
I'll do some more playing around with it, but I would assume that if I delete a bean in a set that it would reflect the same change through hibernate.