Class WebServiceProxyCall

java.lang.Object
com.codename1.io.WebServiceProxyCall

public abstract class WebServiceProxyCall extends Object
Utility class used by the webservice proxy code to invoke server code
  • Field Details

    • TYPE_VOID

      public static final int TYPE_VOID
      Web protocol argument/return type
      See Also:
    • TYPE_BYTE

      public static final int TYPE_BYTE
      Web protocol argument/return type
      See Also:
    • TYPE_CHAR

      public static final int TYPE_CHAR
      Web protocol argument/return type
      See Also:
    • TYPE_SHORT

      public static final int TYPE_SHORT
      Web protocol argument/return type
      See Also:
    • TYPE_INT

      public static final int TYPE_INT
      Web protocol argument/return type
      See Also:
    • TYPE_LONG

      public static final int TYPE_LONG
      Web protocol argument/return type
      See Also:
    • TYPE_DOUBLE

      public static final int TYPE_DOUBLE
      Web protocol argument/return type
      See Also:
    • TYPE_FLOAT

      public static final int TYPE_FLOAT
      Web protocol argument/return type
      See Also:
    • TYPE_BOOLEAN

      public static final int TYPE_BOOLEAN
      Web protocol argument/return type
      See Also:
    • TYPE_BYTE_OBJECT

      public static final int TYPE_BYTE_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_CHARACTER_OBJECT

      public static final int TYPE_CHARACTER_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_SHORT_OBJECT

      public static final int TYPE_SHORT_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_INTEGER_OBJECT

      public static final int TYPE_INTEGER_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_LONG_OBJECT

      public static final int TYPE_LONG_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_DOUBLE_OBJECT

      public static final int TYPE_DOUBLE_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_FLOAT_OBJECT

      public static final int TYPE_FLOAT_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_BOOLEAN_OBJECT

      public static final int TYPE_BOOLEAN_OBJECT
      Web protocol argument/return type
      See Also:
    • TYPE_STRING

      public static final int TYPE_STRING
      Web protocol argument/return type
      See Also:
    • TYPE_BYTE_ARRAY

      public static final int TYPE_BYTE_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_CHAR_ARRAY

      public static final int TYPE_CHAR_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_SHORT_ARRAY

      public static final int TYPE_SHORT_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_INT_ARRAY

      public static final int TYPE_INT_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_LONG_ARRAY

      public static final int TYPE_LONG_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_DOUBLE_ARRAY

      public static final int TYPE_DOUBLE_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_FLOAT_ARRAY

      public static final int TYPE_FLOAT_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_BOOLEAN_ARRAY

      public static final int TYPE_BOOLEAN_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_STRING_ARRAY

      public static final int TYPE_STRING_ARRAY
      Web protocol argument/return type
      See Also:
    • TYPE_EXTERNALIABLE

      public static final int TYPE_EXTERNALIABLE
      Web protocol argument/return type
      See Also:
  • Constructor Details

    • WebServiceProxyCall

      public WebServiceProxyCall()
  • Method Details

    • invokeWebserviceSync

      public static Object invokeWebserviceSync(WebServiceProxyCall.WSDefinition def, Object... arguments) throws IOException

      Invokes a webservice synchronously and returns result

      Parameters
      • def: definition of the webservice request

      • arguments: the arguments to the service

      Returns

      the value of the sync call

      Throws
      • IOException: an exception in case of a webservice fail
      Throws:
      IOException
    • invokeWebserviceASync

      public static void invokeWebserviceASync(WebServiceProxyCall.WSDefinition def, SuccessCallback scall, FailureCallback fcall, Object... arguments)

      Invokes a web asynchronously and calls the callback on completion

      Parameters
      • def: definition of the webservice request

      • scall: the return value callback

      • fcall: the error callback

      • arguments: the arguments to the webservice

    • invokeWebserviceASync

      public static void invokeWebserviceASync(WebServiceProxyCall.WSDefinition def, Callback call, Object... arguments)

      Invokes a web asynchronously and calls the callback on completion

      Parameters
      • def: definition of the webservice request

      • call: the return value containing an error callback or value

      • arguments: the arguments to the webservice

    • defineWebService

      public static WebServiceProxyCall.WSDefinition defineWebService(String url, String serviceName, int returnType, int... argumentTypes)

      Creates a webservice definition object which can be used to invoke the webservice.

      Parameters
      • url: the url of the webservice

      • serviceName: the name of the service method

      • returnType: the return type for the webservice one of the TYPE_* constants

      • argumentTypes: the arguments for the webservice using the TYPE_* constants

      Returns

      a WSDefinition object