Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RemoteObject Calls FaultHandler in Some Cases Need Help #404

Closed
pashminakazi opened this issue Mar 15, 2019 · 7 comments
Closed

RemoteObject Calls FaultHandler in Some Cases Need Help #404

pashminakazi opened this issue Mar 15, 2019 · 7 comments

Comments

@pashminakazi
Copy link
Contributor

I am calling many java side function with remoteObject in my .as and .mxml files they all work fine.
ShmCompanySetup is my module, From where I am calling 7 or 8 Java Methods with Multiple RO's.
In that File first RO is calling faultHandler and all other RO's calling resultHandler.
My Application File: https://paste.apache.org/t3zP

In another project, I have created the same RO with the same function and it calls resultHandler: https://paste.apache.org/uyuX

In my application, I have created this RO in my parent application File shmApplication.as
and set its dataprovider in my module file's advancedDataGrid and it works fine.

I have tried much more to make this RO working by

  1. by removing all other RO's From File except this RO
  2. by removing some components
  3. by changing Responder and token number
    but it always calls fault handler
    This RO is for setting the values of AdvancedDataGrid,
    In my Another Module file same Problem is happening with RO which is setting AdvancedDataGrid values
@aharui
Copy link
Contributor

aharui commented Mar 29, 2019

Does the fault handler report an error? I think there should be additional information in the error.

You could try examining the bits on the wire with a network monitor and see what is different.

Is the function you are concerned about called "fn_GetCompListDP"? Make sure it is being called properly. Looking quickly it appeared there were more references to that function than I would expect.

@pashminakazi
Copy link
Contributor Author

I was trying through commenting some portion of code and compile it again and again but it always calls faultHandler..
Now when I comment VO classes imports and objects of VO classes it class resultHandler

import com.shm.VO.Common.shmCompanySetupVO;
import com.shm.VO.Common.shmDeliveryLocationSetupVO;

[Bindable] private var voCompany:Object = new shmCompanySetupVO();
[Bindable] private var voDeliveryLocation:Object = new shmDeliveryLocationSetupVO();

dgCompData.selectedItem == null ? fn_ResetPage() : shmUtil.setForm(arrFormItems, voCompany as Object, org.apache.royale.reflection.describeType(shmCompanySetupVO) as XML

I comment out these lines From my mxml file and it works. Why?
Is this was a problem of describeType?

@aharui
Copy link
Contributor

aharui commented Mar 29, 2019

What error is reported in the faultHandler? I want to make sure you know how to see the error reported or determine that no error is being reported.

I suspect you are getting an error in the AMF code trying to deserialize the server response into your VOs. Can you confirm you are on the latest version that has @greg-dove improvements? Then it would be in your interest to learn how to debug that code or maybe @greg-dove will have time to help you.

@greg-dove
Copy link
Contributor

Just adding a quick comment for now:
org.apache.royale.reflection.describeType(shmCompanySetupVO) as XML
The above will always be null in royale because describeType in royale does not return XML, it returns a TypeDefinition instance (usually) so if this is causing an error somewhere in the result processing it could be the cause of the problem.

Based on descriptions provided ('works in isolated code'), it does not sound like deserialization errors.
The fault handling support in the AMFNetConnection class does tend to swallow error details, so I think this is probably where the information loss is happening for the resulting fault. Or maybe it is faulting from the resulthandler call when it should ignore errors that happen during that. It probably needs some additional work in that part. That would be my guess where things are not working right, so checking the 'reflection' argument processing inside shmUtil.setForm method might be a good start. It should now use royale TypeDefinition instead of XML.
I will be away from my desk a lot this weekend, but I can check back occasionally. If I can help, I will.

@pashminakazi pashminakazi changed the title RemoteObject Calls FaultHandler in Some Cases Need Help Unable to port a method in flex Jul 29, 2019
@pashminakazi
Copy link
Contributor Author

We have a method:
https://paste.apache.org/jy56s
We are calling it as : shmUtil.setForm(arrFormItems, voCompany as Object,
org.apache.royale.reflection.describeType(shmCompanySetupVO) as XML);

We have tried it using TypeDefinition Instead of XML. Still the method is not working as before.

@pashminakazi
Copy link
Contributor Author

When we have changed XML to TypeDefinition in method setForm(...aValueObjInfo:TypeDefinition){.....
for each (var val:TypeDefinition in aValueObjInfo..variable)
...}

I got a compile time Error as ..variable property not exist in TypeDefinition:

Access of possibly undefined property variable through a reference with static type TypeDefinition.
[java]
[java] for each (var val:TypeDefinition in aValueObjInfo..variable)

Kindly Help us to Port this method. As we are using this method in our whole Application in every file.

Thanks in Advance

@pashminakazi pashminakazi changed the title Unable to port a method in flex RemoteObject Calls FaultHandler in Some Cases Need Help Jul 29, 2019
@pashminakazi
Copy link
Contributor Author

Created a separate issue for Unable to port a flex method: #438

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants