it.imolinfo.jbi4corba.webservice.runtime
Class CorbaTransformationUtils

java.lang.Object
  extended by it.imolinfo.jbi4corba.webservice.runtime.CorbaTransformationUtils

public class CorbaTransformationUtils
extends Object

This class provides utility functions to transform objects from jax-ws objects to Corba objects and vice-a-versa


Constructor Summary
CorbaTransformationUtils()
           
 
Method Summary
static Object changeFromCorbaToServiceObject(Object corbaObject, RuntimeInformation runtimeInfo, Class objectType)
          changeFromCorbaToServiceObjects - Transform Corba objects to jax-ws objects in operation return type and exceptions
static Object[] changeFromCorbaToServiceObjects(Object[] corbaParams, RuntimeInformation runtimeInfo, MethodSignature methodSignature)
          recursiveInvokationAdapter - Transform jax-ws objects to Corba objects in operation parameters
static Object changeFromServiceToCorbaObject(Object serviceObject, RuntimeInformation runtimeInfo, Class objectType)
          changeFromCorbaToServiceObjects - Transform Corba objects to jax-ws objects in operation return type and exceptions
static Object[] changeFromServiceToCorbaObjects(Object[] serviceParams, RuntimeInformation runtimeInfo, MethodSignature methodSignature)
          recursiveInvokationAdapter - Transform jax-ws objects to Corba objects in operation parameters
static void changeHoldersFromCorbaToServiceObjects(MethodSignature methodSignature, List<Object> params, Object[] paramArrayAfterInvocation, RuntimeInformation runtimeInfo)
          Change the Holder params after the servant invocation.
static Object[] changeHoldersFromServiceToCorbaObjects(MethodSignature methodSignature, List<Object> params, RuntimeInformation runtimeInfo)
          Change the Holder params for the correct servant invocation.
static int delinearizeArray(Object[] objects, Object myArray, int actualElement)
          Returns a multidimentional array from a linearized Object, see CRB-214.
static MethodSignature getMetodSignatureFromMethod(Method method, List<MethodSignature> methodSignatures)
          Gets the MethodSignature object from the Method class.
static Any transformToAny(Object serviceObject, Any any, RuntimeInformation runtimeInfo)
          * transformToAny - Transform jax-ws objects to Corba objects (Any type)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorbaTransformationUtils

public CorbaTransformationUtils()
Method Detail

changeFromCorbaToServiceObject

public static Object changeFromCorbaToServiceObject(Object corbaObject,
                                                    RuntimeInformation runtimeInfo,
                                                    Class objectType)
                                             throws SecurityException,
                                                    IllegalArgumentException,
                                                    ClassNotFoundException,
                                                    NoSuchFieldException,
                                                    IllegalAccessException,
                                                    InvocationTargetException,
                                                    InstantiationException,
                                                    NoSuchMethodException
changeFromCorbaToServiceObjects - Transform Corba objects to jax-ws objects in operation return type and exceptions

Parameters:
corbaObject -
runtimeInfo -
objectType -
Returns:
Throws:
SecurityException
IllegalArgumentException
ClassNotFoundException
NoSuchFieldException
IllegalAccessException
InvocationTargetException
InstantiationException
NoSuchMethodException

changeFromServiceToCorbaObjects

public static Object[] changeFromServiceToCorbaObjects(Object[] serviceParams,
                                                       RuntimeInformation runtimeInfo,
                                                       MethodSignature methodSignature)
                                                throws ClassNotFoundException,
                                                       InstantiationException,
                                                       IllegalAccessException,
                                                       SecurityException,
                                                       NoSuchFieldException,
                                                       IllegalArgumentException,
                                                       InvocationTargetException,
                                                       NoSuchMethodException
recursiveInvokationAdapter - Transform jax-ws objects to Corba objects in operation parameters

Parameters:
serviceParams -
runtimeInfo -
methodSignature -
Returns:
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
SecurityException
NoSuchFieldException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException

changeFromCorbaToServiceObjects

public static Object[] changeFromCorbaToServiceObjects(Object[] corbaParams,
                                                       RuntimeInformation runtimeInfo,
                                                       MethodSignature methodSignature)
                                                throws ClassNotFoundException,
                                                       InstantiationException,
                                                       IllegalAccessException,
                                                       SecurityException,
                                                       NoSuchFieldException,
                                                       IllegalArgumentException,
                                                       InvocationTargetException,
                                                       NoSuchMethodException
