Interface org.as2lib.io.conn.core.event.MethodInvocationErrorListener

Description

MethodInvocationErrorListener awaits an error response of a method invocation.

When and why the event method is invoked depends on the used client.

This interface can either be instantiated directly or implemented by a class. If you instantiate it directly you must overwrite the event methods with anonymous function.

Note that overwriting the event method with a anonymous function is error-prone, because the arguments' types and the return type are not type-checked. Instantiating an interface directly is also not permitted in Flex. var listener:MethodInvocationErrorListener = new MethodInvocationErrorListener(); listener.onError = function(errorInfo:MethodInvocationErrorInfo):Void { trace("Error occured when trying to invoke the method: " + errorInfo); }

Implementing the interface by a class is a much neater way, but sometimes adds unnecessary complexity. class MyListener implements MethodInvocationErrorListener { public function onError(errorInfo:MethodInvocationErrorInfo):Void { trace("Error occured when trying to invoke the method: " + errorInfo); } }

Method Index

onError()

Method Detail

onError

public function onError(errorInfo:MethodInvocationErrorInfo):Void

Is executed when a method invocation fails.

Known issues are:

  • The method threw an exception.
  • The method does not exist on the remote service.

Remember that not all clients support this functionalities.

Parameters

errorInfocontains information about the error and some useful information about the called method