Hi everyone!
I have a problem when working with webservices and backend exceptions.
This is the situation:
I have a backend written  in Java, and a frontend in Flex 3, both connected
through web services. For the TOs (transfer objects) I use the Import Web
Services tool provided by Flex Builder.
Everything works fairly fine... but I have an issue when the backend throws
an exception.
This is the code:

public class SecurityMainService extends MovieClip
>     {
>
>
                  private var securityService:SecurityWS = new SecurityWS();
>
>
>         public function SecurityMainService()
>         {
>             super();
>
> this.securityService.addSecurityWSFaultEventListener(errorHandler);
>         }
>
>         public function errorHandler(event:FaultEvent):void{
>             Assets.show_alert_alert(event.fault.faultString);
>         }
>
>         public function deleteRole(aRole:Role, handler:Function):void{
>             this.securityService.adddeleteRoleEventListener(handler);
>             var arg:DeleteRole = new DeleteRole();
>             arg.arg0 = aRole.id;
>             this.securityService.deleteRole(arg);
>         }
>

 When the backend throws an exception, the errorHandler is called. The
backend sends me a custom exception, and i can see it in the raw http
response, but here, in the FaultEvent object, it seems that is lost... it
suppoused to be inside fault attribute, but it's not.
So, the question is, what I'm doing wrong?
I hope you understand. Let me know if you need more detail to give me a
hand.
Thanks in advance!
Cheers,
Jorge

Reply via email to