recursiveInvokationAdapter - Transform jax-ws objects to Corba objects in operation parameters

Parameters:
corbaParams -
runtimeInfo -
methodSignature -
Returns:
Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
SecurityException
NoSuchFieldException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException

changeFromServiceToCorbaObject

public static Object changeFromServiceToCorbaObject(Object serviceObject,
                                                    RuntimeInformation runtimeInfo,
                                                    Class objectType)
                                             throws SecurityException,
                                                    IllegalArgumentException,
                                                    ClassNotFoundException,
                                                    NoSuchFieldException,
                                                    IllegalAccessException,
                                                    InvocationTargetException,
                                                    InstantiationException,
                                                    NoSuchMethodException
changeFromCorbaToServiceObjects - Transform Corba objects to jax-ws objects in operation return type and exceptions

Parameters:
res -
runtimeInfo -
objectType -
Returns:
Throws:
SecurityException
IllegalArgumentException
ClassNotFoundException
NoSuchFieldException
IllegalAccessException
InvocationTargetException
InstantiationException
NoSuchMethodException

changeHoldersFromServiceToCorbaObjects

public static Object[] changeHoldersFromServiceToCorbaObjects(MethodSignature methodSignature,
                                                              List<Object> params,
                                                              RuntimeInformation runtimeInfo)
                                                       throws InstantiationException,
                                                              IllegalAccessException,
                                                              SecurityException,
                                                              NoSuchFieldException,
                                                              ClassNotFoundException,
                                                              IllegalArgumentException,
                                                              InvocationTargetException,
                                                              NoSuchMethodException
Change the Holder params for the correct servant invocation.

Parameters:
methodSignature -
params -
runtimeInfo -
Returns:
Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchFieldException
ClassNotFoundException
IllegalArgumentException
InvocationTargetException
NoSuchMethodException

changeHoldersFromCorbaToServiceObjects

public static void changeHoldersFromCorbaToServiceObjects(MethodSignature methodSignature,
                                                          List<Object> params,
                                                          Object[] paramArrayAfterInvocation,
                                                          RuntimeInformation runtimeInfo)
                                                   throws InstantiationException,
                                                          IllegalAccessException,
                                                          SecurityException,
                                                          NoSuchFieldException,
                                                          IllegalArgumentException,
                                                          ClassNotFoundException,
                                                          InvocationTargetException,
                                                          NoSuchMethodException
Change the Holder params after the servant invocation. It's the opposite of method changeHolderParamsBeforeServantInvocation: get the Corba holder values and set it into the javax.xml.ws.Holder params elements.

Parameters:
methodSignature -
params -
paramArrayAfterInvocation -
runtimeInfo -
Throws:
InstantiationException
IllegalAccessException
SecurityException
NoSuchFieldException
IllegalArgumentException
ClassNotFoundException
InvocationTargetException
NoSuchMethodException

transformToAny

public static Any transformToAny(Object serviceObject,
                                 Any any,
                                 RuntimeInformation runtimeInfo)
                          throws ClassNotFoundException,
                                 SecurityException,
                                 IllegalArgumentException,
                                 NoSuchFieldException,
                                 IllegalAccessException,
                                 InvocationTargetException,
                                 NoSuchMethodException,
                                 InstantiationException
* transformToAny - Transform jax-ws objects to Corba objects (Any type)

Parameters:
serviceObject -
any -
runtimeInfo -
Returns:
Throws:
ClassNotFoundException
SecurityException
IllegalArgumentException
NoSuchFieldException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
InstantiationException

getMetodSignatureFromMethod

public static MethodSignature getMetodSignatureFromMethod(Method method,
                                                          List<MethodSignature> methodSignatures)
Gets the MethodSignature object from the Method class. The correspondace between the MethodSignature and the method can be saved for further optimization.

Parameters:
method -
Returns:

delinearizeArray

public static int delinearizeArray(Object[] objects,
                                   Object myArray,
                                   int actualElement)
Returns a multidimentional array from a linearized Object, see CRB-214.

Parameters:
objects -
dimentions -
Returns:


Copyright © 2005-2010 Imola Informatica. All Rights Reserved.