diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-24 22:30:14 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2008-06-24 22:30:14 +0000 |
commit | 03f69bb61839f7acbff8683c1ff3d53039ca1b97 (patch) | |
tree | 3e21e90ac88992fb561695997f2adad09ec7950f /java/sca | |
parent | adae3fa3d6d27c7475596876fb7acc248d040d6d (diff) |
Format the code based tuscany eclipse formatter
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@671373 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
162 files changed, 6807 insertions, 7342 deletions
diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaServiceBindingProvider.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaServiceBindingProvider.java index 5292b3e452..a48bd730ee 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaServiceBindingProvider.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaServiceBindingProvider.java @@ -61,35 +61,30 @@ public class CorbaServiceBindingProvider implements ServiceBindingProvider { org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(new String[0], props); Servant servant = createServant(); - + // get reference to rootpoa & activate the POAManager - POA rootpoa = POAHelper.narrow( - orb.resolve_initial_references("RootPOA")); + POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA")); rootpoa.the_POAManager().activate(); // get object reference from the servant - org.omg.CORBA.Object ref = - rootpoa.servant_to_reference(servant); - + org.omg.CORBA.Object ref = rootpoa.servant_to_reference(servant); + org.omg.CORBA.Object href = null; // AddHelper.narrow(ref); - + // get the root naming context // NameService invokes the name service - org.omg.CORBA.Object objRef = - orb.resolve_initial_references("NameService"); + org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); // Use NamingContextExt which is part of the Interoperable // Naming Service (INS) specification. - NamingContextExt ncRef = - NamingContextExtHelper.narrow(objRef); + NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); // bind the Object Reference in Naming - NameComponent path[] = ncRef.to_name( binding.getURI() ); + NameComponent path[] = ncRef.to_name(binding.getURI()); ncRef.rebind(path, href); // wait for invocations from clients orb.run(); - } catch (Exception e) { throw new ServiceRuntimeException(e); } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/TuscanyServant.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/TuscanyServant.java index e6733a8c71..2be169cdcb 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/TuscanyServant.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/TuscanyServant.java @@ -24,7 +24,6 @@ import org.omg.CORBA.ServerRequest; import org.omg.PortableServer.DynamicImplementation; import org.omg.PortableServer.POA; - /** * This is the CORBA DSI servant that dispatches CORBA requests to SCA components * @@ -32,9 +31,9 @@ import org.omg.PortableServer.POA; */ public class TuscanyServant extends DynamicImplementation { private ORB orb; - + @Override - public void invoke(ServerRequest request) { + public void invoke(ServerRequest request) { } @Override diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/CorbaException.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/CorbaException.java index cfc100ee62..6e54556a2c 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/CorbaException.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/CorbaException.java @@ -25,10 +25,10 @@ package org.apache.tuscany.sca.binding.corba.impl.exceptions; */ public class CorbaException extends Exception { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; + + public CorbaException(String message, Throwable cause) { + super(message, cause); + } - public CorbaException(String message, Throwable cause) { - super(message, cause); - } - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/RequestConfigurationException.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/RequestConfigurationException.java index 61de0496e3..9a11d205f2 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/RequestConfigurationException.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/exceptions/RequestConfigurationException.java @@ -24,20 +24,20 @@ package org.apache.tuscany.sca.binding.corba.impl.exceptions; */ public class RequestConfigurationException extends Exception { - private static final long serialVersionUID = 1L; - private String objectId; - - public RequestConfigurationException(String message, String objectId) { - super(message + ", object id was: " + objectId); - this.objectId = objectId; - } - - public RequestConfigurationException(String message) { - super(message); - } - - public String getType() { - return objectId; - } + private static final long serialVersionUID = 1L; + private String objectId; + + public RequestConfigurationException(String message, String objectId) { + super(message + ", object id was: " + objectId); + this.objectId = objectId; + } + + public RequestConfigurationException(String message) { + super(message); + } + + public String getType() { + return objectId; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaRequest.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaRequest.java index 1e41e60b9f..2036b95c9b 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaRequest.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaRequest.java @@ -42,132 +42,128 @@ import org.omg.CORBA.portable.OutputStream; */ public class DynaCorbaRequest { - private TypeTree returnTree; - private Map<String, TypeTree> exceptions = new HashMap<String, TypeTree>(); - private OutputStream outputStream; - private ObjectImpl remoteObject; - private String operation; + private TypeTree returnTree; + private Map<String, TypeTree> exceptions = new HashMap<String, TypeTree>(); + private OutputStream outputStream; + private ObjectImpl remoteObject; + private String operation; - /** - * Creates request. - * - * @param ObjectremoteObject - * remote object reference - * @param operation - * operation to invoke - */ - public DynaCorbaRequest(Object remoteObject, String operation) { - outputStream = ((ObjectImpl) remoteObject)._request(operation, true); - this.remoteObject = (ObjectImpl) remoteObject; - this.operation = operation; + /** + * Creates request. + * + * @param ObjectremoteObject + * remote object reference + * @param operation + * operation to invoke + */ + public DynaCorbaRequest(Object remoteObject, String operation) { + outputStream = ((ObjectImpl)remoteObject)._request(operation, true); + this.remoteObject = (ObjectImpl)remoteObject; + this.operation = operation; - } + } - /** - * Adds operation argument - * - * @param argument - */ - public void addArgument(java.lang.Object argument) - throws RequestConfigurationException { - TypeTree tree = TypeTreeCreator.createTypeTree(argument.getClass()); - TypeHelpersProxy.write(tree.getRootNode(), outputStream, argument); - } + /** + * Adds operation argument + * + * @param argument + */ + public void addArgument(java.lang.Object argument) throws RequestConfigurationException { + TypeTree tree = TypeTreeCreator.createTypeTree(argument.getClass()); + TypeHelpersProxy.write(tree.getRootNode(), outputStream, argument); + } - /** - * Sets return type for operation - * - * @param forClass - */ - public void setOutputType(Class<?> forClass) - throws RequestConfigurationException { - returnTree = TypeTreeCreator.createTypeTree(forClass); - } + /** + * Sets return type for operation + * + * @param forClass + */ + public void setOutputType(Class<?> forClass) throws RequestConfigurationException { + returnTree = TypeTreeCreator.createTypeTree(forClass); + } - /** - * Configures possible exceptions - * - * @param forClass - */ - public void addExceptionType(Class<?> forClass) - throws RequestConfigurationException { - TypeTree tree = TypeTreeCreator.createTypeTree(forClass); - String exceptionId = Utils.getExceptionId(forClass); - exceptions.put(exceptionId, tree); - } + /** + * Configures possible exceptions + * + * @param forClass + */ + public void addExceptionType(Class<?> forClass) throws RequestConfigurationException { + TypeTree tree = TypeTreeCreator.createTypeTree(forClass); + String exceptionId = Utils.getExceptionId(forClass); + exceptions.put(exceptionId, tree); + } - /** - * Handles application excpeition. - * - * @param ae - * occured exception - * @throws Exception - */ - private void handleApplicationException(ApplicationException ae) - throws Exception { - try { - if (exceptions.size() == 0) { - RequestConfigurationException exception = new RequestConfigurationException( - "ApplicationException occured, but no exception type was specified.", - ae.getId()); - throw exception; - } - InputStream is = ae.getInputStream(); - String exceptionId = is.read_string(); - TypeTree tree = exceptions.get(exceptionId); - if (tree == null) { - RequestConfigurationException exception = new RequestConfigurationException( - "ApplicationException occured, but no such exception was defined", - ae.getId()); - throw exception; - } else { - Exception ex = (Exception) TypeHelpersProxy.read(tree - .getRootNode(), is); - throw ex; - } - } catch (Exception e) { - throw e; - } - } + /** + * Handles application excpeition. + * + * @param ae + * occured exception + * @throws Exception + */ + private void handleApplicationException(ApplicationException ae) throws Exception { + try { + if (exceptions.size() == 0) { + RequestConfigurationException exception = + new RequestConfigurationException( + "ApplicationException occured, but no exception type was specified.", + ae.getId()); + throw exception; + } + InputStream is = ae.getInputStream(); + String exceptionId = is.read_string(); + TypeTree tree = exceptions.get(exceptionId); + if (tree == null) { + RequestConfigurationException exception = + new RequestConfigurationException( + "ApplicationException occured, but no such exception was defined", + ae.getId()); + throw exception; + } else { + Exception ex = (Exception)TypeHelpersProxy.read(tree.getRootNode(), is); + throw ex; + } + } catch (Exception e) { + throw e; + } + } - /** - * Handles exceptions generated by CORBA API - * - * @param se - */ - private void handleSystemException(SystemException se) throws Exception { - if (se instanceof BAD_OPERATION) { - throw new CorbaException("Bad operation name: " + operation, se); - } else if (se instanceof BAD_PARAM) { - throw new CorbaException("Bad parameter", se); - } else { - // TODO: handle more system exception types - throw new CorbaException(se.getMessage(), se); - } - } + /** + * Handles exceptions generated by CORBA API + * + * @param se + */ + private void handleSystemException(SystemException se) throws Exception { + if (se instanceof BAD_OPERATION) { + throw new CorbaException("Bad operation name: " + operation, se); + } else if (se instanceof BAD_PARAM) { + throw new CorbaException("Bad parameter", se); + } else { + // TODO: handle more system exception types + throw new CorbaException(se.getMessage(), se); + } + } - /** - * Invokes previously configured request - * - * @return - */ - public DynaCorbaResponse invoke() throws Exception { - DynaCorbaResponse response = new DynaCorbaResponse(); - InputStream is = null; - try { - is = remoteObject._invoke(outputStream); - if (is != null && returnTree != null) { - response.setContent(TypeHelpersProxy.read(returnTree - .getRootNode(), is)); - } - } catch (ApplicationException ae) { - handleApplicationException(ae); - } catch (SystemException se) { - handleSystemException(se); - } catch (Exception e) { - throw e; - } - return response; - } + /** + * Invokes previously configured request + * + * @return + */ + public DynaCorbaResponse invoke() throws Exception { + DynaCorbaResponse response = new DynaCorbaResponse(); + InputStream is = null; + try { + is = remoteObject._invoke(outputStream); + if (is != null && returnTree != null) { + response.setContent(TypeHelpersProxy.read(returnTree.getRootNode(), is)); + } + } catch (ApplicationException ae) { + handleApplicationException(ae); + } catch (SystemException se) { + handleSystemException(se); + } catch (Exception e) { + throw e; + } + return response; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaResponse.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaResponse.java index cb60f91c66..25463a7a8a 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaResponse.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/DynaCorbaResponse.java @@ -26,14 +26,14 @@ package org.apache.tuscany.sca.binding.corba.impl.reference; */ public class DynaCorbaResponse { - private Object content; + private Object content; - public Object getContent() { - return content; - } + public Object getContent() { + return content; + } - public void setContent(Object content) { - this.content = content; - } + public void setContent(Object content) { + this.content = content; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceInstanceCreator.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceInstanceCreator.java index 5c24e035de..7965ecb86a 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceInstanceCreator.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceInstanceCreator.java @@ -34,39 +34,37 @@ import org.omg.CORBA.Object; */ public class InterfaceInstanceCreator { - private static final CallbackFilter FILTER = new CallbackFilter() { - public int accept(Method method) { - return 1; - } - }; + private static final CallbackFilter FILTER = new CallbackFilter() { + public int accept(Method method) { + return 1; + } + }; - /** - * Dynamically creates instance of user defined interface. Instance is - * enhanced by RemoteMethodInterceptor - * - * @param reference - * CORBA reference - * @param forClass - * user defined interface - * @return dynamic implementation instance - */ - public static java.lang.Object createInstance(Object reference, - Class<?> forClass) { - java.lang.Object result = null; - try { - Enhancer enhancer = new Enhancer(); - enhancer.setInterfaces(new Class[] { forClass }); - enhancer.setCallbackFilter(FILTER); - enhancer.setCallbackTypes(new Class[] { NoOp.class, - MethodInterceptor.class }); - Class<?> newClass = enhancer.createClass(); - Enhancer.registerStaticCallbacks(newClass, new Callback[] { - NoOp.INSTANCE, new InterfaceMethodInterceptor(reference) }); - result = newClass.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } + /** + * Dynamically creates instance of user defined interface. Instance is + * enhanced by RemoteMethodInterceptor + * + * @param reference + * CORBA reference + * @param forClass + * user defined interface + * @return dynamic implementation instance + */ + public static java.lang.Object createInstance(Object reference, Class<?> forClass) { + java.lang.Object result = null; + try { + Enhancer enhancer = new Enhancer(); + enhancer.setInterfaces(new Class[] {forClass}); + enhancer.setCallbackFilter(FILTER); + enhancer.setCallbackTypes(new Class[] {NoOp.class, MethodInterceptor.class}); + Class<?> newClass = enhancer.createClass(); + Enhancer.registerStaticCallbacks(newClass, new Callback[] {NoOp.INSTANCE, + new InterfaceMethodInterceptor(reference)}); + result = newClass.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceMethodInterceptor.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceMethodInterceptor.java index f8af8a8d6a..2642601057 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceMethodInterceptor.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/reference/InterfaceMethodInterceptor.java @@ -32,30 +32,31 @@ import org.omg.CORBA.Object; */ public class InterfaceMethodInterceptor implements MethodInterceptor { - private Object reference; - - public InterfaceMethodInterceptor(Object reference) { - this.reference = reference; - } - - /** - * Create and execute DynaCorbaRequest instance, basing on intercepted - * method arguments, return types, exceptions - */ - public java.lang.Object intercept(java.lang.Object object, Method method, - java.lang.Object[] arguments, MethodProxy arg3) throws Throwable { - DynaCorbaRequest request = new DynaCorbaRequest(reference, method - .getName()); - for (int i = 0; i < arguments.length; i++) { - request.addArgument(arguments[i]); - } - request.setOutputType(method.getReturnType()); - Class<?>[] exceptions = method.getExceptionTypes(); - for (int i = 0; i < exceptions.length; i++) { - request.addExceptionType(exceptions[i]); - } - DynaCorbaResponse response = request.invoke(); - return response.getContent(); - } + private Object reference; + + public InterfaceMethodInterceptor(Object reference) { + this.reference = reference; + } + + /** + * Create and execute DynaCorbaRequest instance, basing on intercepted + * method arguments, return types, exceptions + */ + public java.lang.Object intercept(java.lang.Object object, + Method method, + java.lang.Object[] arguments, + MethodProxy arg3) throws Throwable { + DynaCorbaRequest request = new DynaCorbaRequest(reference, method.getName()); + for (int i = 0; i < arguments.length; i++) { + request.addArgument(arguments[i]); + } + request.setOutputType(method.getReturnType()); + Class<?>[] exceptions = method.getExceptionTypes(); + for (int i = 0; i < exceptions.length; i++) { + request.addExceptionType(exceptions[i]); + } + DynaCorbaResponse response = request.invoke(); + return response.getContent(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/DynaCorbaServant.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/DynaCorbaServant.java index e5b2ec597b..6f7a736410 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/DynaCorbaServant.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/DynaCorbaServant.java @@ -46,136 +46,119 @@ import org.omg.CORBA.portable.ResponseHandler; */ public class DynaCorbaServant extends ObjectImpl implements InvokeHandler { - private static String[] DEFAULT_IDS = { "IDL:default:1.0" }; - private RuntimeComponentService service; - private Binding binding; - private String[] ids = DEFAULT_IDS; - private Map<String, OperationTypes> operationsCache = new HashMap<String, OperationTypes>(); + private static String[] DEFAULT_IDS = {"IDL:default:1.0"}; + private RuntimeComponentService service; + private Binding binding; + private String[] ids = DEFAULT_IDS; + private Map<String, OperationTypes> operationsCache = new HashMap<String, OperationTypes>(); - public DynaCorbaServant(RuntimeComponentService service, Binding binding) - throws RequestConfigurationException { - this.service = service; - this.binding = binding; - cacheOperationTypes(service.getInterfaceContract().getInterface() - .getOperations()); + public DynaCorbaServant(RuntimeComponentService service, Binding binding) throws RequestConfigurationException { + this.service = service; + this.binding = binding; + cacheOperationTypes(service.getInterfaceContract().getInterface().getOperations()); - } + } - private void cacheOperationTypes(List<Operation> operations) - throws RequestConfigurationException { - for (Operation operation : operations) { - try { - OperationTypes operationTypes = new OperationTypes(); - List<TypeTree> inputInstances = new ArrayList<TypeTree>(); - // cache output type tree - if (operation.getOutputType() != null - && operation.getOutputType().getPhysical() != null - && !operation.getOutputType().getPhysical().equals( - void.class)) { - TypeTree outputType = TypeTreeCreator - .createTypeTree(operation.getOutputType() - .getPhysical()); - operationTypes.setOutputType(outputType); - } - // cache input types trees - if (operation.getInputType() != null) { - for (DataType<List<DataType>> type : operation - .getInputType().getLogical()) { - Class<?> forClass = type.getPhysical(); - TypeTree inputType = TypeTreeCreator - .createTypeTree(forClass); - inputInstances.add(inputType); - } + private void cacheOperationTypes(List<Operation> operations) throws RequestConfigurationException { + for (Operation operation : operations) { + try { + OperationTypes operationTypes = new OperationTypes(); + List<TypeTree> inputInstances = new ArrayList<TypeTree>(); + // cache output type tree + if (operation.getOutputType() != null && operation.getOutputType().getPhysical() != null + && !operation.getOutputType().getPhysical().equals(void.class)) { + TypeTree outputType = TypeTreeCreator.createTypeTree(operation.getOutputType().getPhysical()); + operationTypes.setOutputType(outputType); + } + // cache input types trees + if (operation.getInputType() != null) { + for (DataType<List<DataType>> type : operation.getInputType().getLogical()) { + Class<?> forClass = type.getPhysical(); + TypeTree inputType = TypeTreeCreator.createTypeTree(forClass); + inputInstances.add(inputType); + } - } - operationTypes.setInputType(inputInstances); - operationsCache.put(operation.getName(), operationTypes); - } catch (RequestConfigurationException e) { - throw e; - } - } - } + } + operationTypes.setInputType(inputInstances); + operationsCache.put(operation.getName(), operationTypes); + } catch (RequestConfigurationException e) { + throw e; + } + } + } - public void setIds(String[] ids) { - if (ids != null) { - this.ids = ids; - } else { - this.ids = DEFAULT_IDS; - } - } + public void setIds(String[] ids) { + if (ids != null) { + this.ids = ids; + } else { + this.ids = DEFAULT_IDS; + } + } - public OutputStream _invoke(String method, InputStream in, - ResponseHandler rh) { + public OutputStream _invoke(String method, InputStream in, ResponseHandler rh) { - Operation operation = null; + Operation operation = null; - List<Operation> operations = service.getInterfaceContract() - .getInterface().getOperations(); - // searching for proper operation - for (Operation oper : operations) { - if (oper.getName().equals(method)) { - operation = oper; - break; - } - } - if (operation == null) { - // operation wasn't found - throw new org.omg.CORBA.BAD_OPERATION(0, - org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } else { - List<Object> inputInstances = new ArrayList<Object>(); - OperationTypes types = operationsCache.get(operation.getName()); - try { - // retrieving in arguments - for (TypeTree tree : types.getInputType()) { - Object o = TypeHelpersProxy.read(tree.getRootNode(), in); - inputInstances.add(o); - } - } catch (MARSHAL e) { - // parameter passed by user was not compatible with Java to - // Corba mapping - throw new org.omg.CORBA.BAD_PARAM(0, - org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } - try { - // invocation and sending result - Object result = service.getRuntimeWire(binding).invoke( - operation, inputInstances.toArray()); - if (types.getOutputType() != null) { - OutputStream out = rh.createReply(); - TypeTree tree = types.getOutputType(); - TypeHelpersProxy.write(tree.getRootNode(), out, result); - return out; - } - } catch (InvocationTargetException ie) { - // handling user exception - try { - OutputStream out = rh.createExceptionReply(); - Class<?> exceptionClass = ie.getTargetException() - .getClass(); - TypeTree tree = TypeTreeCreator - .createTypeTree(exceptionClass); - String exceptionId = Utils.getExceptionId(exceptionClass); - out.write_string(exceptionId); - TypeHelpersProxy.write(tree.getRootNode(), out, ie - .getTargetException()); - return out; - } catch (Exception e) { - // TODO: raise remote exception - exception while handling - // target exception - e.printStackTrace(); - } - } catch (Exception e) { - // TODO: raise remote exception - e.printStackTrace(); - } - } - return null; - } + List<Operation> operations = service.getInterfaceContract().getInterface().getOperations(); + // searching for proper operation + for (Operation oper : operations) { + if (oper.getName().equals(method)) { + operation = oper; + break; + } + } + if (operation == null) { + // operation wasn't found + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } else { + List<Object> inputInstances = new ArrayList<Object>(); + OperationTypes types = operationsCache.get(operation.getName()); + try { + // retrieving in arguments + for (TypeTree tree : types.getInputType()) { + Object o = TypeHelpersProxy.read(tree.getRootNode(), in); + inputInstances.add(o); + } + } catch (MARSHAL e) { + // parameter passed by user was not compatible with Java to + // Corba mapping + throw new org.omg.CORBA.BAD_PARAM(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } + try { + // invocation and sending result + Object result = service.getRuntimeWire(binding).invoke(operation, inputInstances.toArray()); + if (types.getOutputType() != null) { + OutputStream out = rh.createReply(); + TypeTree tree = types.getOutputType(); + TypeHelpersProxy.write(tree.getRootNode(), out, result); + return out; + } + } catch (InvocationTargetException ie) { + // handling user exception + try { + OutputStream out = rh.createExceptionReply(); + Class<?> exceptionClass = ie.getTargetException().getClass(); + TypeTree tree = TypeTreeCreator.createTypeTree(exceptionClass); + String exceptionId = Utils.getExceptionId(exceptionClass); + out.write_string(exceptionId); + TypeHelpersProxy.write(tree.getRootNode(), out, ie.getTargetException()); + return out; + } catch (Exception e) { + // TODO: raise remote exception - exception while handling + // target exception + e.printStackTrace(); + } + } catch (Exception e) { + // TODO: raise remote exception + e.printStackTrace(); + } + } + return null; + } - @Override - public String[] _ids() { - return ids; - } + @Override + public String[] _ids() { + return ids; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/OperationTypes.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/OperationTypes.java index fba667b072..2ffcd30d0a 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/OperationTypes.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/service/OperationTypes.java @@ -25,20 +25,23 @@ import org.apache.tuscany.sca.binding.corba.impl.types.TypeTree; public class OperationTypes { - private TypeTree outputType; - private List<TypeTree> inputType; - - public TypeTree getOutputType() { - return outputType; - } - public void setOutputType(TypeTree outputType) { - this.outputType = outputType; - } - public List<TypeTree> getInputType() { - return inputType; - } - public void setInputType(List<TypeTree> inputType) { - this.inputType = inputType; - } - + private TypeTree outputType; + private List<TypeTree> inputType; + + public TypeTree getOutputType() { + return outputType; + } + + public void setOutputType(TypeTree outputType) { + this.outputType = outputType; + } + + public List<TypeTree> getInputType() { + return inputType; + } + + public void setInputType(List<TypeTree> inputType) { + this.inputType = inputType; + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/NodeType.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/NodeType.java index cb1987cb4b..4080a836bc 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/NodeType.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/NodeType.java @@ -24,5 +24,5 @@ package org.apache.tuscany.sca.binding.corba.impl.types; * Types of CORBA objects. */ public enum NodeType { - primitive, struct, union, array, sequence, reference, idl_enum, exception + primitive, struct, union, array, sequence, reference, idl_enum, exception } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTree.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTree.java index 578a73a30e..2745383cd6 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTree.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTree.java @@ -29,48 +29,48 @@ import java.util.Map; */ public class TypeTree { - private Map<Class<?>, TypeTreeNode> typesUsed = new HashMap<Class<?>, TypeTreeNode>(); - private TypeTreeNode rootNode; + private Map<Class<?>, TypeTreeNode> typesUsed = new HashMap<Class<?>, TypeTreeNode>(); + private TypeTreeNode rootNode; - /** - * Intent was to cache previously computed type trees. In practice it caused - * a bug, and it's not being used right now. TODO: enable type trees caching - * - * @param forClass - * @param node - */ - public void addUsedType(Class<?> forClass, TypeTreeNode node) { - typesUsed.put(forClass, node); - } + /** + * Intent was to cache previously computed type trees. In practice it caused + * a bug, and it's not being used right now. TODO: enable type trees caching + * + * @param forClass + * @param node + */ + public void addUsedType(Class<?> forClass, TypeTreeNode node) { + typesUsed.put(forClass, node); + } - /** - * Returns node for previously created tree, it's getter for nodes added by - * addUsedType method. Not in use right now. TODO: enable type trees caching - * - * @param forClass - * @return - */ - public TypeTreeNode getNodeForType(Class<?> forClass) { - return typesUsed.get(forClass); - } + /** + * Returns node for previously created tree, it's getter for nodes added by + * addUsedType method. Not in use right now. TODO: enable type trees caching + * + * @param forClass + * @return + */ + public TypeTreeNode getNodeForType(Class<?> forClass) { + return typesUsed.get(forClass); + } - /** - * Returns root node. - * - * @return root of type tree - */ - public TypeTreeNode getRootNode() { - return rootNode; - } + /** + * Returns root node. + * + * @return root of type tree + */ + public TypeTreeNode getRootNode() { + return rootNode; + } - /** - * Sets root of the type tree. - * - * @param rootNode - * root node. - */ - public void setRootNode(TypeTreeNode rootNode) { - this.rootNode = rootNode; - } + /** + * Sets root of the type tree. + * + * @param rootNode + * root node. + */ + public void setRootNode(TypeTreeNode rootNode) { + this.rootNode = rootNode; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeCreator.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeCreator.java index 16ae0b502e..e0f60cc2bb 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeCreator.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeCreator.java @@ -38,335 +38,324 @@ import org.apache.tuscany.sca.binding.corba.impl.exceptions.RequestConfiguration */ public class TypeTreeCreator { - /** - * Helps to determine if type is a primitive. - */ - private static List<Class<?>> primitives = new ArrayList<Class<?>>(); + /** + * Helps to determine if type is a primitive. + */ + private static List<Class<?>> primitives = new ArrayList<Class<?>>(); - static { - primitives.add(boolean.class); - primitives.add(byte.class); - primitives.add(short.class); - primitives.add(int.class); - primitives.add(long.class); - primitives.add(double.class); - primitives.add(float.class); - primitives.add(char.class); - primitives.add(String.class); - primitives.add(Boolean.class); - primitives.add(Byte.class); - primitives.add(Short.class); - primitives.add(Integer.class); - primitives.add(Long.class); - primitives.add(Double.class); - primitives.add(Float.class); - primitives.add(Character.class); - } + static { + primitives.add(boolean.class); + primitives.add(byte.class); + primitives.add(short.class); + primitives.add(int.class); + primitives.add(long.class); + primitives.add(double.class); + primitives.add(float.class); + primitives.add(char.class); + primitives.add(String.class); + primitives.add(Boolean.class); + primitives.add(Byte.class); + primitives.add(Short.class); + primitives.add(Integer.class); + primitives.add(Long.class); + primitives.add(Double.class); + primitives.add(Float.class); + primitives.add(Character.class); + } - /** - * Creates class for given string argument. - * - * @param name - * name of type - * @return type - */ - private static Class<?> createClassFromString(String name) { - Class<?> result = null; - try { - if (name.length() == 1) { - // primitives - switch (name.charAt(0)) { - case 'Z': - result = boolean.class; - break; - case 'C': - result = char.class; - break; - case 'B': - result = byte.class; - break; - case 'S': - result = short.class; - break; - case 'I': - result = int.class; - break; - case 'J': - result = long.class; - break; - case 'F': - result = float.class; - break; - case 'D': - result = double.class; - break; - } - } else { - // class - name = name.substring(1, name.length() - 1); - result = Class.forName(name); - } - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } + /** + * Creates class for given string argument. + * + * @param name + * name of type + * @return type + */ + private static Class<?> createClassFromString(String name) { + Class<?> result = null; + try { + if (name.length() == 1) { + // primitives + switch (name.charAt(0)) { + case 'Z': + result = boolean.class; + break; + case 'C': + result = char.class; + break; + case 'B': + result = byte.class; + break; + case 'S': + result = short.class; + break; + case 'I': + result = int.class; + break; + case 'J': + result = long.class; + break; + case 'F': + result = float.class; + break; + case 'D': + result = double.class; + break; + } + } else { + // class + name = name.substring(1, name.length() - 1); + result = Class.forName(name); + } + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } - /** - * Reduces dimension of array. - * - * @param forClass - * array class - * @return reduced array - */ - private static Class<?> reduceArrayDimension(Class<?> forClass) { - String name = forClass.getName(); - try { - String reduced = name.substring(1, name.length()); - if (reduced.startsWith("[")) { - // reduced class is still an array - return Class.forName(reduced); - } else { - // reduced class may be primitive or class - return createClassFromString(reduced); - } - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } - return null; - } + /** + * Reduces dimension of array. + * + * @param forClass + * array class + * @return reduced array + */ + private static Class<?> reduceArrayDimension(Class<?> forClass) { + String name = forClass.getName(); + try { + String reduced = name.substring(1, name.length()); + if (reduced.startsWith("[")) { + // reduced class is still an array + return Class.forName(reduced); + } else { + // reduced class may be primitive or class + return createClassFromString(reduced); + } + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } + return null; + } - /** - * Creates tree for given type. - * - * @param forClass - * @return type tree - */ - public static TypeTree createTypeTree(Class<?> forClass) - throws RequestConfigurationException { - TypeTree tree = new TypeTree(); - TypeTreeNode rootNode = null; - rootNode = inspectClassHierarchy(forClass, tree); - tree.setRootNode(rootNode); - return tree; + /** + * Creates tree for given type. + * + * @param forClass + * @return type tree + */ + public static TypeTree createTypeTree(Class<?> forClass) throws RequestConfigurationException { + TypeTree tree = new TypeTree(); + TypeTreeNode rootNode = null; + rootNode = inspectClassHierarchy(forClass, tree); + tree.setRootNode(rootNode); + return tree; - } + } - /** - * Recurrent method which builds type tree. - * - * @param forClass - * @param tree - * @return - */ - private static TypeTreeNode inspectClassHierarchy(Class<?> forClass, - TypeTree tree) throws RequestConfigurationException { - // //remains of type tree caching - // TypeTreeNode existingNode = tree.getNodeForType(forClass); - // if (existingNode != null) { - // return existingNode; - // } + /** + * Recurrent method which builds type tree. + * + * @param forClass + * @param tree + * @return + */ + private static TypeTreeNode inspectClassHierarchy(Class<?> forClass, TypeTree tree) + throws RequestConfigurationException { + // //remains of type tree caching + // TypeTreeNode existingNode = tree.getNodeForType(forClass); + // if (existingNode != null) { + // return existingNode; + // } - TypeTreeNode node = createTypeNode(forClass); - NodeType nodeType = node.getNodeType(); - TypeTreeNode[] children = null; + TypeTreeNode node = createTypeNode(forClass); + NodeType nodeType = node.getNodeType(); + TypeTreeNode[] children = null; - // //remains of type tree caching - // tree.addUsedType(forClass, node); + // //remains of type tree caching + // tree.addUsedType(forClass, node); - if (nodeType.equals(NodeType.primitive)) { - // stop condition for recurrent method - } else if (nodeType.equals(NodeType.array)) { - // similar to sequence, but with fixed array length - // TODO: determine how array length will be declared - } else if (nodeType.equals(NodeType.sequence)) { - // reducing sequence dimension - Class<?> reduced = reduceArrayDimension(node.getJavaClass()); - children = new TypeTreeNode[1]; - children[0] = inspectClassHierarchy(reduced, tree); - } else if (nodeType.equals(NodeType.struct) - || nodeType.equals(NodeType.exception)) { - // inspect types for every structure member - Field[] fields = node.getJavaClass().getFields(); - children = new TypeTreeNode[fields.length]; - for (int i = 0; i < fields.length; i++) { - Class<?> field = fields[i].getType(); - TypeTreeNode child = inspectClassHierarchy(field, tree); - child.setName(fields[i].getName()); - children[i] = child; - } - } else if (nodeType.equals(NodeType.idl_enum)) { + if (nodeType.equals(NodeType.primitive)) { + // stop condition for recurrent method + } else if (nodeType.equals(NodeType.array)) { + // similar to sequence, but with fixed array length + // TODO: determine how array length will be declared + } else if (nodeType.equals(NodeType.sequence)) { + // reducing sequence dimension + Class<?> reduced = reduceArrayDimension(node.getJavaClass()); + children = new TypeTreeNode[1]; + children[0] = inspectClassHierarchy(reduced, tree); + } else if (nodeType.equals(NodeType.struct) || nodeType.equals(NodeType.exception)) { + // inspect types for every structure member + Field[] fields = node.getJavaClass().getFields(); + children = new TypeTreeNode[fields.length]; + for (int i = 0; i < fields.length; i++) { + Class<?> field = fields[i].getType(); + TypeTreeNode child = inspectClassHierarchy(field, tree); + child.setName(fields[i].getName()); + children[i] = child; + } + } else if (nodeType.equals(NodeType.idl_enum)) { - } else if (nodeType.equals(NodeType.union)) { - // TODO: unions - } else if (nodeType.equals(NodeType.reference)) { - // TODO: CORBA references - } + } else if (nodeType.equals(NodeType.union)) { + // TODO: unions + } else if (nodeType.equals(NodeType.reference)) { + // TODO: CORBA references + } - node.setChildren(children); - return node; - } + node.setChildren(children); + return node; + } - /** - * Creating and configuring TypeTreeNode for given class. - * - * @param forClass - * class - * @return node - * @throws RequestConfigurationException - */ - private static TypeTreeNode createTypeNode(Class<?> forClass) - throws RequestConfigurationException { - TypeTreeNode node = new TypeTreeNode(); - if (forClass.isArray()) { - node.setNodeType(NodeType.sequence); - node.setJavaClass(forClass); - } else if (primitives.contains(forClass)) { - node.setNodeType(NodeType.primitive); - node.setJavaClass(forClass); - node.setChildren(null); - } else if (forClass.isInterface()) { - node.setNodeType(NodeType.reference); - node.setJavaClass(forClass); - node.setChildren(null); - } else if (isStructType(forClass)) { - node.setNodeType(NodeType.struct); - node.setJavaClass(forClass); - } else if (isEnumType(forClass)) { - node.setNodeType(NodeType.idl_enum); - node.setJavaClass(forClass); - } else if (isUserException(forClass)) { - node.setNodeType(NodeType.exception); - node.setJavaClass(forClass); - } else { - RequestConfigurationException e = new RequestConfigurationException( - "User defined type which cannot be handled: " - + forClass.getCanonicalName()); - throw e; - } - return node; - } + /** + * Creating and configuring TypeTreeNode for given class. + * + * @param forClass + * class + * @return node + * @throws RequestConfigurationException + */ + private static TypeTreeNode createTypeNode(Class<?> forClass) throws RequestConfigurationException { + TypeTreeNode node = new TypeTreeNode(); + if (forClass.isArray()) { + node.setNodeType(NodeType.sequence); + node.setJavaClass(forClass); + } else if (primitives.contains(forClass)) { + node.setNodeType(NodeType.primitive); + node.setJavaClass(forClass); + node.setChildren(null); + } else if (forClass.isInterface()) { + node.setNodeType(NodeType.reference); + node.setJavaClass(forClass); + node.setChildren(null); + } else if (isStructType(forClass)) { + node.setNodeType(NodeType.struct); + node.setJavaClass(forClass); + } else if (isEnumType(forClass)) { + node.setNodeType(NodeType.idl_enum); + node.setJavaClass(forClass); + } else if (isUserException(forClass)) { + node.setNodeType(NodeType.exception); + node.setJavaClass(forClass); + } else { + RequestConfigurationException e = + new RequestConfigurationException("User defined type which cannot be handled: " + forClass + .getCanonicalName()); + throw e; + } + return node; + } - /** - * Tells whether given class is structure - * - * @param forClass - * @return - */ - private static boolean isStructType(Class<?> forClass) { - int classMods = forClass.getModifiers(); - if (!Modifier.isFinal(classMods)) { - return false; - } - boolean areCtorsValid = false; - Class<?>[] fieldsTypes = null; - Constructor<?>[] ctors = forClass.getConstructors(); - /* - * Do we have 2 ctors and one of them is null ctor? - */ - if (ctors.length != 2) { - return false; - } - for (int i = 0; i < ctors.length; i++) { - Class<?>[] params = ctors[i].getParameterTypes(); - if (params.length == 0) { - areCtorsValid = true; - } else { - fieldsTypes = params; - } - } - if (!areCtorsValid) { - return false; - } - /* - * Are constructor args declared as class fields? - */ - Field[] fields = forClass.getFields(); - Set<Class<?>> fieldsSet = new HashSet<Class<?>>(Arrays - .asList(fieldsTypes)); - for (int i = 0; i < fields.length && !fieldsSet.isEmpty(); i++) { - int mods = fields[i].getModifiers(); - if (Modifier.isPublic(mods) && !Modifier.isStatic(mods) - && !Modifier.isFinal(mods)) { - fieldsSet.remove(fields[i].getType()); - } + /** + * Tells whether given class is structure + * + * @param forClass + * @return + */ + private static boolean isStructType(Class<?> forClass) { + int classMods = forClass.getModifiers(); + if (!Modifier.isFinal(classMods)) { + return false; + } + boolean areCtorsValid = false; + Class<?>[] fieldsTypes = null; + Constructor<?>[] ctors = forClass.getConstructors(); + /* + * Do we have 2 ctors and one of them is null ctor? + */ + if (ctors.length != 2) { + return false; + } + for (int i = 0; i < ctors.length; i++) { + Class<?>[] params = ctors[i].getParameterTypes(); + if (params.length == 0) { + areCtorsValid = true; + } else { + fieldsTypes = params; + } + } + if (!areCtorsValid) { + return false; + } + /* + * Are constructor args declared as class fields? + */ + Field[] fields = forClass.getFields(); + Set<Class<?>> fieldsSet = new HashSet<Class<?>>(Arrays.asList(fieldsTypes)); + for (int i = 0; i < fields.length && !fieldsSet.isEmpty(); i++) { + int mods = fields[i].getModifiers(); + if (Modifier.isPublic(mods) && !Modifier.isStatic(mods) && !Modifier.isFinal(mods)) { + fieldsSet.remove(fields[i].getType()); + } - } - return fieldsSet.isEmpty(); - } + } + return fieldsSet.isEmpty(); + } - /** - * Tells whether given class is enum - * - * @param forClass - * @return - */ - private static boolean isEnumType(Class<?> forClass) { - boolean isValueMethod = false; - boolean isFromIntMethod = false; - /* - * enum type should have value and from_int methods - */ - try { - Method valueMet = forClass.getMethod("value", new Class[] {}); - int modValueMet = valueMet.getModifiers(); - if (valueMet.getReturnType().equals(int.class) - && Modifier.isPublic(modValueMet)) { - isValueMethod = true; - } - Method fromIntMet = forClass.getMethod("from_int", - new Class[] { int.class }); - int modFromIntMet = fromIntMet.getModifiers(); - if ((fromIntMet.getReturnType().equals(forClass) - && Modifier.isPublic(modFromIntMet) && Modifier - .isStatic(modFromIntMet))) { - isFromIntMethod = true; - } - } catch (NoSuchMethodException e) { - } - if (!isFromIntMethod && !isValueMethod) { - return false; - } - /* - * enum type should also contain minimum one pair of fields: EnumType - * field and int _field - */ - int enumCount = 0; - Field[] fields = forClass.getFields(); - for (int i = 0; i < fields.length; i++) { - if (fields[i].getType().equals(forClass)) { - int modifiers = fields[i].getModifiers(); - if (Modifier.isStatic(modifiers) - && Modifier.isPublic(modifiers) - && Modifier.isFinal(modifiers)) { - try { - Field field = forClass.getField("_" - + fields[i].getName()); - if (field.getType().equals(int.class)) { - enumCount++; - } - } catch (NoSuchFieldException e) { - } + /** + * Tells whether given class is enum + * + * @param forClass + * @return + */ + private static boolean isEnumType(Class<?> forClass) { + boolean isValueMethod = false; + boolean isFromIntMethod = false; + /* + * enum type should have value and from_int methods + */ + try { + Method valueMet = forClass.getMethod("value", new Class[] {}); + int modValueMet = valueMet.getModifiers(); + if (valueMet.getReturnType().equals(int.class) && Modifier.isPublic(modValueMet)) { + isValueMethod = true; + } + Method fromIntMet = forClass.getMethod("from_int", new Class[] {int.class}); + int modFromIntMet = fromIntMet.getModifiers(); + if ((fromIntMet.getReturnType().equals(forClass) && Modifier.isPublic(modFromIntMet) && Modifier + .isStatic(modFromIntMet))) { + isFromIntMethod = true; + } + } catch (NoSuchMethodException e) { + } + if (!isFromIntMethod && !isValueMethod) { + return false; + } + /* + * enum type should also contain minimum one pair of fields: EnumType + * field and int _field + */ + int enumCount = 0; + Field[] fields = forClass.getFields(); + for (int i = 0; i < fields.length; i++) { + if (fields[i].getType().equals(forClass)) { + int modifiers = fields[i].getModifiers(); + if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers) && Modifier.isFinal(modifiers)) { + try { + Field field = forClass.getField("_" + fields[i].getName()); + if (field.getType().equals(int.class)) { + enumCount++; + } + } catch (NoSuchFieldException e) { + } - } - } - } - return enumCount > 0; - } + } + } + } + return enumCount > 0; + } - /** - * Tells whether given class is corba user exception - * @param forClass - * @return - */ - private static boolean isUserException(Class<?> forClass) { - do { - if (forClass.equals(Exception.class)) { - return true; - } else { - forClass = forClass.getSuperclass(); - } - } while (forClass != null && !forClass.equals(Object.class)); - return false; - } + /** + * Tells whether given class is corba user exception + * @param forClass + * @return + */ + private static boolean isUserException(Class<?> forClass) { + do { + if (forClass.equals(Exception.class)) { + return true; + } else { + forClass = forClass.getSuperclass(); + } + } while (forClass != null && !forClass.equals(Object.class)); + return false; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeNode.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeNode.java index 457cf089d0..a54fabedf1 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeNode.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/TypeTreeNode.java @@ -26,41 +26,41 @@ package org.apache.tuscany.sca.binding.corba.impl.types; */ public class TypeTreeNode { - private NodeType nodeType; - private TypeTreeNode[] children; - private Class<?> javaClass; - private String name; + private NodeType nodeType; + private TypeTreeNode[] children; + private Class<?> javaClass; + private String name; - public String getName() { - return name; - } + public String getName() { + return name; + } - public void setName(String name) { - this.name = name; - } + public void setName(String name) { + this.name = name; + } - public NodeType getNodeType() { - return nodeType; - } + public NodeType getNodeType() { + return nodeType; + } - public void setNodeType(NodeType nodeType) { - this.nodeType = nodeType; - } + public void setNodeType(NodeType nodeType) { + this.nodeType = nodeType; + } - public TypeTreeNode[] getChildren() { - return children; - } + public TypeTreeNode[] getChildren() { + return children; + } - public void setChildren(TypeTreeNode[] children) { - this.children = children; - } + public void setChildren(TypeTreeNode[] children) { + this.children = children; + } - public Class<?> getJavaClass() { - return javaClass; - } + public Class<?> getJavaClass() { + return javaClass; + } - public void setJavaClass(Class<?> javaClass) { - this.javaClass = javaClass; - } + public void setJavaClass(Class<?> javaClass) { + this.javaClass = javaClass; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ArrayTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ArrayTypeHelper.java index 490535758d..065ce2c092 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ArrayTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ArrayTypeHelper.java @@ -23,24 +23,25 @@ import org.apache.tuscany.sca.binding.corba.impl.types.TypeTreeNode; import org.omg.CORBA.TypeCode; import org.omg.CORBA.portable.InputStream; import org.omg.CORBA.portable.OutputStream; + /** * @version $Rev$ $Date$ */ public class ArrayTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - // TODO Auto-generated method stub - return null; - } + public TypeCode getType(TypeTreeNode node) { + // TODO Auto-generated method stub + return null; + } - public Object read(TypeTreeNode node, InputStream is) { - // TODO Auto-generated method stub - return null; - } + public Object read(TypeTreeNode node, InputStream is) { + // TODO Auto-generated method stub + return null; + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - // TODO Auto-generated method stub + public void write(TypeTreeNode node, OutputStream os, Object data) { + // TODO Auto-generated method stub - } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/BooleanTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/BooleanTypeHelper.java index 462738e372..c9eb70fc35 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/BooleanTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/BooleanTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class BooleanTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(8)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(8)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_boolean(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_boolean(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_boolean((Boolean) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_boolean((Boolean)data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ByteTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ByteTypeHelper.java index 23d845cd79..c97fd75707 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ByteTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ByteTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class ByteTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_octet(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_octet(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_octet((Byte) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_octet((Byte)data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/CharTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/CharTypeHelper.java index 2a48e6d781..9906a19a41 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/CharTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/CharTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class CharTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(9)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(9)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_char(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_char(); + } + + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_char((Character)data); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_char((Character) data); - } - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/DoubleTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/DoubleTypeHelper.java index 4e75a28f86..ce8026ab18 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/DoubleTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/DoubleTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class DoubleTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(7)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(7)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_double(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_double(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_double((Double) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_double((Double)data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java index 5cb68433a2..3d9e9df13a 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/EnumTypeHelper.java @@ -9,34 +9,33 @@ import org.omg.CORBA.portable.OutputStream; public class EnumTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - // TODO Auto-generated method stub - return null; - } + public TypeCode getType(TypeTreeNode node) { + // TODO Auto-generated method stub + return null; + } - public Object read(TypeTreeNode node, InputStream is) { - int value = is.read_long(); - Object result = null; - try { - Method method = node.getJavaClass().getMethod("from_int", - new Class[] { int.class }); - result = method.invoke(null, new Object[] { value }); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return result; - } + public Object read(TypeTreeNode node, InputStream is) { + int value = is.read_long(); + Object result = null; + try { + Method method = node.getJavaClass().getMethod("from_int", new Class[] {int.class}); + result = method.invoke(null, new Object[] {value}); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return result; + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - int value = 0; - try { - Method method = data.getClass().getMethod("value", new Class[] {}); - value = (Integer) method.invoke(data, new Object[] {}); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - os.write_long(value); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + int value = 0; + try { + Method method = data.getClass().getMethod("value", new Class[] {}); + value = (Integer)method.invoke(data, new Object[] {}); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + os.write_long(value); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/FloatTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/FloatTypeHelper.java index a038019a45..ed00ce4bd4 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/FloatTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/FloatTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class FloatTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(6)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_float(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_float(); + } + + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_float((Float)data); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_float((Float) data); - } - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/IntTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/IntTypeHelper.java index 921e732d62..7f8271cb15 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/IntTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/IntTypeHelper.java @@ -30,16 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class IntTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_long(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_long(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_long((Integer) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_long((Integer)data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/LongTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/LongTypeHelper.java index 37129a64a3..c6ce0c5cf6 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/LongTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/LongTypeHelper.java @@ -30,17 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class LongTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(23)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(23)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_longlong(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_longlong(); + } + + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_longlong((Long)data); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_longlong((Long) data); - } - - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ReferenceTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ReferenceTypeHelper.java index 01d5fe7edf..70f91fe763 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ReferenceTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ReferenceTypeHelper.java @@ -31,18 +31,18 @@ import org.omg.CORBA.portable.OutputStream; */ public class ReferenceTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - // TODO Auto-generated method stub - return null; - } + public TypeCode getType(TypeTreeNode node) { + // TODO Auto-generated method stub + return null; + } - public java.lang.Object read(TypeTreeNode node, InputStream is) { - Object reference = is.read_Object(); - return (java.lang.Object) InterfaceInstanceCreator.createInstance(reference, node.getJavaClass()); - } + public java.lang.Object read(TypeTreeNode node, InputStream is) { + Object reference = is.read_Object(); + return (java.lang.Object)InterfaceInstanceCreator.createInstance(reference, node.getJavaClass()); + } - public void write(TypeTreeNode node, OutputStream os, java.lang.Object data) { - os.write_Object((Object) data); - } + public void write(TypeTreeNode node, OutputStream os, java.lang.Object data) { + os.write_Object((Object)data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/SequenceTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/SequenceTypeHelper.java index f1a379d595..86f2577ba5 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/SequenceTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/SequenceTypeHelper.java @@ -34,50 +34,49 @@ import org.omg.CORBA.portable.OutputStream; */ public class SequenceTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - TypeCode typeCode = - org.omg.CORBA.ORB.init().create_alias_tc( - node.getJavaClass().getSimpleName(), - node.getJavaClass().getSimpleName(), - org.omg.CORBA.ORB.init().create_sequence_tc(0, - TypeHelpersProxy.getType(node.getChildren()[0]))); - return typeCode; - } + public TypeCode getType(TypeTreeNode node) { + TypeCode typeCode = + org.omg.CORBA.ORB.init().create_alias_tc(node.getJavaClass().getSimpleName(), + node.getJavaClass().getSimpleName(), + org.omg.CORBA.ORB.init() + .create_sequence_tc(0, + TypeHelpersProxy.getType(node + .getChildren()[0]))); + return typeCode; + } - public Object read(TypeTreeNode node, InputStream is) { - Object sequence = null; - try { - int size = is.read_long(); - sequence = Array.newInstance(node.getChildren()[0].getJavaClass(), - size); - for (int i = 0; i < size; i++) { - Array.set(sequence, i, TypeHelpersProxy.read( - node.getChildren()[0], is)); - } - } catch (Exception e) { - e.printStackTrace(); - } - return sequence; - } + public Object read(TypeTreeNode node, InputStream is) { + Object sequence = null; + try { + int size = is.read_long(); + sequence = Array.newInstance(node.getChildren()[0].getJavaClass(), size); + for (int i = 0; i < size; i++) { + Array.set(sequence, i, TypeHelpersProxy.read(node.getChildren()[0], is)); + } + } catch (Exception e) { + e.printStackTrace(); + } + return sequence; + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - int sum = 0; - // determine length of array - List<Object> array = new ArrayList<Object>(); - while (true) { - try { - array.add(Array.get(data, sum)); - sum++; - } catch (ArrayIndexOutOfBoundsException e) { - break; - } - } - os.write_long(sum); - Iterator<Object> iter = array.iterator(); - while (iter.hasNext()) { - Object elem = iter.next(); - TypeHelpersProxy.write(node.getChildren()[0], os, elem); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + int sum = 0; + // determine length of array + List<Object> array = new ArrayList<Object>(); + while (true) { + try { + array.add(Array.get(data, sum)); + sum++; + } catch (ArrayIndexOutOfBoundsException e) { + break; + } + } + os.write_long(sum); + Iterator<Object> iter = array.iterator(); + while (iter.hasNext()) { + Object elem = iter.next(); + TypeHelpersProxy.write(node.getChildren()[0], os, elem); + } - } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ShortTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ShortTypeHelper.java index 07801bf227..fe6b2cfe9d 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ShortTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/ShortTypeHelper.java @@ -30,17 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class ShortTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(2)); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(2)); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_short(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_short(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_short((Short) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_short((Short)data); + } - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StringTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StringTypeHelper.java index 1132f6995a..934ffe51c9 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StringTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StringTypeHelper.java @@ -30,17 +30,16 @@ import org.omg.CORBA.portable.OutputStream; */ public class StringTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - return ORB.init().create_string_tc(0); - } + public TypeCode getType(TypeTreeNode node) { + return ORB.init().create_string_tc(0); + } - public Object read(TypeTreeNode node, InputStream is) { - return is.read_string(); - } + public Object read(TypeTreeNode node, InputStream is) { + return is.read_string(); + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - os.write_string((String) data); - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + os.write_string((String)data); + } - } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StructTypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StructTypeHelper.java index 6e06a23893..1becd46296 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StructTypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/StructTypeHelper.java @@ -32,59 +32,57 @@ import org.omg.CORBA.portable.OutputStream; */ public class StructTypeHelper implements TypeHelper { - public TypeCode getType(TypeTreeNode node) { - TypeTreeNode[] children = node.getChildren(); - if (children != null) { - StructMember[] members = new StructMember[children.length]; - for (int i = 0; i < children.length; i++) { - members[i] = new StructMember(children[i].getJavaClass() - .getSimpleName(), - TypeHelpersProxy.getType(children[i]), null); - } - TypeCode result = org.omg.CORBA.ORB.init().create_struct_tc( - node.getJavaClass().getSimpleName(), - node.getJavaClass().getSimpleName(), members); - return result; - } else { - return null; - } - } + public TypeCode getType(TypeTreeNode node) { + TypeTreeNode[] children = node.getChildren(); + if (children != null) { + StructMember[] members = new StructMember[children.length]; + for (int i = 0; i < children.length; i++) { + members[i] = + new StructMember(children[i].getJavaClass().getSimpleName(), TypeHelpersProxy.getType(children[i]), + null); + } + TypeCode result = + org.omg.CORBA.ORB.init().create_struct_tc(node.getJavaClass().getSimpleName(), + node.getJavaClass().getSimpleName(), + members); + return result; + } else { + return null; + } + } - public Object read(TypeTreeNode node, InputStream is) { - TypeTreeNode[] children = node.getChildren(); - Object result = null; - if (children != null) { - try { - result = node.getJavaClass().newInstance(); - for (int i = 0; i < children.length; i++) { - Object childResult = TypeHelpersProxy.read(children[i], is); - Field childField = result.getClass().getField( - children[i].getName()); - childField.set(result, childResult); - } - } catch (Exception e) { - // TODO: handle exception - e.printStackTrace(); - } - } - return result; - } + public Object read(TypeTreeNode node, InputStream is) { + TypeTreeNode[] children = node.getChildren(); + Object result = null; + if (children != null) { + try { + result = node.getJavaClass().newInstance(); + for (int i = 0; i < children.length; i++) { + Object childResult = TypeHelpersProxy.read(children[i], is); + Field childField = result.getClass().getField(children[i].getName()); + childField.set(result, childResult); + } + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + } + } + return result; + } - public void write(TypeTreeNode node, OutputStream os, Object data) { - TypeTreeNode[] children = node.getChildren(); - if (children != null) { - try { - for (int i = 0; i < children.length; i++) { - Field childField = node.getJavaClass().getField( - children[i].getName()); - TypeHelpersProxy.write(children[i], os, childField - .get(data)); - } - } catch (Exception e) { - // TODO: handle exception - e.printStackTrace(); - } - } - } + public void write(TypeTreeNode node, OutputStream os, Object data) { + TypeTreeNode[] children = node.getChildren(); + if (children != null) { + try { + for (int i = 0; i < children.length; i++) { + Field childField = node.getJavaClass().getField(children[i].getName()); + TypeHelpersProxy.write(children[i], os, childField.get(data)); + } + } catch (Exception e) { + // TODO: handle exception + e.printStackTrace(); + } + } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelper.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelper.java index dc81562749..a948b62610 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelper.java @@ -28,28 +28,28 @@ import org.omg.CORBA.portable.OutputStream; * @version $Rev$ $Date$ */ public interface TypeHelper { - - /** - * Gets type definition for CORBA API. - * @param node - * @return - */ - TypeCode getType(TypeTreeNode node); - - /** - * Reads CORBA object - * @param node - * @param is - * @return - */ - Object read(TypeTreeNode node, InputStream is); - - /** - * Writes CORBA object - * @param node - * @param os - * @param data - */ - void write(TypeTreeNode node, OutputStream os, Object data); - + + /** + * Gets type definition for CORBA API. + * @param node + * @return + */ + TypeCode getType(TypeTreeNode node); + + /** + * Reads CORBA object + * @param node + * @param is + * @return + */ + Object read(TypeTreeNode node, InputStream is); + + /** + * Writes CORBA object + * @param node + * @param os + * @param data + */ + void write(TypeTreeNode node, OutputStream os, Object data); + } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelpersProxy.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelpersProxy.java index 77dff7bab9..c8be7a299f 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelpersProxy.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/TypeHelpersProxy.java @@ -34,101 +34,100 @@ import org.omg.CORBA.portable.OutputStream; */ public class TypeHelpersProxy { - /** - * Maps primitive types to its TypeHelper implementations - */ - private static Map<Class<?>, TypeHelper> primitiveTypes = null; + /** + * Maps primitive types to its TypeHelper implementations + */ + private static Map<Class<?>, TypeHelper> primitiveTypes = null; - /** - * Maps other types to its TypeHelper implementations - */ - private static Map<NodeType, TypeHelper> complexTypes = null; + /** + * Maps other types to its TypeHelper implementations + */ + private static Map<NodeType, TypeHelper> complexTypes = null; - static { - // initiate type helpers - primitiveTypes = new HashMap<Class<?>, TypeHelper>(); - complexTypes = new HashMap<NodeType, TypeHelper>(); + static { + // initiate type helpers + primitiveTypes = new HashMap<Class<?>, TypeHelper>(); + complexTypes = new HashMap<NodeType, TypeHelper>(); - primitiveTypes.put(boolean.class, new BooleanTypeHelper()); - primitiveTypes.put(char.class, new CharTypeHelper()); - primitiveTypes.put(byte.class, new ByteTypeHelper()); - primitiveTypes.put(short.class, new ShortTypeHelper()); - primitiveTypes.put(int.class, new IntTypeHelper()); - primitiveTypes.put(long.class, new LongTypeHelper()); - primitiveTypes.put(float.class, new FloatTypeHelper()); - primitiveTypes.put(double.class, new DoubleTypeHelper()); - primitiveTypes.put(String.class, new StringTypeHelper()); - primitiveTypes.put(Boolean.class, primitiveTypes.get(boolean.class)); - primitiveTypes.put(Character.class, primitiveTypes.get(char.class)); - primitiveTypes.put(Byte.class, primitiveTypes.get(byte.class)); - primitiveTypes.put(Short.class, primitiveTypes.get(short.class)); - primitiveTypes.put(Integer.class, primitiveTypes.get(int.class)); - primitiveTypes.put(Long.class, primitiveTypes.get(long.class)); - primitiveTypes.put(Float.class, primitiveTypes.get(float.class)); - primitiveTypes.put(Double.class, primitiveTypes.get(double.class)); - primitiveTypes.put(String.class, primitiveTypes.get(String.class)); - complexTypes.put(NodeType.array, new ArrayTypeHelper()); - complexTypes.put(NodeType.struct, new StructTypeHelper()); - complexTypes.put(NodeType.reference, new ReferenceTypeHelper()); - complexTypes.put(NodeType.sequence, new SequenceTypeHelper()); - complexTypes.put(NodeType.idl_enum, new EnumTypeHelper()); - complexTypes.put(NodeType.exception, new StructTypeHelper()); - } + primitiveTypes.put(boolean.class, new BooleanTypeHelper()); + primitiveTypes.put(char.class, new CharTypeHelper()); + primitiveTypes.put(byte.class, new ByteTypeHelper()); + primitiveTypes.put(short.class, new ShortTypeHelper()); + primitiveTypes.put(int.class, new IntTypeHelper()); + primitiveTypes.put(long.class, new LongTypeHelper()); + primitiveTypes.put(float.class, new FloatTypeHelper()); + primitiveTypes.put(double.class, new DoubleTypeHelper()); + primitiveTypes.put(String.class, new StringTypeHelper()); + primitiveTypes.put(Boolean.class, primitiveTypes.get(boolean.class)); + primitiveTypes.put(Character.class, primitiveTypes.get(char.class)); + primitiveTypes.put(Byte.class, primitiveTypes.get(byte.class)); + primitiveTypes.put(Short.class, primitiveTypes.get(short.class)); + primitiveTypes.put(Integer.class, primitiveTypes.get(int.class)); + primitiveTypes.put(Long.class, primitiveTypes.get(long.class)); + primitiveTypes.put(Float.class, primitiveTypes.get(float.class)); + primitiveTypes.put(Double.class, primitiveTypes.get(double.class)); + primitiveTypes.put(String.class, primitiveTypes.get(String.class)); + complexTypes.put(NodeType.array, new ArrayTypeHelper()); + complexTypes.put(NodeType.struct, new StructTypeHelper()); + complexTypes.put(NodeType.reference, new ReferenceTypeHelper()); + complexTypes.put(NodeType.sequence, new SequenceTypeHelper()); + complexTypes.put(NodeType.idl_enum, new EnumTypeHelper()); + complexTypes.put(NodeType.exception, new StructTypeHelper()); + } - /** - * Gets type helper basing on given type - * - * @param node - * @return - */ - private static TypeHelper getTypeHelper(TypeTreeNode node) { - TypeHelper typeHelper = null; - NodeType type = node.getNodeType(); - if (type.equals(NodeType.primitive)) { - typeHelper = primitiveTypes.get(node.getJavaClass()); - } else { - typeHelper = complexTypes.get(type); - } - return typeHelper; - } + /** + * Gets type helper basing on given type + * + * @param node + * @return + */ + private static TypeHelper getTypeHelper(TypeTreeNode node) { + TypeHelper typeHelper = null; + NodeType type = node.getNodeType(); + if (type.equals(NodeType.primitive)) { + typeHelper = primitiveTypes.get(node.getJavaClass()); + } else { + typeHelper = complexTypes.get(type); + } + return typeHelper; + } - /** - * Proxies getType method invocation to appropriate TypeHelper - * implementation. It's not being used since I've changed method for passing - * arguments. May be useful while implementing CORBA service bindings. - * - * @param node - * @return - */ - public static final TypeCode getType(TypeTreeNode node) { - TypeHelper typeHelper = getTypeHelper(node); - TypeCode typeCode = typeHelper.getType(node); - return typeCode; - } + /** + * Proxies getType method invocation to appropriate TypeHelper + * implementation. It's not being used since I've changed method for passing + * arguments. May be useful while implementing CORBA service bindings. + * + * @param node + * @return + */ + public static final TypeCode getType(TypeTreeNode node) { + TypeHelper typeHelper = getTypeHelper(node); + TypeCode typeCode = typeHelper.getType(node); + return typeCode; + } - /** - * Proxies read method invocation to appropriate TypeHelper implementation. - * - * @param node - * @param is - * @return - */ - public static final Object read(TypeTreeNode node, InputStream is) { - TypeHelper helper = getTypeHelper(node); - return helper.read(node, is); - } + /** + * Proxies read method invocation to appropriate TypeHelper implementation. + * + * @param node + * @param is + * @return + */ + public static final Object read(TypeTreeNode node, InputStream is) { + TypeHelper helper = getTypeHelper(node); + return helper.read(node, is); + } - /** - * Proxies write method invocation to appropriate TypeHelper implementation. - * - * @param node - * @param os - * @param data - */ - public static final void write(TypeTreeNode node, OutputStream os, - Object data) { - TypeHelper helper = getTypeHelper(node); - helper.write(node, os, data); - } + /** + * Proxies write method invocation to appropriate TypeHelper implementation. + * + * @param node + * @param os + * @param data + */ + public static final void write(TypeTreeNode node, OutputStream os, Object data) { + TypeHelper helper = getTypeHelper(node); + helper.write(node, os, data); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/Utils.java b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/Utils.java index e4b1efe41d..b9d07db61c 100644 --- a/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/Utils.java +++ b/java/sca/modules/binding-corba-runtime/src/main/java/org/apache/tuscany/sca/binding/corba/impl/types/util/Utils.java @@ -21,20 +21,19 @@ package org.apache.tuscany.sca.binding.corba.impl.types.util; public class Utils { - /** - * Creates CORBA id for Java class - * @param forClass - * @return - */ - public static String getExceptionId(Class<?> forClass) { - String result = forClass.getName().replace('.', '/'); - result = result.replaceAll("Package", ""); - if (result.endsWith("Exception")) { - result = result - .substring(0, result.length() - "Exception".length()); - } - result = "IDL:" + result + ":1.0"; - return result; - } - + /** + * Creates CORBA id for Java class + * @param forClass + * @return + */ + public static String getExceptionId(Class<?> forClass) { + String result = forClass.getName().replace('.', '/'); + result = result.replaceAll("Package", ""); + if (result.endsWith("Exception")) { + result = result.substring(0, result.length() - "Exception".length()); + } + result = "IDL:" + result + ":1.0"; + return result; + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaServantTestCase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaServantTestCase.java index b3b3474636..dfbaa329a1 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaServantTestCase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaServantTestCase.java @@ -63,428 +63,403 @@ import org.omg.CosNaming.NamingContextHelper; public class CorbaServantTestCase extends TestCase { - private Process process; - private ORB orb; - - /** - * Spawns tnamserv an initiates ORB - */ - public void setUp() throws IOException { - String[] args = { "-ORBInitialPort", - "" + TestConstants.ORB_INITIAL_PORT }; - process = Runtime.getRuntime().exec( - "tnameserv " + args[0] + " " + args[1]); - try { - // let the tnameserv have time to start - Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); - orb = ORB.init(args, null); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Kills tnameserv - */ - public void tearDown() { - try { - if (process != null) { - process.destroy(); - } - // let the tnameserv have time to die - Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Binds servant implementation to name - */ - private void bindServant(DynaCorbaServant servant, String name) { - try { - Object nameService = orb.resolve_initial_references("NameService"); - NamingContext namingContext = NamingContextHelper - .narrow(nameService); - - NameComponent nc = new NameComponent(name, ""); - NameComponent[] path = new NameComponent[] { nc }; - namingContext.rebind(path, servant); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Returns object reference which is binded to given name - * - * @param name - * @return - */ - private org.omg.CORBA.Object bindReference(String name) { - try { - org.omg.CORBA.Object objRef = orb - .resolve_initial_references("NameService"); - NamingContext ncRef = NamingContextHelper.narrow(objRef); - NameComponent nc = new NameComponent(name, ""); - NameComponent path[] = { nc }; - return ncRef.resolve(path); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - /** - * Tests primitives (arguments, return types) - */ - public void test_primitivesSetter() { - try { - PrimitivesSetter primitivesSetter = new PrimitivesSetterServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - primitivesSetter); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0" }; - servant.setIds(ids); - bindServant(servant, "PrimitivesSetter"); - PrimitivesSetter psClient = PrimitivesSetterHelper - .narrow(bindReference("PrimitivesSetter")); - assertTrue(psClient.setBoolean(true) == true); - assertTrue(psClient.setChar('A') == 'A'); - assertTrue(psClient.setString("SomeTest").equals("SomeTest")); - assertTrue(psClient.setDouble(2d) == 2d); - assertTrue(psClient.setFloat(3f) == 3f); - assertTrue(psClient.setLong(1) == 1); - assertTrue(psClient.setLongLong(0L) == 0L); - assertTrue(psClient.setOctet((byte) 8) == (byte) 8); - assertTrue(psClient.setShort((short) 6) == (short) 6); - assertTrue(psClient.setUnsignedLong(9) == 9); - assertTrue(psClient.setUnsignedLongLong(11L) == 11L); - assertTrue(psClient.setUnsignedShort((short) 15) == (short) 15); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - /** - * Tests if array values are equal - */ - private boolean areArraysEqual(java.lang.Object arr1, - java.lang.Object arr2, int arrLen) { - try { - for (int i = 0; i < arrLen; i++) { - if (!Array.get(arr1, i).equals(Array.get(arr2, i))) { - return false; - } - } - return true; - } catch (Exception e) { - e.printStackTrace(); - } - return false; - } - - /** - * Tests arrays (arguments, return types) - */ - public void test_arraysSetter() { - try { - ArraysSetter arraysSetter = new ArraysSetterServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - arraysSetter); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0" }; - servant.setIds(ids); - java.lang.Object result = null; - bindServant(servant, "ArraysSetter"); - ArraysSetter asClient = ArraysSetterHelper - .narrow(bindReference("ArraysSetter")); - - boolean[] bArr = new boolean[] { true, false }; - result = (java.lang.Object) asClient.setBoolean(bArr); - assertTrue(areArraysEqual(bArr, result, bArr.length)); - - byte[] byArr = new byte[] { 1, 2 }; - result = (java.lang.Object) asClient.setOctet(byArr); - assertTrue(areArraysEqual(byArr, result, byArr.length)); - - short[] shArr = new short[] { 1, 2 }; - result = (java.lang.Object) asClient.setShort(shArr); - assertTrue(areArraysEqual(shArr, result, shArr.length)); - - int[] iArr = new int[] { 1, 2 }; - result = (java.lang.Object) asClient.setLong(iArr); - assertTrue(areArraysEqual(iArr, result, iArr.length)); - - long[] lArr = new long[] { 1, 2 }; - result = (java.lang.Object) asClient.setLongLong(lArr); - assertTrue(areArraysEqual(lArr, result, lArr.length)); - - String[] strArr = new String[] { "Some", "Test" }; - result = (java.lang.Object) asClient.setString(strArr); - assertTrue(areArraysEqual(strArr, result, strArr.length)); - - char[] chArr = new char[] { 'A', 'B' }; - result = (java.lang.Object) asClient.setChar(chArr); - assertTrue(areArraysEqual(chArr, result, chArr.length)); - - float[] flArr = new float[] { 1, 2 }; - result = (java.lang.Object) asClient.setFloat(flArr); - assertTrue(areArraysEqual(flArr, result, flArr.length)); - - double[] dbArr = new double[] { 1, 2 }; - result = (java.lang.Object) asClient.setDouble(dbArr); - assertTrue(areArraysEqual(dbArr, result, dbArr.length)); - - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - /** - * Tests structures (arguments, return types) - */ - public void test_TestObject_setStruct() { - try { - TestObject to = new TestObjectServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - to); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0" }; - servant.setIds(ids); - bindServant(servant, "TestObject"); - TestObject testObject = TestObjectHelper - .narrow(bindReference("TestObject")); - SomeStruct ss = new SomeStruct(); - SimpleStruct inner = new SimpleStruct(); - inner.field1 = TestConstants.STR_1; - inner.field2 = TestConstants.INT_1; - ss.innerStruct = inner; - ss.str = TestConstants.STR_2; - ss.str_list = TestConstants.STR_ARR_1; - ss.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; - ss.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; - SomeStruct result = testObject.setStruct(ss); - assertTrue(TestConstants.are2DimArraysEqual(result.twoDimSeq, - TestConstants.INT_ARRAY_2_DIM)); - assertTrue(TestConstants.are3DimArraysEqual(result.threeDimSeq, - TestConstants.INT_ARRAY_3_DIM)); - assertTrue(result.str.equals(ss.str)); - assertTrue(result.innerStruct.field1.equals(ss.innerStruct.field1)); - assertTrue(result.innerStruct.field2 == ss.innerStruct.field2); - assertTrue(areArraysEqual(result.str_list, ss.str_list, - ss.str_list.length)); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - /** - * Tests handling BAD_OPERATION system exception - */ - public void test_systemException_BAD_OPERATION() { - try { - TestObjectServant tos = new TestObjectServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - tos); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0" }; - servant.setIds(ids); - bindServant(servant, "TestObject"); - DynaCorbaRequest request = new DynaCorbaRequest( - bindReference("TestObject"), "methodThatSurelyDoesNotExist"); - request.invoke(); - } catch (Exception e) { - if (e instanceof CorbaException) { - assertTrue(true); - } else { - e.printStackTrace(); - } - } - - try { - InvalidTestObjectServant tos = new InvalidTestObjectServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - tos); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0" }; - servant.setIds(ids); - bindServant(servant, "InvalidTestObject"); - TestObject to = TestObjectHelper - .narrow(bindReference("InvalidTestObject")); - SomeStruct str = new SomeStruct(); - str.innerStruct = new SimpleStruct(); - str.innerStruct.field1 = "Whatever"; - str.str = "Whatever"; - str.str_list = new String[] {}; - str.threeDimSeq = new int[][][] {}; - str.twoDimSeq = new int[][] {}; - to.setStruct(str); - } catch (Exception e) { - if (e instanceof BAD_OPERATION) { - assertTrue(true); - } else { - e.printStackTrace(); - } - } - } - - /** - * Tests handling user exceptions - */ - public void test_userExceptions() { - try { - CalcServant calc = new CalcServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - calc); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = { "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0" }; - servant.setIds(ids); - bindServant(servant, "Calc"); - Calc calcClient = CalcHelper.narrow(bindReference("Calc")); - calcClient.div(1, 0); - fail(); - } catch (Exception e) { - if (e instanceof DivByZero) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - - try { - CalcServant calc = new CalcServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - calc); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = { "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0" }; - servant.setIds(ids); - bindServant(servant, "Calc"); - Calc calcClient = CalcHelper.narrow(bindReference("Calc")); - calcClient.divForSmallArgs(255, 255); - fail(); - } catch (Exception e) { - if (e instanceof NotSupported) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - } - - /** - * Tests enums (arguments, return types) - */ - public void test_enums() { - try { - EnumManagerServant ems = new EnumManagerServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - ems); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = { "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0" }; - servant.setIds(ids); - bindServant(servant, "Enum"); - EnumManager em = EnumManagerHelper.narrow(bindReference("Enum")); - Color color = Color.red; - assertTrue(em.getColor(color).value() == color.value()); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - public void test_nonCorbaServants() { - try { - NonCorbaServant ncs = new NonCorbaServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - ncs); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - bindServant(servant, "NonCorbaServant"); - // it's non corba servant so we don't have stubs to test them - DynaCorbaRequest request = new DynaCorbaRequest( - bindReference("NonCorbaServant"), "setString"); - request.addArgument(TestConstants.STR_1); - request.setOutputType(String.class); - DynaCorbaResponse response = request.invoke(); - assertTrue(response.getContent().equals(TestConstants.STR_1)); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - - try { - NonCorbaServant ncs = new NonCorbaServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - ncs); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - bindServant(servant, "NonCorbaServant"); - // it's non corba servant so we don't have stubs to test them - DynaCorbaRequest request = new DynaCorbaRequest( - bindReference("NonCorbaServant"), "throwException"); - request.addExceptionType(NonCorbaException.class); - request.invoke(); - fail(); - } catch (Exception e) { - if (e instanceof NonCorbaException) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - } - - /** - * Tests handling BAD_PARAM system exception - */ - public void test_systemException_BAD_PARAM() { - try { - CalcServant calc = new CalcServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService( - calc); - DynaCorbaServant servant = new DynaCorbaServant(service, null); - String[] ids = new String[] { "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0" }; - servant.setIds(ids); - bindServant(servant, "Calc"); - DynaCorbaRequest request = new DynaCorbaRequest( - bindReference("Calc"), "div"); - request.addArgument(2d); - request.setOutputType(double.class); - request.invoke(); - fail(); - } catch (Exception e) { - if (e instanceof CorbaException) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - } - - /** - * Tests handling BAD_PARAM system exception - */ - public void test_invalidServantConfiguraion() { - try { - InvalidTypesServant its = new InvalidTypesServant(); - TestRuntimeComponentService service = new TestRuntimeComponentService(its); - //expecting exception... - new DynaCorbaServant(service, null); - fail(); - } catch (Exception e) { - if (e instanceof RequestConfigurationException) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - } - + private Process process; + private ORB orb; + + /** + * Spawns tnamserv an initiates ORB + */ + public void setUp() throws IOException { + String[] args = {"-ORBInitialPort", "" + TestConstants.ORB_INITIAL_PORT}; + process = Runtime.getRuntime().exec("tnameserv " + args[0] + " " + args[1]); + try { + // let the tnameserv have time to start + Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); + orb = ORB.init(args, null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Kills tnameserv + */ + public void tearDown() { + try { + if (process != null) { + process.destroy(); + } + // let the tnameserv have time to die + Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Binds servant implementation to name + */ + private void bindServant(DynaCorbaServant servant, String name) { + try { + Object nameService = orb.resolve_initial_references("NameService"); + NamingContext namingContext = NamingContextHelper.narrow(nameService); + + NameComponent nc = new NameComponent(name, ""); + NameComponent[] path = new NameComponent[] {nc}; + namingContext.rebind(path, servant); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Returns object reference which is binded to given name + * + * @param name + * @return + */ + private org.omg.CORBA.Object bindReference(String name) { + try { + org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); + NamingContext ncRef = NamingContextHelper.narrow(objRef); + NameComponent nc = new NameComponent(name, ""); + NameComponent path[] = {nc}; + return ncRef.resolve(path); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * Tests primitives (arguments, return types) + */ + public void test_primitivesSetter() { + try { + PrimitivesSetter primitivesSetter = new PrimitivesSetterServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(primitivesSetter); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = + new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"}; + servant.setIds(ids); + bindServant(servant, "PrimitivesSetter"); + PrimitivesSetter psClient = PrimitivesSetterHelper.narrow(bindReference("PrimitivesSetter")); + assertTrue(psClient.setBoolean(true) == true); + assertTrue(psClient.setChar('A') == 'A'); + assertTrue(psClient.setString("SomeTest").equals("SomeTest")); + assertTrue(psClient.setDouble(2d) == 2d); + assertTrue(psClient.setFloat(3f) == 3f); + assertTrue(psClient.setLong(1) == 1); + assertTrue(psClient.setLongLong(0L) == 0L); + assertTrue(psClient.setOctet((byte)8) == (byte)8); + assertTrue(psClient.setShort((short)6) == (short)6); + assertTrue(psClient.setUnsignedLong(9) == 9); + assertTrue(psClient.setUnsignedLongLong(11L) == 11L); + assertTrue(psClient.setUnsignedShort((short)15) == (short)15); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + /** + * Tests if array values are equal + */ + private boolean areArraysEqual(java.lang.Object arr1, java.lang.Object arr2, int arrLen) { + try { + for (int i = 0; i < arrLen; i++) { + if (!Array.get(arr1, i).equals(Array.get(arr2, i))) { + return false; + } + } + return true; + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } + + /** + * Tests arrays (arguments, return types) + */ + public void test_arraysSetter() { + try { + ArraysSetter arraysSetter = new ArraysSetterServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(arraysSetter); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"}; + servant.setIds(ids); + java.lang.Object result = null; + bindServant(servant, "ArraysSetter"); + ArraysSetter asClient = ArraysSetterHelper.narrow(bindReference("ArraysSetter")); + + boolean[] bArr = new boolean[] {true, false}; + result = (java.lang.Object)asClient.setBoolean(bArr); + assertTrue(areArraysEqual(bArr, result, bArr.length)); + + byte[] byArr = new byte[] {1, 2}; + result = (java.lang.Object)asClient.setOctet(byArr); + assertTrue(areArraysEqual(byArr, result, byArr.length)); + + short[] shArr = new short[] {1, 2}; + result = (java.lang.Object)asClient.setShort(shArr); + assertTrue(areArraysEqual(shArr, result, shArr.length)); + + int[] iArr = new int[] {1, 2}; + result = (java.lang.Object)asClient.setLong(iArr); + assertTrue(areArraysEqual(iArr, result, iArr.length)); + + long[] lArr = new long[] {1, 2}; + result = (java.lang.Object)asClient.setLongLong(lArr); + assertTrue(areArraysEqual(lArr, result, lArr.length)); + + String[] strArr = new String[] {"Some", "Test"}; + result = (java.lang.Object)asClient.setString(strArr); + assertTrue(areArraysEqual(strArr, result, strArr.length)); + + char[] chArr = new char[] {'A', 'B'}; + result = (java.lang.Object)asClient.setChar(chArr); + assertTrue(areArraysEqual(chArr, result, chArr.length)); + + float[] flArr = new float[] {1, 2}; + result = (java.lang.Object)asClient.setFloat(flArr); + assertTrue(areArraysEqual(flArr, result, flArr.length)); + + double[] dbArr = new double[] {1, 2}; + result = (java.lang.Object)asClient.setDouble(dbArr); + assertTrue(areArraysEqual(dbArr, result, dbArr.length)); + + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + /** + * Tests structures (arguments, return types) + */ + public void test_TestObject_setStruct() { + try { + TestObject to = new TestObjectServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(to); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + servant.setIds(ids); + bindServant(servant, "TestObject"); + TestObject testObject = TestObjectHelper.narrow(bindReference("TestObject")); + SomeStruct ss = new SomeStruct(); + SimpleStruct inner = new SimpleStruct(); + inner.field1 = TestConstants.STR_1; + inner.field2 = TestConstants.INT_1; + ss.innerStruct = inner; + ss.str = TestConstants.STR_2; + ss.str_list = TestConstants.STR_ARR_1; + ss.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; + ss.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; + SomeStruct result = testObject.setStruct(ss); + assertTrue(TestConstants.are2DimArraysEqual(result.twoDimSeq, TestConstants.INT_ARRAY_2_DIM)); + assertTrue(TestConstants.are3DimArraysEqual(result.threeDimSeq, TestConstants.INT_ARRAY_3_DIM)); + assertTrue(result.str.equals(ss.str)); + assertTrue(result.innerStruct.field1.equals(ss.innerStruct.field1)); + assertTrue(result.innerStruct.field2 == ss.innerStruct.field2); + assertTrue(areArraysEqual(result.str_list, ss.str_list, ss.str_list.length)); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + /** + * Tests handling BAD_OPERATION system exception + */ + public void test_systemException_BAD_OPERATION() { + try { + TestObjectServant tos = new TestObjectServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(tos); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + servant.setIds(ids); + bindServant(servant, "TestObject"); + DynaCorbaRequest request = + new DynaCorbaRequest(bindReference("TestObject"), "methodThatSurelyDoesNotExist"); + request.invoke(); + } catch (Exception e) { + if (e instanceof CorbaException) { + assertTrue(true); + } else { + e.printStackTrace(); + } + } + + try { + InvalidTestObjectServant tos = new InvalidTestObjectServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(tos); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + servant.setIds(ids); + bindServant(servant, "InvalidTestObject"); + TestObject to = TestObjectHelper.narrow(bindReference("InvalidTestObject")); + SomeStruct str = new SomeStruct(); + str.innerStruct = new SimpleStruct(); + str.innerStruct.field1 = "Whatever"; + str.str = "Whatever"; + str.str_list = new String[] {}; + str.threeDimSeq = new int[][][] {}; + str.twoDimSeq = new int[][] {}; + to.setStruct(str); + } catch (Exception e) { + if (e instanceof BAD_OPERATION) { + assertTrue(true); + } else { + e.printStackTrace(); + } + } + } + + /** + * Tests handling user exceptions + */ + public void test_userExceptions() { + try { + CalcServant calc = new CalcServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(calc); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; + servant.setIds(ids); + bindServant(servant, "Calc"); + Calc calcClient = CalcHelper.narrow(bindReference("Calc")); + calcClient.div(1, 0); + fail(); + } catch (Exception e) { + if (e instanceof DivByZero) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + + try { + CalcServant calc = new CalcServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(calc); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; + servant.setIds(ids); + bindServant(servant, "Calc"); + Calc calcClient = CalcHelper.narrow(bindReference("Calc")); + calcClient.divForSmallArgs(255, 255); + fail(); + } catch (Exception e) { + if (e instanceof NotSupported) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + } + + /** + * Tests enums (arguments, return types) + */ + public void test_enums() { + try { + EnumManagerServant ems = new EnumManagerServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(ems); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"}; + servant.setIds(ids); + bindServant(servant, "Enum"); + EnumManager em = EnumManagerHelper.narrow(bindReference("Enum")); + Color color = Color.red; + assertTrue(em.getColor(color).value() == color.value()); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + public void test_nonCorbaServants() { + try { + NonCorbaServant ncs = new NonCorbaServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(ncs); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + bindServant(servant, "NonCorbaServant"); + // it's non corba servant so we don't have stubs to test them + DynaCorbaRequest request = new DynaCorbaRequest(bindReference("NonCorbaServant"), "setString"); + request.addArgument(TestConstants.STR_1); + request.setOutputType(String.class); + DynaCorbaResponse response = request.invoke(); + assertTrue(response.getContent().equals(TestConstants.STR_1)); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + + try { + NonCorbaServant ncs = new NonCorbaServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(ncs); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + bindServant(servant, "NonCorbaServant"); + // it's non corba servant so we don't have stubs to test them + DynaCorbaRequest request = new DynaCorbaRequest(bindReference("NonCorbaServant"), "throwException"); + request.addExceptionType(NonCorbaException.class); + request.invoke(); + fail(); + } catch (Exception e) { + if (e instanceof NonCorbaException) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + } + + /** + * Tests handling BAD_PARAM system exception + */ + public void test_systemException_BAD_PARAM() { + try { + CalcServant calc = new CalcServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(calc); + DynaCorbaServant servant = new DynaCorbaServant(service, null); + String[] ids = new String[] {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + servant.setIds(ids); + bindServant(servant, "Calc"); + DynaCorbaRequest request = new DynaCorbaRequest(bindReference("Calc"), "div"); + request.addArgument(2d); + request.setOutputType(double.class); + request.invoke(); + fail(); + } catch (Exception e) { + if (e instanceof CorbaException) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + } + + /** + * Tests handling BAD_PARAM system exception + */ + public void test_invalidServantConfiguraion() { + try { + InvalidTypesServant its = new InvalidTypesServant(); + TestRuntimeComponentService service = new TestRuntimeComponentService(its); + //expecting exception... + new DynaCorbaServant(service, null); + fail(); + } catch (Exception e) { + if (e instanceof RequestConfigurationException) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaTypesTestCase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaTypesTestCase.java index a91fc55496..85012158fd 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaTypesTestCase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/CorbaTypesTestCase.java @@ -58,572 +58,560 @@ import org.omg.CosNaming.NamingContextHelper; */ public class CorbaTypesTestCase extends TestCase { - private Process tnameservProcess; - private Object refPrimitivesSetter; - private Object refArraysSetter; - private Object refTestObject; - private Object refCalcObject; - private Object refObjectManager; - private Object refEnumManager; - - /** - * Spawns tnameserv process (must be in PATH). Initializes test servants and - * stores it's references so tests can use it. - */ - public void setUp() { - try { - String[] args = { "-ORBInitialPort", "11100" }; - - tnameservProcess = Runtime.getRuntime().exec( - "tnameserv " + args[0] + " " + args[1]); - - try { - // let the tnameserv have time to start - Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); - } catch (Exception e) { - e.printStackTrace(); - } - - ORB orb = ORB.init(args, null); - Object nameService = orb.resolve_initial_references("NameService"); - NamingContext namingContext = NamingContextHelper - .narrow(nameService); - - PrimitivesSetterServant singleSetter = new PrimitivesSetterServant(); - ArraysSetterServant arraysSetter = new ArraysSetterServant(); - TestObjectServant complexObject = new TestObjectServant(); - CalcServant calcObject = new CalcServant(); - ObjectManagerServant objectManager = new ObjectManagerServant(); - EnumManagerServant enumManager = new EnumManagerServant(); - - orb.connect(singleSetter); - orb.connect(arraysSetter); - - NameComponent nc; - NameComponent[] path; - - nc = new NameComponent("PrimitivesSetter", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, singleSetter); - - nc = new NameComponent("ArraysSetter", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, arraysSetter); - - nc = new NameComponent("TestObject", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, complexObject); - - nc = new NameComponent("CalcObject", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, calcObject); - - nc = new NameComponent("ObjectManager", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, objectManager); - - nc = new NameComponent("EnumManager", ""); - path = new NameComponent[] { nc }; - namingContext.rebind(path, enumManager); - - NamingContextExt nce = NamingContextExtHelper.narrow(orb - .resolve_initial_references("NameService")); - - refArraysSetter = nce.resolve(nce.to_name("ArraysSetter")); - refPrimitivesSetter = nce.resolve(nce.to_name("PrimitivesSetter")); - refTestObject = nce.resolve(nce.to_name("TestObject")); - refCalcObject = nce.resolve(nce.to_name("CalcObject")); - refObjectManager = nce.resolve(nce.to_name("ObjectManager")); - refEnumManager = nce.resolve(nce.to_name("EnumManager")); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Kills previously spawned tnameserv process. - */ - public void tearDown() { - tnameservProcess.destroy(); - try { - // let the tnameserv have time to die - Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Tests remote operation, basing on given reference, operation name, - * arguments, expected return type and content - * - * @param ref - * remote object - * @param operationName - * operation to invoke - * @param clazz - * expected return type - * @param arguments - * array of operation arguments - * @param equalTo - * expected return content - */ - private void dynaTestInvoker(Object ref, String operationName, - Class<?> clazz, java.lang.Object[] arguments, - java.lang.Object equalTo) { - - try { - DynaCorbaRequest request = new DynaCorbaRequest(ref, operationName); - request.setOutputType(clazz); - for (int i = 0; arguments != null && i < arguments.length; i++) { - request.addArgument(arguments[i]); - } - - DynaCorbaResponse response = request.invoke(); - java.lang.Object content = (java.lang.Object) response.getContent(); - assertTrue(content.getClass().equals(clazz)); - if (equalTo != null && equalTo.getClass().isArray()) { - for (int i = 0; i < Array.getLength(equalTo); i++) { - assertTrue(Array.get(content, i).equals( - Array.get(equalTo, i))); - } - } else { - assertTrue(content.equals(equalTo)); - } - } catch (Exception e) { - e.printStackTrace(); - fail("Error while invoking " + operationName); - } - } - - /** - * Tests passing (and getting as result) varied primitives - */ - public void test_setPrimitives() { - - dynaTestInvoker(refPrimitivesSetter, "setBoolean", Boolean.class, - new Boolean[] { true }, true); - dynaTestInvoker(refPrimitivesSetter, "setOctet", Byte.class, - new Byte[] { 1 }, (byte) 1); - dynaTestInvoker(refPrimitivesSetter, "setChar", Character.class, - new Character[] { 'A' }, 'A'); - dynaTestInvoker(refPrimitivesSetter, "setShort", Short.class, - new Short[] { 1 }, (short) 1); - dynaTestInvoker(refPrimitivesSetter, "setLong", Integer.class, - new Integer[] { 1 }, (int) 1); - dynaTestInvoker(refPrimitivesSetter, "setLongLong", Long.class, - new Long[] { (long) 1 }, (long) 1); - dynaTestInvoker(refPrimitivesSetter, "setFloat", Float.class, - new Float[] { (float) 1 }, (float) 1); - dynaTestInvoker(refPrimitivesSetter, "setDouble", Double.class, - new Double[] { (double) 1 }, (double) 1); - dynaTestInvoker(refPrimitivesSetter, "setString", String.class, - new String[] { "1" }, "1"); - - } - - /** - * Tests passing (and getting as result) varied types sequences - */ - public void test_setArrays() { - - dynaTestInvoker(refArraysSetter, "setBoolean", Boolean[].class, - new Boolean[][] { new Boolean[] { false, true } }, - new Boolean[] { false, true }); - - dynaTestInvoker(refArraysSetter, "setChar", Character[].class, - new Character[][] { new Character[] { 'A', 'B' } }, - new Character[] { 'A', 'B' }); - - dynaTestInvoker(refArraysSetter, "setOctet", Byte[].class, - new Byte[][] { new Byte[] { 1, 2 } }, new Byte[] { 1, 2 }); - - dynaTestInvoker(refArraysSetter, "setShort", Short[].class, - new Short[][] { new Short[] { 1, 2 } }, new Short[] { 1, 2 }); - - dynaTestInvoker(refArraysSetter, "setLong", Integer[].class, - new Integer[][] { new Integer[] { 1, 2 } }, new Integer[] { 1, - 2 }); - - dynaTestInvoker(refArraysSetter, "setLongLong", Long[].class, - new Long[][] { new Long[] { new Long(1), new Long(2) } }, - new Long[] { new Long(1), new Long(2) }); - - dynaTestInvoker( - refArraysSetter, - "setFloat", - Float[].class, - new Float[][] { new Float[] { new Float(1.0), new Float(2.0) } }, - new Float[] { new Float(1.0), new Float(2.0) }); - - dynaTestInvoker(refArraysSetter, "setDouble", Double[].class, - new Double[][] { new Double[] { new Double(1.0), - new Double(2.0) } }, new Double[] { new Double(1.0), - new Double(2.0) }); - - dynaTestInvoker(refArraysSetter, "setString", String[].class, - new String[][] { new String[] { "A", "B" } }, new String[] { - "A", "B" }); - - } - - /** - * Tests passing (and getting as result) complex structure - */ - public void test_TestObject_setStruct() { - DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, - "setStruct"); - - SomeStruct struct = new SomeStruct(); - SimpleStruct inner = new SimpleStruct(); - inner.field1 = TestConstants.STR_1; - inner.field2 = TestConstants.INT_1; - struct.innerStruct = inner; - struct.str_list = TestConstants.STR_ARR_2; - struct.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; - struct.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; - struct.str = TestConstants.STR_1; - - try { - request.addArgument(struct); - request.setOutputType(SomeStruct.class); - DynaCorbaResponse response = request.invoke(); - SomeStruct result = (SomeStruct) response.getContent(); - assertTrue(TestConstants.are2DimArraysEqual(result.twoDimSeq, TestConstants.INT_ARRAY_2_DIM)); - assertTrue(TestConstants.are3DimArraysEqual(result.threeDimSeq, TestConstants.INT_ARRAY_3_DIM)); - assertEquals(TestConstants.STR_1, result.str); - assertEquals(TestConstants.STR_ARR_2[0], result.str_list[0]); - assertEquals(TestConstants.STR_ARR_2[1], result.str_list[1]); - assertEquals(TestConstants.STR_1, result.innerStruct.field1); - assertEquals(TestConstants.INT_1, result.innerStruct.field2); - } catch (Exception e) { - e.printStackTrace(); - fail("Exception occured during tests: " + e); - } - } - - /** - * Test passing (and getting as result) simple two-field structure - */ - public void test_TestObject_setSimpleStruct() { - SimpleStruct struct = new SimpleStruct(); - struct.field1 = TestConstants.STR_1; - struct.field2 = TestConstants.INT_1; - DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, - "setSimpleStruct"); - try { - request.setOutputType(SimpleStruct.class); - request.addArgument(struct); - DynaCorbaResponse response = request.invoke(); - SimpleStruct retStruct = (SimpleStruct) response.getContent(); - assertTrue(retStruct.field1.equals(struct.field1) - && retStruct.field2 == struct.field2); - } catch (Exception e) { - e.printStackTrace(); - fail("Exception occured during tests: " + e); - } - } - - /** - * Tests passing (and getting as result) two dim. sequence of long. - */ - public void test_TestObject_setLongSeq2() { - int[][] arr1 = new int[2][2]; - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - arr1[i][j] = (int) (Math.random() * 1000); - } - } - DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, - "setLongSeq2"); - try { - request.setOutputType(arr1.getClass()); - request.addArgument(arr1); - DynaCorbaResponse response = request.invoke(); - int[][] arr2 = (int[][]) response.getContent(); - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - assertEquals(arr1[i][j], arr2[i][j]); - } - } - } catch (Exception e) { - e.printStackTrace(); - fail("Exception occured during tests: " + e); - } - } - - /** - * Tests passing multiple complex attributes. - */ - public void test_TestObject_pickStructFromArgs() { - SomeStruct arg1 = new SomeStruct(); - SomeStruct arg2 = new SomeStruct(); - SomeStruct arg3 = new SomeStruct(); - - SimpleStruct inner = new SimpleStruct(); - inner.field1 = TestConstants.STR_1; - inner.field2 = TestConstants.INT_1; - - arg1.innerStruct = inner; - arg2.innerStruct = inner; - arg3.innerStruct = inner; - - arg1.str = TestConstants.STR_1; - arg2.str = TestConstants.STR_2; - arg3.str = TestConstants.STR_3; - - arg1.str_list = TestConstants.STR_ARR_1; - arg2.str_list = TestConstants.STR_ARR_2; - arg3.str_list = TestConstants.STR_ARR_2; - - arg1.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; - arg2.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; - arg3.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; - - arg1.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; - arg2.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; - arg3.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; - - DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, - "pickStructFromArgs"); - try { - - request.setOutputType(SomeStruct.class); - request.addArgument(arg1); - request.addArgument(arg2); - request.addArgument(arg3); - request.addArgument(1); - DynaCorbaResponse response = request.invoke(); - SomeStruct result = (SomeStruct) response.getContent(); - - // just make sure that servant returned right structure - assertTrue(result.str.equals(TestConstants.STR_1)); - } catch (Exception e) { - fail("Exception occured during tests " + e); - e.printStackTrace(); - } - - } - - /** - * Tests handling user defined remote exception (single declared) - */ - public void test_singleException() { - DynaCorbaRequest request1 = new DynaCorbaRequest(refCalcObject, "div"); - try { - request1.addArgument(2d); - request1.addArgument(2d); - request1.setOutputType(Double.class); - request1.addExceptionType(DivByZero.class); - request1.invoke(); - } catch (Exception e) { - fail(); - } - - DynaCorbaRequest request2 = new DynaCorbaRequest(refCalcObject, "div"); - try { - request2.addArgument(2d); - request2.addArgument(0d); - request2.setOutputType(Double.class); - request2.addExceptionType(DivByZero.class); - request2.invoke(); - } catch (DivByZero e) { - assertTrue(e.info != null && e.arguments != null - && e.arguments.arg1 == 2 && e.arguments.arg2 == 0); - } catch (Exception exc) { - exc.printStackTrace(); - fail(); - } - } - - /** - * Tests handling user defined multiple exceptions - */ - public void test_multipleExceptions() { - DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, - "divForSmallArgs"); - try { - request.addArgument(101d); - request.addArgument(101d); - request.setOutputType(Double.class); - request.addExceptionType(DivByZero.class); - request.addExceptionType(NotSupported.class); - request.invoke(); - } catch (Exception e) { - assertTrue(e instanceof NotSupported); - } - } - - /** - * Tests handling exceptions while user defined no exceptions - */ - public void test_noExceptionsDeclared() { - DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); - try { - request.addArgument(1d); - request.addArgument(0d); - request.setOutputType(Double.class); - request.invoke(); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - } - - /** - * Tests handling exceptions while user defined no such exception - */ - public void test_noSuchExceptionDeclared() { - DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); - try { - request.addArgument(1d); - request.addArgument(0d); - request.addExceptionType(NotSupported.class); - request.setOutputType(Double.class); - request.invoke(); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - } - - /** - * Tests handling non existing operation situation - */ - public void test_systemException_BAD_OPERATION() { - DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, - "thisOperationSurelyDoesNotExist"); - try { - request.invoke(); - fail(); - } catch (Exception e) { - assertTrue(e instanceof CorbaException); - } - } - - /** - * Tests obtaining references to other objects and using them with specified - * user interface - */ - public void test_enchancedReferences() { - try { - DynaCorbaRequest request = new DynaCorbaRequest(refObjectManager, - "getDummyObject"); - request.setOutputType(DummyObject.class); - DynaCorbaResponse response = request.invoke(); - DummyObject dummy = (DummyObject) response.getContent(); - DummyObject dummy2 = dummy.cloneObject(); - assertNotSame(dummy.getLong(), dummy2.getLong()); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - /** - * Test passing enums as arguments and retrieving them as a result - */ - public void test_enums() { - try { - DynaCorbaRequest request = new DynaCorbaRequest(refEnumManager, - "getColor"); - Color color = Color.green; - request.addArgument(color); - request.setOutputType(Color.class); - DynaCorbaResponse response = request.invoke(); - Color result = (Color) response.getContent(); - assertEquals(color.value(), result.value()); - } catch (Exception e) { - e.printStackTrace(); - fail(); - } - } - - /** - * Tests recognizing structures - */ - public void test_structValidation() { - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidStruct1.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidStruct2.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidStruct3.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(SomeStruct.class); - } catch (Exception e) { - fail(); - } - } - - /** - * Tests recognizing enums - */ - public void test_enumValidation() { - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidEnum1.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidEnum2.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(InvalidEnum3.class); - fail(); - } catch (Exception e) { - assertTrue(e instanceof RequestConfigurationException); - } - try { - DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); - request.setOutputType(Color.class); - } catch (Exception e) { - fail(); - } - } - - /** - * Tests hanlding passing wrong params - */ - public void test_systemException_BAD_PARAM() { - try { - DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); - request.setOutputType(Double.class); - request.addArgument(3d); - request.invoke(); - fail(); - } catch (Exception e) { - if (e instanceof CorbaException) { - assertTrue(true); - } else { - e.printStackTrace(); - fail(); - } - } - } + private Process tnameservProcess; + private Object refPrimitivesSetter; + private Object refArraysSetter; + private Object refTestObject; + private Object refCalcObject; + private Object refObjectManager; + private Object refEnumManager; + + /** + * Spawns tnameserv process (must be in PATH). Initializes test servants and + * stores it's references so tests can use it. + */ + public void setUp() { + try { + String[] args = {"-ORBInitialPort", "11100"}; + + tnameservProcess = Runtime.getRuntime().exec("tnameserv " + args[0] + " " + args[1]); + + try { + // let the tnameserv have time to start + Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); + } catch (Exception e) { + e.printStackTrace(); + } + + ORB orb = ORB.init(args, null); + Object nameService = orb.resolve_initial_references("NameService"); + NamingContext namingContext = NamingContextHelper.narrow(nameService); + + PrimitivesSetterServant singleSetter = new PrimitivesSetterServant(); + ArraysSetterServant arraysSetter = new ArraysSetterServant(); + TestObjectServant complexObject = new TestObjectServant(); + CalcServant calcObject = new CalcServant(); + ObjectManagerServant objectManager = new ObjectManagerServant(); + EnumManagerServant enumManager = new EnumManagerServant(); + + orb.connect(singleSetter); + orb.connect(arraysSetter); + + NameComponent nc; + NameComponent[] path; + + nc = new NameComponent("PrimitivesSetter", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, singleSetter); + + nc = new NameComponent("ArraysSetter", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, arraysSetter); + + nc = new NameComponent("TestObject", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, complexObject); + + nc = new NameComponent("CalcObject", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, calcObject); + + nc = new NameComponent("ObjectManager", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, objectManager); + + nc = new NameComponent("EnumManager", ""); + path = new NameComponent[] {nc}; + namingContext.rebind(path, enumManager); + + NamingContextExt nce = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService")); + + refArraysSetter = nce.resolve(nce.to_name("ArraysSetter")); + refPrimitivesSetter = nce.resolve(nce.to_name("PrimitivesSetter")); + refTestObject = nce.resolve(nce.to_name("TestObject")); + refCalcObject = nce.resolve(nce.to_name("CalcObject")); + refObjectManager = nce.resolve(nce.to_name("ObjectManager")); + refEnumManager = nce.resolve(nce.to_name("EnumManager")); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Kills previously spawned tnameserv process. + */ + public void tearDown() { + tnameservProcess.destroy(); + try { + // let the tnameserv have time to die + Thread.sleep(TestConstants.TNAMESERV_SPAWN_WAIT); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Tests remote operation, basing on given reference, operation name, + * arguments, expected return type and content + * + * @param ref + * remote object + * @param operationName + * operation to invoke + * @param clazz + * expected return type + * @param arguments + * array of operation arguments + * @param equalTo + * expected return content + */ + private void dynaTestInvoker(Object ref, + String operationName, + Class<?> clazz, + java.lang.Object[] arguments, + java.lang.Object equalTo) { + + try { + DynaCorbaRequest request = new DynaCorbaRequest(ref, operationName); + request.setOutputType(clazz); + for (int i = 0; arguments != null && i < arguments.length; i++) { + request.addArgument(arguments[i]); + } + + DynaCorbaResponse response = request.invoke(); + java.lang.Object content = (java.lang.Object)response.getContent(); + assertTrue(content.getClass().equals(clazz)); + if (equalTo != null && equalTo.getClass().isArray()) { + for (int i = 0; i < Array.getLength(equalTo); i++) { + assertTrue(Array.get(content, i).equals(Array.get(equalTo, i))); + } + } else { + assertTrue(content.equals(equalTo)); + } + } catch (Exception e) { + e.printStackTrace(); + fail("Error while invoking " + operationName); + } + } + + /** + * Tests passing (and getting as result) varied primitives + */ + public void test_setPrimitives() { + + dynaTestInvoker(refPrimitivesSetter, "setBoolean", Boolean.class, new Boolean[] {true}, true); + dynaTestInvoker(refPrimitivesSetter, "setOctet", Byte.class, new Byte[] {1}, (byte)1); + dynaTestInvoker(refPrimitivesSetter, "setChar", Character.class, new Character[] {'A'}, 'A'); + dynaTestInvoker(refPrimitivesSetter, "setShort", Short.class, new Short[] {1}, (short)1); + dynaTestInvoker(refPrimitivesSetter, "setLong", Integer.class, new Integer[] {1}, (int)1); + dynaTestInvoker(refPrimitivesSetter, "setLongLong", Long.class, new Long[] {(long)1}, (long)1); + dynaTestInvoker(refPrimitivesSetter, "setFloat", Float.class, new Float[] {(float)1}, (float)1); + dynaTestInvoker(refPrimitivesSetter, "setDouble", Double.class, new Double[] {(double)1}, (double)1); + dynaTestInvoker(refPrimitivesSetter, "setString", String.class, new String[] {"1"}, "1"); + + } + + /** + * Tests passing (and getting as result) varied types sequences + */ + public void test_setArrays() { + + dynaTestInvoker(refArraysSetter, + "setBoolean", + Boolean[].class, + new Boolean[][] {new Boolean[] {false, true}}, + new Boolean[] {false, true}); + + dynaTestInvoker(refArraysSetter, + "setChar", + Character[].class, + new Character[][] {new Character[] {'A', 'B'}}, + new Character[] {'A', 'B'}); + + dynaTestInvoker(refArraysSetter, "setOctet", Byte[].class, new Byte[][] {new Byte[] {1, 2}}, new Byte[] {1, 2}); + + dynaTestInvoker(refArraysSetter, "setShort", Short[].class, new Short[][] {new Short[] {1, 2}}, new Short[] {1, + 2}); + + dynaTestInvoker(refArraysSetter, + "setLong", + Integer[].class, + new Integer[][] {new Integer[] {1, 2}}, + new Integer[] {1, 2}); + + dynaTestInvoker(refArraysSetter, + "setLongLong", + Long[].class, + new Long[][] {new Long[] {new Long(1), new Long(2)}}, + new Long[] {new Long(1), new Long(2)}); + + dynaTestInvoker(refArraysSetter, + "setFloat", + Float[].class, + new Float[][] {new Float[] {new Float(1.0), new Float(2.0)}}, + new Float[] {new Float(1.0), new Float(2.0)}); + + dynaTestInvoker(refArraysSetter, + "setDouble", + Double[].class, + new Double[][] {new Double[] {new Double(1.0), new Double(2.0)}}, + new Double[] {new Double(1.0), new Double(2.0)}); + + dynaTestInvoker(refArraysSetter, + "setString", + String[].class, + new String[][] {new String[] {"A", "B"}}, + new String[] {"A", "B"}); + + } + + /** + * Tests passing (and getting as result) complex structure + */ + public void test_TestObject_setStruct() { + DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setStruct"); + + SomeStruct struct = new SomeStruct(); + SimpleStruct inner = new SimpleStruct(); + inner.field1 = TestConstants.STR_1; + inner.field2 = TestConstants.INT_1; + struct.innerStruct = inner; + struct.str_list = TestConstants.STR_ARR_2; + struct.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; + struct.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; + struct.str = TestConstants.STR_1; + + try { + request.addArgument(struct); + request.setOutputType(SomeStruct.class); + DynaCorbaResponse response = request.invoke(); + SomeStruct result = (SomeStruct)response.getContent(); + assertTrue(TestConstants.are2DimArraysEqual(result.twoDimSeq, TestConstants.INT_ARRAY_2_DIM)); + assertTrue(TestConstants.are3DimArraysEqual(result.threeDimSeq, TestConstants.INT_ARRAY_3_DIM)); + assertEquals(TestConstants.STR_1, result.str); + assertEquals(TestConstants.STR_ARR_2[0], result.str_list[0]); + assertEquals(TestConstants.STR_ARR_2[1], result.str_list[1]); + assertEquals(TestConstants.STR_1, result.innerStruct.field1); + assertEquals(TestConstants.INT_1, result.innerStruct.field2); + } catch (Exception e) { + e.printStackTrace(); + fail("Exception occured during tests: " + e); + } + } + + /** + * Test passing (and getting as result) simple two-field structure + */ + public void test_TestObject_setSimpleStruct() { + SimpleStruct struct = new SimpleStruct(); + struct.field1 = TestConstants.STR_1; + struct.field2 = TestConstants.INT_1; + DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setSimpleStruct"); + try { + request.setOutputType(SimpleStruct.class); + request.addArgument(struct); + DynaCorbaResponse response = request.invoke(); + SimpleStruct retStruct = (SimpleStruct)response.getContent(); + assertTrue(retStruct.field1.equals(struct.field1) && retStruct.field2 == struct.field2); + } catch (Exception e) { + e.printStackTrace(); + fail("Exception occured during tests: " + e); + } + } + + /** + * Tests passing (and getting as result) two dim. sequence of long. + */ + public void test_TestObject_setLongSeq2() { + int[][] arr1 = new int[2][2]; + for (int i = 0; i < 2; i++) { + for (int j = 0; j < 2; j++) { + arr1[i][j] = (int)(Math.random() * 1000); + } + } + DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "setLongSeq2"); + try { + request.setOutputType(arr1.getClass()); + request.addArgument(arr1); + DynaCorbaResponse response = request.invoke(); + int[][] arr2 = (int[][])response.getContent(); + for (int i = 0; i < 2; i++) { + for (int j = 0; j < 2; j++) { + assertEquals(arr1[i][j], arr2[i][j]); + } + } + } catch (Exception e) { + e.printStackTrace(); + fail("Exception occured during tests: " + e); + } + } + + /** + * Tests passing multiple complex attributes. + */ + public void test_TestObject_pickStructFromArgs() { + SomeStruct arg1 = new SomeStruct(); + SomeStruct arg2 = new SomeStruct(); + SomeStruct arg3 = new SomeStruct(); + + SimpleStruct inner = new SimpleStruct(); + inner.field1 = TestConstants.STR_1; + inner.field2 = TestConstants.INT_1; + + arg1.innerStruct = inner; + arg2.innerStruct = inner; + arg3.innerStruct = inner; + + arg1.str = TestConstants.STR_1; + arg2.str = TestConstants.STR_2; + arg3.str = TestConstants.STR_3; + + arg1.str_list = TestConstants.STR_ARR_1; + arg2.str_list = TestConstants.STR_ARR_2; + arg3.str_list = TestConstants.STR_ARR_2; + + arg1.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; + arg2.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; + arg3.threeDimSeq = TestConstants.INT_ARRAY_3_DIM; + + arg1.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; + arg2.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; + arg3.twoDimSeq = TestConstants.INT_ARRAY_2_DIM; + + DynaCorbaRequest request = new DynaCorbaRequest(refTestObject, "pickStructFromArgs"); + try { + + request.setOutputType(SomeStruct.class); + request.addArgument(arg1); + request.addArgument(arg2); + request.addArgument(arg3); + request.addArgument(1); + DynaCorbaResponse response = request.invoke(); + SomeStruct result = (SomeStruct)response.getContent(); + + // just make sure that servant returned right structure + assertTrue(result.str.equals(TestConstants.STR_1)); + } catch (Exception e) { + fail("Exception occured during tests " + e); + e.printStackTrace(); + } + + } + + /** + * Tests handling user defined remote exception (single declared) + */ + public void test_singleException() { + DynaCorbaRequest request1 = new DynaCorbaRequest(refCalcObject, "div"); + try { + request1.addArgument(2d); + request1.addArgument(2d); + request1.setOutputType(Double.class); + request1.addExceptionType(DivByZero.class); + request1.invoke(); + } catch (Exception e) { + fail(); + } + + DynaCorbaRequest request2 = new DynaCorbaRequest(refCalcObject, "div"); + try { + request2.addArgument(2d); + request2.addArgument(0d); + request2.setOutputType(Double.class); + request2.addExceptionType(DivByZero.class); + request2.invoke(); + } catch (DivByZero e) { + assertTrue(e.info != null && e.arguments != null && e.arguments.arg1 == 2 && e.arguments.arg2 == 0); + } catch (Exception exc) { + exc.printStackTrace(); + fail(); + } + } + + /** + * Tests handling user defined multiple exceptions + */ + public void test_multipleExceptions() { + DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "divForSmallArgs"); + try { + request.addArgument(101d); + request.addArgument(101d); + request.setOutputType(Double.class); + request.addExceptionType(DivByZero.class); + request.addExceptionType(NotSupported.class); + request.invoke(); + } catch (Exception e) { + assertTrue(e instanceof NotSupported); + } + } + + /** + * Tests handling exceptions while user defined no exceptions + */ + public void test_noExceptionsDeclared() { + DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); + try { + request.addArgument(1d); + request.addArgument(0d); + request.setOutputType(Double.class); + request.invoke(); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + } + + /** + * Tests handling exceptions while user defined no such exception + */ + public void test_noSuchExceptionDeclared() { + DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); + try { + request.addArgument(1d); + request.addArgument(0d); + request.addExceptionType(NotSupported.class); + request.setOutputType(Double.class); + request.invoke(); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + } + + /** + * Tests handling non existing operation situation + */ + public void test_systemException_BAD_OPERATION() { + DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "thisOperationSurelyDoesNotExist"); + try { + request.invoke(); + fail(); + } catch (Exception e) { + assertTrue(e instanceof CorbaException); + } + } + + /** + * Tests obtaining references to other objects and using them with specified + * user interface + */ + public void test_enchancedReferences() { + try { + DynaCorbaRequest request = new DynaCorbaRequest(refObjectManager, "getDummyObject"); + request.setOutputType(DummyObject.class); + DynaCorbaResponse response = request.invoke(); + DummyObject dummy = (DummyObject)response.getContent(); + DummyObject dummy2 = dummy.cloneObject(); + assertNotSame(dummy.getLong(), dummy2.getLong()); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + /** + * Test passing enums as arguments and retrieving them as a result + */ + public void test_enums() { + try { + DynaCorbaRequest request = new DynaCorbaRequest(refEnumManager, "getColor"); + Color color = Color.green; + request.addArgument(color); + request.setOutputType(Color.class); + DynaCorbaResponse response = request.invoke(); + Color result = (Color)response.getContent(); + assertEquals(color.value(), result.value()); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + /** + * Tests recognizing structures + */ + public void test_structValidation() { + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidStruct1.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidStruct2.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidStruct3.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(SomeStruct.class); + } catch (Exception e) { + fail(); + } + } + + /** + * Tests recognizing enums + */ + public void test_enumValidation() { + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidEnum1.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidEnum2.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(InvalidEnum3.class); + fail(); + } catch (Exception e) { + assertTrue(e instanceof RequestConfigurationException); + } + try { + DynaCorbaRequest request = new DynaCorbaRequest(refArraysSetter, "whatever"); + request.setOutputType(Color.class); + } catch (Exception e) { + fail(); + } + } + + /** + * Tests hanlding passing wrong params + */ + public void test_systemException_BAD_PARAM() { + try { + DynaCorbaRequest request = new DynaCorbaRequest(refCalcObject, "div"); + request.setOutputType(Double.class); + request.addArgument(3d); + request.invoke(); + fail(); + } catch (Exception e) { + if (e instanceof CorbaException) { + assertTrue(true); + } else { + e.printStackTrace(); + fail(); + } + } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/TestConstants.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/TestConstants.java index 1b37b9ad10..2151e09090 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/TestConstants.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/TestConstants.java @@ -25,60 +25,59 @@ package org.apache.tuscany.sca.binding.corba.testing; */ public class TestConstants { - public static final String STR_1 = "Hello world!"; - public static final String STR_2 = "2nd string"; - public static final String STR_3 = "Other string"; - public static final String[] STR_ARR_1 = { "Hello", "World" }; - public static final String[] STR_ARR_2 = { "Another", "string", "array" }; - public static final int INT_1 = 0; + public static final String STR_1 = "Hello world!"; + public static final String STR_2 = "2nd string"; + public static final String STR_3 = "Other string"; + public static final String[] STR_ARR_1 = {"Hello", "World"}; + public static final String[] STR_ARR_2 = {"Another", "string", "array"}; + public static final int INT_1 = 0; - public static final int ORB_INITIAL_PORT = 11100; + public static final int ORB_INITIAL_PORT = 11100; - public static final int[][] INT_ARRAY_2_DIM = { { 1, 2 }, { 3, 4 } }; - public static final int[][][] INT_ARRAY_3_DIM = { { { 1, 2 }, { 3, 4 } }, - { { 5, 6 }, { 7, 8 } } }; + public static final int[][] INT_ARRAY_2_DIM = { {1, 2}, {3, 4}}; + public static final int[][][] INT_ARRAY_3_DIM = { { {1, 2}, {3, 4}}, { {5, 6}, {7, 8}}}; - public static final long TNAMESERV_SPAWN_WAIT = 300; + public static final long TNAMESERV_SPAWN_WAIT = 300; - /** - * Tests if given 2D arrays values are equal - * @param arr1 - * @param arr2 - * @return - */ - public static boolean are2DimArraysEqual(int[][] arr1, int[][] arr2) { - int sum = 0; - int expSum = 0; - for (int i = 0; i < arr1.length; i++) { - for (int j = 0; j < arr1[i].length; j++) { - expSum++; - if (arr1[i][j] == arr2[i][j]) { - sum++; - } - } - } - return sum == expSum; - } + /** + * Tests if given 2D arrays values are equal + * @param arr1 + * @param arr2 + * @return + */ + public static boolean are2DimArraysEqual(int[][] arr1, int[][] arr2) { + int sum = 0; + int expSum = 0; + for (int i = 0; i < arr1.length; i++) { + for (int j = 0; j < arr1[i].length; j++) { + expSum++; + if (arr1[i][j] == arr2[i][j]) { + sum++; + } + } + } + return sum == expSum; + } - /** - * Tests if given 3D arrays values are equal - * @param arr1 - * @param arr2 - * @return - */ - public static boolean are3DimArraysEqual(int[][][] arr1, int[][][] arr2) { - int sum = 0; - int expSum = 0; - for (int i = 0; i < arr1.length; i++) { - for (int j = 0; j < arr1[i].length; j++) { - for (int k = 0; k < arr1[i][j].length; k++) { - expSum++; - if (arr1[i][j][k] == arr2[i][j][k]) { - sum++; - } - } - } - } - return sum == expSum; - } + /** + * Tests if given 3D arrays values are equal + * @param arr1 + * @param arr2 + * @return + */ + public static boolean are3DimArraysEqual(int[][][] arr1, int[][][] arr2) { + int sum = 0; + int expSum = 0; + for (int i = 0; i < arr1.length; i++) { + for (int j = 0; j < arr1[i].length; j++) { + for (int k = 0; k < arr1[i][j].length; k++) { + expSum++; + if (arr1[i][j][k] == arr2[i][j][k]) { + sum++; + } + } + } + } + return sum == expSum; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/Color.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/Color.java index 71f307be26..e3c28f8b91 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/Color.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/Color.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/Color.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,35 +26,35 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public class Color implements org.omg.CORBA.portable.IDLEntity -{ - private int __value; - private static int __size = 3; - private static org.apache.tuscany.sca.binding.corba.testing.enums.Color[] __array = new org.apache.tuscany.sca.binding.corba.testing.enums.Color [__size]; - - public static final int _red = 0; - public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color red = new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_red); - public static final int _yellow = 1; - public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color yellow = new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_yellow); - public static final int _green = 2; - public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color green = new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_green); - - public int value () - { - return __value; - } - - public static org.apache.tuscany.sca.binding.corba.testing.enums.Color from_int (int value) - { - if (value >= 0 && value < __size) - return __array[value]; - else - throw new org.omg.CORBA.BAD_PARAM (); - } - - protected Color (int value) - { - __value = value; - __array[__value] = this; - } +public class Color implements org.omg.CORBA.portable.IDLEntity { + private int __value; + private static int __size = 3; + private static org.apache.tuscany.sca.binding.corba.testing.enums.Color[] __array = + new org.apache.tuscany.sca.binding.corba.testing.enums.Color[__size]; + + public static final int _red = 0; + public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color red = + new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_red); + public static final int _yellow = 1; + public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color yellow = + new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_yellow); + public static final int _green = 2; + public static final org.apache.tuscany.sca.binding.corba.testing.enums.Color green = + new org.apache.tuscany.sca.binding.corba.testing.enums.Color(_green); + + public int value() { + return __value; + } + + public static org.apache.tuscany.sca.binding.corba.testing.enums.Color from_int(int value) { + if (value >= 0 && value < __size) + return __array[value]; + else + throw new org.omg.CORBA.BAD_PARAM(); + } + + protected Color(int value) { + __value = value; + __array[__value] = this; + } } // class Color diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHelper.java index 55409a1d92..775cac8e16 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/ColorHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,46 +26,44 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -abstract public class ColorHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/Color:1.0"; +abstract public class ColorHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/Color:1.0"; + + public static void insert(org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.enums.Color that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.enums.Color that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.enums.Color extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.enums.Color extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.id (), "Color", new String[] { "red", "yellow", "green"} ); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init().create_enum_tc(org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper + .id(), + "Color", + new String[] {"red", "yellow", "green"}); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.enums.Color read (org.omg.CORBA.portable.InputStream istream) - { - return org.apache.tuscany.sca.binding.corba.testing.enums.Color.from_int (istream.read_long ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.enums.Color read(org.omg.CORBA.portable.InputStream istream) { + return org.apache.tuscany.sca.binding.corba.testing.enums.Color.from_int(istream.read_long()); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.enums.Color value) - { - ostream.write_long (value.value ()); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.enums.Color value) { + ostream.write_long(value.value()); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHolder.java index 3290d26397..32cd9c8df6 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/ColorHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public final class ColorHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.enums.Color value = null; - - public ColorHolder () - { - } - - public ColorHolder (org.apache.tuscany.sca.binding.corba.testing.enums.Color initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.type (); - } +public final class ColorHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.enums.Color value = null; + + public ColorHolder() { + } + + public ColorHolder(org.apache.tuscany.sca.binding.corba.testing.enums.Color initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager.java index 5e2df26961..3f73557952 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public interface EnumManager extends EnumManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface EnumManager extends EnumManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface EnumManager diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHelper.java index 8ba4dc0729..a6160a7643 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,73 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -abstract public class EnumManagerHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"; +abstract public class EnumManagerHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"; + + public static void insert(org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.id (), "EnumManager"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.id(), + "EnumManager"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_EnumManagerStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_EnumManagerStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager) - return (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub stub = new org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager) + return (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub stub = + new org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager) - return (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub stub = new org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager) + return (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub stub = + new org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHolder.java index 065287d547..6afa6bc806 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public final class EnumManagerHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager value = null; - - public EnumManagerHolder () - { - } - - public EnumManagerHolder (org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.type (); - } +public final class EnumManagerHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager value = null; + + public EnumManagerHolder() { + } + + public EnumManagerHolder(org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.enums.EnumManagerHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerOperations.java index 6452d55db7..bab0c27f77 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/EnumManagerOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,8 +26,7 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public interface EnumManagerOperations -{ - - org.apache.tuscany.sca.binding.corba.testing.enums.Color getColor (org.apache.tuscany.sca.binding.corba.testing.enums.Color color); +public interface EnumManagerOperations { + + org.apache.tuscany.sca.binding.corba.testing.enums.Color getColor(org.apache.tuscany.sca.binding.corba.testing.enums.Color color); } // interface EnumManagerOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerImplBase.java index 6975a4d4f0..0819acf2ce 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,57 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public abstract class _EnumManagerImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _EnumManagerImplBase () - { - } +public abstract class _EnumManagerImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager, org.omg.CORBA.portable.InvokeHandler { - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("getColor", new java.lang.Integer (0)); - } + // Constructors + public _EnumManagerImplBase() { + } - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("getColor", new java.lang.Integer(0)); + } - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager/getColor - { - org.apache.tuscany.sca.binding.corba.testing.enums.Color color = org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.enums.Color $result = null; - $result = this.getColor (color); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write (out, $result); - break; - } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager/getColor + { + org.apache.tuscany.sca.binding.corba.testing.enums.Color color = + org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.enums.Color $result = null; + $result = this.getColor(color); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write(out, $result); + break; + } - return out; - } // _invoke + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"}; + return out; + } // _invoke - public String[] _ids () - { - return (String[])__ids.clone (); - } + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"}; + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _EnumManagerImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerStub.java index 77bfa7c6e9..88d643fae9 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; - /** * org/apache/tuscany/sca/binding/corba/testing/enums/_EnumManagerStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,49 @@ package org.apache.tuscany.sca.binding.corba.testing.enums; * czwartek, 19 czerwiec 2008 15:46:10 CEST */ -public class _EnumManagerStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager -{ +public class _EnumManagerStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.enums.EnumManager { - public org.apache.tuscany.sca.binding.corba.testing.enums.Color getColor (org.apache.tuscany.sca.binding.corba.testing.enums.Color color) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("getColor", true); - org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write ($out, color); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.enums.Color $result = org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return getColor (color ); - } finally { - _releaseReply ($in); - } - } // getColor + public org.apache.tuscany.sca.binding.corba.testing.enums.Color getColor(org.apache.tuscany.sca.binding.corba.testing.enums.Color color) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("getColor", true); + org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.write($out, color); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.enums.Color $result = + org.apache.tuscany.sca.binding.corba.testing.enums.ColorHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return getColor(color); + } finally { + _releaseReply($in); + } + } // getColor - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _EnumManagerStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc.java index 9207e185c3..aa480f93ac 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public interface Calc extends CalcOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface Calc extends CalcOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface Calc diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHelper.java index ca70efb686..5ed36ca19b 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,73 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -abstract public class CalcHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"; +abstract public class CalcHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"; + + public static void insert(org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.id (), "Calc"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.id(), + "Calc"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_CalcStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_CalcStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc) - return (org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub stub = new org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc) + return (org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub stub = + new org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc) - return (org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub stub = new org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc) + return (org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub stub = + new org.apache.tuscany.sca.binding.corba.testing.exceptions._CalcStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHolder.java index 3051cda748..ec1cfadd1e 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class CalcHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc value = null; - - public CalcHolder () - { - } - - public CalcHolder (org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.type (); - } +public final class CalcHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc value = null; + + public CalcHolder() { + } + + public CalcHolder(org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcOperations.java index 618b36a531..29865ace06 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,8 +26,11 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public interface CalcOperations -{ - double div (double arg1, double arg2) throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero; - double divForSmallArgs (double arg1, double arg2) throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported; +public interface CalcOperations { + double div(double arg1, double arg2) + throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero; + + double divForSmallArgs(double arg1, double arg2) + throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported; } // interface CalcOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/Arguments.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/Arguments.java index 8530dba999..d7839ec4db 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/Arguments.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/Arguments.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/Arguments.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,19 +26,16 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class Arguments implements org.omg.CORBA.portable.IDLEntity -{ - public double arg1 = (double)0; - public double arg2 = (double)0; +public final class Arguments implements org.omg.CORBA.portable.IDLEntity { + public double arg1 = (double)0; + public double arg2 = (double)0; - public Arguments () - { - } // ctor + public Arguments() { + } // ctor - public Arguments (double _arg1, double _arg2) - { - arg1 = _arg1; - arg2 = _arg2; - } // ctor + public Arguments(double _arg1, double _arg2) { + arg1 = _arg1; + arg2 = _arg2; + } // ctor } // class Arguments diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHelper.java index f783920906..c47d63208f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,75 +26,69 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -abstract public class ArgumentsHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/Arguments/Arguments:1.0"; +abstract public class ArgumentsHelper { + private static String _id = + "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/Arguments/Arguments:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; + private static boolean __active = false; - private static org.omg.CORBA.TypeCode __typeCode = null; - private static boolean __active = false; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - synchronized (org.omg.CORBA.TypeCode.class) - { - if (__typeCode == null) - { - if (__active) - { - return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); - } - __active = true; - org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2]; - org.omg.CORBA.TypeCode _tcOf_members0 = null; - _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_double); - _members0[0] = new org.omg.CORBA.StructMember ( - "arg1", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_double); - _members0[1] = new org.omg.CORBA.StructMember ( - "arg2", - _tcOf_members0, - null); - __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.id (), "Arguments", _members0); - __active = false; + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + synchronized (org.omg.CORBA.TypeCode.class) { + if (__typeCode == null) { + if (__active) { + return org.omg.CORBA.ORB.init().create_recursive_tc(_id); + } + __active = true; + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; + org.omg.CORBA.TypeCode _tcOf_members0 = null; + _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_double); + _members0[0] = new org.omg.CORBA.StructMember("arg1", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_double); + _members0[1] = new org.omg.CORBA.StructMember("arg2", _tcOf_members0, null); + __typeCode = + org.omg.CORBA.ORB + .init() + .create_struct_tc(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper + .id(), + "Arguments", + _members0); + __active = false; + } + } } - } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value = new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments (); - value.arg1 = istream.read_double (); - value.arg2 = istream.read_double (); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value = + new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments(); + value.arg1 = istream.read_double(); + value.arg2 = istream.read_double(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value) - { - ostream.write_double (value.arg1); - ostream.write_double (value.arg2); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value) { + ostream.write_double(value.arg1); + ostream.write_double(value.arg2); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHolder.java index 1bf79dec8b..f767e8c11a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/ArgumentsHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class ArgumentsHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value = null; - - public ArgumentsHolder () - { - } - - public ArgumentsHolder (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.type (); - } +public final class ArgumentsHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments value = null; + + public ArgumentsHolder() { + } + + public ArgumentsHolder(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZero.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZero.java index b726168459..e7cbb4b8ca 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZero.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZero.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZero.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,29 +26,27 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class DivByZero extends org.omg.CORBA.UserException -{ - public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments arguments = null; - public String info = null; - - public DivByZero () - { - super(DivByZeroHelper.id()); - } // ctor - - public DivByZero (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments _arguments, String _info) - { - super(DivByZeroHelper.id()); - arguments = _arguments; - info = _info; - } // ctor - - - public DivByZero (String $reason, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments _arguments, String _info) - { - super(DivByZeroHelper.id() + " " + $reason); - arguments = _arguments; - info = _info; - } // ctor +public final class DivByZero extends org.omg.CORBA.UserException { + public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments arguments = null; + public String info = null; + + public DivByZero() { + super(DivByZeroHelper.id()); + } // ctor + + public DivByZero(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments _arguments, + String _info) { + super(DivByZeroHelper.id()); + arguments = _arguments; + info = _info; + } // ctor + + public DivByZero(String $reason, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.Arguments _arguments, + String _info) { + super(DivByZeroHelper.id() + " " + $reason); + arguments = _arguments; + info = _info; + } // ctor } // class DivByZero diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHelper.java index 959dffe009..5d27f9969c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,79 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -abstract public class DivByZeroHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0"; +abstract public class DivByZeroHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; + private static boolean __active = false; - private static org.omg.CORBA.TypeCode __typeCode = null; - private static boolean __active = false; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - synchronized (org.omg.CORBA.TypeCode.class) - { - if (__typeCode == null) - { - if (__active) - { - return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); - } - __active = true; - org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2]; - org.omg.CORBA.TypeCode _tcOf_members0 = null; - _tcOf_members0 = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.type (); - _members0[0] = new org.omg.CORBA.StructMember ( - "arguments", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); - _members0[1] = new org.omg.CORBA.StructMember ( - "info", - _tcOf_members0, - null); - __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.id (), "DivByZero", _members0); - __active = false; + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + synchronized (org.omg.CORBA.TypeCode.class) { + if (__typeCode == null) { + if (__active) { + return org.omg.CORBA.ORB.init().create_recursive_tc(_id); + } + __active = true; + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; + org.omg.CORBA.TypeCode _tcOf_members0 = null; + _tcOf_members0 = + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.type(); + _members0[0] = new org.omg.CORBA.StructMember("arguments", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); + _members0[1] = new org.omg.CORBA.StructMember("info", _tcOf_members0, null); + __typeCode = + org.omg.CORBA.ORB + .init() + .create_exception_tc(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper + .id(), + "DivByZero", + _members0); + __active = false; + } + } } - } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value = new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero (); - // read and discard the repository ID - istream.read_string (); - value.arguments = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.read (istream); - value.info = istream.read_string (); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value = + new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero(); + // read and discard the repository ID + istream.read_string(); + value.arguments = + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.read(istream); + value.info = istream.read_string(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value) - { - // write the repository ID - ostream.write_string (id ()); - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.write (ostream, value.arguments); - ostream.write_string (value.info); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value) { + // write the repository ID + ostream.write_string(id()); + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.ArgumentsHelper.write(ostream, + value.arguments); + ostream.write_string(value.info); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHolder.java index 03638a299b..ab01c66675 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/DivByZeroHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class DivByZeroHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value = null; - - public DivByZeroHolder () - { - } - - public DivByZeroHolder (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.type (); - } +public final class DivByZeroHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero value = null; + + public DivByZeroHolder() { + } + + public DivByZeroHolder(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupported.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupported.java index c742dee1dc..f4ea58e55e 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupported.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupported.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupported.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,26 +26,21 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class NotSupported extends org.omg.CORBA.UserException -{ - public String info = null; - - public NotSupported () - { - super(NotSupportedHelper.id()); - } // ctor +public final class NotSupported extends org.omg.CORBA.UserException { + public String info = null; - public NotSupported (String _info) - { - super(NotSupportedHelper.id()); - info = _info; - } // ctor + public NotSupported() { + super(NotSupportedHelper.id()); + } // ctor + public NotSupported(String _info) { + super(NotSupportedHelper.id()); + info = _info; + } // ctor - public NotSupported (String $reason, String _info) - { - super(NotSupportedHelper.id() + " " + $reason); - info = _info; - } // ctor + public NotSupported(String $reason, String _info) { + super(NotSupportedHelper.id() + " " + $reason); + info = _info; + } // ctor } // class NotSupported diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHelper.java index aad7784a2b..82609a36c1 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,72 +26,68 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -abstract public class NotSupportedHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/NotSupported:1.0"; +abstract public class NotSupportedHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/NotSupported:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; + private static boolean __active = false; - private static org.omg.CORBA.TypeCode __typeCode = null; - private static boolean __active = false; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - synchronized (org.omg.CORBA.TypeCode.class) - { - if (__typeCode == null) - { - if (__active) - { - return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); - } - __active = true; - org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [1]; - org.omg.CORBA.TypeCode _tcOf_members0 = null; - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); - _members0[0] = new org.omg.CORBA.StructMember ( - "info", - _tcOf_members0, - null); - __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.id (), "NotSupported", _members0); - __active = false; + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + synchronized (org.omg.CORBA.TypeCode.class) { + if (__typeCode == null) { + if (__active) { + return org.omg.CORBA.ORB.init().create_recursive_tc(_id); + } + __active = true; + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1]; + org.omg.CORBA.TypeCode _tcOf_members0 = null; + _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); + _members0[0] = new org.omg.CORBA.StructMember("info", _tcOf_members0, null); + __typeCode = + org.omg.CORBA.ORB + .init() + .create_exception_tc(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper + .id(), + "NotSupported", + _members0); + __active = false; + } + } } - } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value = new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported (); - // read and discard the repository ID - istream.read_string (); - value.info = istream.read_string (); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value = + new org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported(); + // read and discard the repository ID + istream.read_string(); + value.info = istream.read_string(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value) - { - // write the repository ID - ostream.write_string (id ()); - ostream.write_string (value.info); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value) { + // write the repository ID + ostream.write_string(id()); + ostream.write_string(value.info); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHolder.java index 191eb13309..1389bd33d9 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/CalcPackage/NotSupportedHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public final class NotSupportedHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value = null; - - public NotSupportedHolder () - { - } - - public NotSupportedHolder (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.type (); - } +public final class NotSupportedHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported value = null; + + public NotSupportedHolder() { + } + + public NotSupportedHolder(org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcImplBase.java index 474696481b..2af9c85d97 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,83 +26,76 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public abstract class _CalcImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _CalcImplBase () - { - } +public abstract class _CalcImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc, org.omg.CORBA.portable.InvokeHandler { - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("div", new java.lang.Integer (0)); - _methods.put ("divForSmallArgs", new java.lang.Integer (1)); - } + // Constructors + public _CalcImplBase() { + } - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("div", new java.lang.Integer(0)); + _methods.put("divForSmallArgs", new java.lang.Integer(1)); + } - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/div - { - try { - double arg1 = in.read_double (); - double arg2 = in.read_double (); - double $result = (double)0; - $result = this.div (arg1, arg2); - out = $rh.createReply(); - out.write_double ($result); - } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero $ex) { - out = $rh.createExceptionReply (); - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write (out, $ex); - } - break; - } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - case 1: // org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/divForSmallArgs - { - try { - double arg1 = in.read_double (); - double arg2 = in.read_double (); - double $result = (double)0; - $result = this.divForSmallArgs (arg1, arg2); - out = $rh.createReply(); - out.write_double ($result); - } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero $ex) { - out = $rh.createExceptionReply (); - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write (out, $ex); - } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported $ex) { - out = $rh.createExceptionReply (); - org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.write (out, $ex); - } - break; - } + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/div + { + try { + double arg1 = in.read_double(); + double arg2 = in.read_double(); + double $result = (double)0; + $result = this.div(arg1, arg2); + out = $rh.createReply(); + out.write_double($result); + } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero $ex) { + out = $rh.createExceptionReply(); + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write(out, $ex); + } + break; + } - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } + case 1: // org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/divForSmallArgs + { + try { + double arg1 = in.read_double(); + double arg2 = in.read_double(); + double $result = (double)0; + $result = this.divForSmallArgs(arg1, arg2); + out = $rh.createReply(); + out.write_double($result); + } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero $ex) { + out = $rh.createExceptionReply(); + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.write(out, $ex); + } catch (org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported $ex) { + out = $rh.createExceptionReply(); + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.write(out, + $ex); + } + break; + } - return out; - } // _invoke + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; + return out; + } // _invoke - public String[] _ids () - { - return (String[])__ids.clone (); - } + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _CalcImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcStub.java index 2f1db5e2f0..1682bf4780 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; - /** * org/apache/tuscany/sca/binding/corba/testing/exceptions/_CalcStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,83 +26,80 @@ package org.apache.tuscany.sca.binding.corba.testing.exceptions; * sobota, 7 czerwiec 2008 16:12:31 CEST */ -public class _CalcStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc -{ +public class _CalcStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.exceptions.Calc { - public double div (double arg1, double arg2) throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("div", true); - $out.write_double (arg1); - $out.write_double (arg2); - $in = _invoke ($out); - double $result = $in.read_double (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - if (_id.equals ("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0")) - throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read ($in); - else - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return div (arg1, arg2 ); - } finally { - _releaseReply ($in); - } - } // div + public double div(double arg1, double arg2) + throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("div", true); + $out.write_double(arg1); + $out.write_double(arg2); + $in = _invoke($out); + double $result = $in.read_double(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + if (_id.equals("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0")) + throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read($in); + else + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return div(arg1, arg2); + } finally { + _releaseReply($in); + } + } // div - public double divForSmallArgs (double arg1, double arg2) throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero, org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("divForSmallArgs", true); - $out.write_double (arg1); - $out.write_double (arg2); - $in = _invoke ($out); - double $result = $in.read_double (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - if (_id.equals ("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0")) - throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read ($in); - else if (_id.equals ("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/NotSupported:1.0")) - throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.read ($in); - else - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return divForSmallArgs (arg1, arg2 ); - } finally { - _releaseReply ($in); - } - } // divForSmallArgs + public double divForSmallArgs(double arg1, double arg2) + throws org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZero, + org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupported { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("divForSmallArgs", true); + $out.write_double(arg1); + $out.write_double(arg2); + $in = _invoke($out); + double $result = $in.read_double(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + if (_id.equals("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/DivByZero:1.0")) + throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivByZeroHelper.read($in); + else if (_id.equals("IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc/NotSupported:1.0")) + throw org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSupportedHelper.read($in); + else + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return divForSmallArgs(arg1, arg2); + } finally { + _releaseReply($in); + } + } // divForSmallArgs - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/exceptions/Calc:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _CalcStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter.java index e4c71afeb2..fde204edf8 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public interface ArraysSetter extends ArraysSetterOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface ArraysSetter extends ArraysSetterOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface ArraysSetter diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHelper.java index 5ea6faf4fc..71b4fbbdb6 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class ArraysSetterHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"; +abstract public class ArraysSetterHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.id (), "ArraysSetter"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB + .init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.id(), + "ArraysSetter"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_ArraysSetterStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_ArraysSetterStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter) - return (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter) + return (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter) - return (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter) + return (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHolder.java index c870c13f04..d758a560a9 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class ArraysSetterHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter value = null; - - public ArraysSetterHolder () - { - } - - public ArraysSetterHolder (org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.type (); - } +public final class ArraysSetterHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter value = null; + + public ArraysSetterHolder() { + } + + public ArraysSetterHolder(org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetterHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterOperations.java index 647d91c460..464c2ccbc3 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetterOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,21 +26,34 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public interface ArraysSetterOperations -{ - boolean[] setBoolean (boolean[] arg); - char[] setChar (char[] arg); - char[] setWchar (char[] arg); - byte[] setOctet (byte[] arg); - short[] setShort (short[] arg); - short[] setUnsignedShort (short[] arg); - int[] setLong (int[] arg); - int[] setUnsignedLong (int[] arg); - long[] setLongLong (long[] arg); - long[] setUnsignedLongLong (long[] arg); - float[] setFloat (float[] arg); - double[] setDouble (double[] arg); - String[] setString (String[] arg); - String[] setWstring (String[] arg); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] setRemoteObject (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] obj); +public interface ArraysSetterOperations { + boolean[] setBoolean(boolean[] arg); + + char[] setChar(char[] arg); + + char[] setWchar(char[] arg); + + byte[] setOctet(byte[] arg); + + short[] setShort(short[] arg); + + short[] setUnsignedShort(short[] arg); + + int[] setLong(int[] arg); + + int[] setUnsignedLong(int[] arg); + + long[] setLongLong(long[] arg); + + long[] setUnsignedLongLong(long[] arg); + + float[] setFloat(float[] arg); + + double[] setDouble(double[] arg); + + String[] setString(String[] arg); + + String[] setWstring(String[] arg); + + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] setRemoteObject(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] obj); } // interface ArraysSetterOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter.java index 0e1e6884e1..c053f12a02 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface PrimitivesSetter extends PrimitivesSetterOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface PrimitivesSetter extends PrimitivesSetterOperations, org.omg.CORBA.Object, + org.omg.CORBA.portable.IDLEntity { } // interface PrimitivesSetter diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHelper.java index b675f58204..566689960e 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class PrimitivesSetterHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"; +abstract public class PrimitivesSetterHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.id (), "PrimitivesSetter"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper + .id(), + "PrimitivesSetter"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_PrimitivesSetterStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_PrimitivesSetterStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter) - return (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter) + return (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter) - return (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter) + return (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHolder.java index c7f475824a..6564957081 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class PrimitivesSetterHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter value = null; - - public PrimitivesSetterHolder () - { - } - - public PrimitivesSetterHolder (org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.type (); - } +public final class PrimitivesSetterHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter value = null; + + public PrimitivesSetterHolder() { + } + + public PrimitivesSetterHolder(org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetterHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterOperations.java index bd11cbd92e..26669de95a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetterOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,21 +26,34 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface PrimitivesSetterOperations -{ - boolean setBoolean (boolean arg); - char setChar (char arg); - char setWchar (char arg); - byte setOctet (byte arg); - short setShort (short arg); - short setUnsignedShort (short arg); - int setLong (int arg); - int setUnsignedLong (int arg); - long setLongLong (long arg); - long setUnsignedLongLong (long arg); - float setFloat (float arg); - double setDouble (double arg); - String setString (String arg); - String setWstring (String arg); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject setRemoteObject (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj); +public interface PrimitivesSetterOperations { + boolean setBoolean(boolean arg); + + char setChar(char arg); + + char setWchar(char arg); + + byte setOctet(byte arg); + + short setShort(short arg); + + short setUnsignedShort(short arg); + + int setLong(int arg); + + int setUnsignedLong(int arg); + + long setLongLong(long arg); + + long setUnsignedLongLong(long arg); + + float setFloat(float arg); + + double setDouble(double arg); + + String setString(String arg); + + String setWstring(String arg); + + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject setRemoteObject(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj); } // interface PrimitivesSetterOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject.java index baa68314ba..5a140f5ecc 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface RemoteObject extends RemoteObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface RemoteObject extends RemoteObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface RemoteObject diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHelper.java index c1b8544747..2a8fe73417 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class RemoteObjectHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"; +abstract public class RemoteObjectHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.id (), "RemoteObject"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB + .init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.id(), + "RemoteObject"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_RemoteObjectStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_RemoteObjectStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject) - return (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject) + return (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject) - return (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject) + return (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._RemoteObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHolder.java index b74f00c51c..63e3926dd2 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class RemoteObjectHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value = null; - - public RemoteObjectHolder () - { - } - - public RemoteObjectHolder (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.type (); - } +public final class RemoteObjectHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value = null; + + public RemoteObjectHolder() { + } + + public RemoteObjectHolder(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectOperations.java index 82b9be81c0..a8231236eb 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObjectOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface RemoteObjectOperations -{ +public interface RemoteObjectOperations { } // interface RemoteObjectOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct.java index 42f7279aef..ca86420240 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,19 +26,16 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class SimpleStruct implements org.omg.CORBA.portable.IDLEntity -{ - public String field1 = null; - public int field2 = (int)0; +public final class SimpleStruct implements org.omg.CORBA.portable.IDLEntity { + public String field1 = null; + public int field2 = (int)0; - public SimpleStruct () - { - } // ctor + public SimpleStruct() { + } // ctor - public SimpleStruct (String _field1, int _field2) - { - field1 = _field1; - field2 = _field2; - } // ctor + public SimpleStruct(String _field1, int _field2) { + field1 = _field1; + field2 = _field2; + } // ctor } // class SimpleStruct diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHelper.java index 0335db5341..2a8898d38f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,75 +26,68 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class SimpleStructHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct/SimpleStruct:1.0"; +abstract public class SimpleStructHelper { + private static String _id = + "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStruct/SimpleStruct:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; + private static boolean __active = false; - private static org.omg.CORBA.TypeCode __typeCode = null; - private static boolean __active = false; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - synchronized (org.omg.CORBA.TypeCode.class) - { - if (__typeCode == null) - { - if (__active) - { - return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); - } - __active = true; - org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [2]; - org.omg.CORBA.TypeCode _tcOf_members0 = null; - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); - _members0[0] = new org.omg.CORBA.StructMember ( - "field1", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - _members0[1] = new org.omg.CORBA.StructMember ( - "field2", - _tcOf_members0, - null); - __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.id (), "SimpleStruct", _members0); - __active = false; + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + synchronized (org.omg.CORBA.TypeCode.class) { + if (__typeCode == null) { + if (__active) { + return org.omg.CORBA.ORB.init().create_recursive_tc(_id); + } + __active = true; + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[2]; + org.omg.CORBA.TypeCode _tcOf_members0 = null; + _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); + _members0[0] = new org.omg.CORBA.StructMember("field1", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + _members0[1] = new org.omg.CORBA.StructMember("field2", _tcOf_members0, null); + __typeCode = + org.omg.CORBA.ORB.init() + .create_struct_tc(org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper + .id(), + "SimpleStruct", + _members0); + __active = false; + } + } } - } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value = new org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct (); - value.field1 = istream.read_string (); - value.field2 = istream.read_long (); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value = + new org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct(); + value.field1 = istream.read_string(); + value.field2 = istream.read_long(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value) - { - ostream.write_string (value.field1); - ostream.write_long (value.field2); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value) { + ostream.write_string(value.field1); + ostream.write_long(value.field2); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHolder.java index 1f597ab430..bed30e00ca 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SimpleStructHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class SimpleStructHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value = null; - - public SimpleStructHolder () - { - } - - public SimpleStructHolder (org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.type (); - } +public final class SimpleStructHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct value = null; + + public SimpleStructHolder() { + } + + public SimpleStructHolder(org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct.java index 253eb6c892..73dbd6c198 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,25 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class SomeStruct implements org.omg.CORBA.portable.IDLEntity -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct innerStruct = null; - public String str = null; - public String str_list[] = null; - public int twoDimSeq[][] = null; - public int threeDimSeq[][][] = null; +public final class SomeStruct implements org.omg.CORBA.portable.IDLEntity { + public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct innerStruct = null; + public String str = null; + public String str_list[] = null; + public int twoDimSeq[][] = null; + public int threeDimSeq[][][] = null; - public SomeStruct () - { - } // ctor + public SomeStruct() { + } // ctor - public SomeStruct (org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct _innerStruct, String _str, String[] _str_list, int[][] _twoDimSeq, int[][][] _threeDimSeq) - { - innerStruct = _innerStruct; - str = _str; - str_list = _str_list; - twoDimSeq = _twoDimSeq; - threeDimSeq = _threeDimSeq; - } // ctor + public SomeStruct(org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct _innerStruct, + String _str, + String[] _str_list, + int[][] _twoDimSeq, + int[][][] _threeDimSeq) { + innerStruct = _innerStruct; + str = _str; + str_list = _str_list; + twoDimSeq = _twoDimSeq; + threeDimSeq = _threeDimSeq; + } // ctor } // class SomeStruct diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHelper.java index 70af7bf820..8f524ffeb1 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,108 +26,121 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class SomeStructHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct/SomeStruct:1.0"; +abstract public class SomeStructHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/SomeStruct/SomeStruct:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; + private static boolean __active = false; - private static org.omg.CORBA.TypeCode __typeCode = null; - private static boolean __active = false; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - synchronized (org.omg.CORBA.TypeCode.class) - { - if (__typeCode == null) - { - if (__active) - { - return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); - } - __active = true; - org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [5]; - org.omg.CORBA.TypeCode _tcOf_members0 = null; - _tcOf_members0 = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.type (); - _members0[0] = new org.omg.CORBA.StructMember ( - "innerStruct", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); - _members0[1] = new org.omg.CORBA.StructMember ( - "str", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.id (), "string_list", _tcOf_members0); - _members0[2] = new org.omg.CORBA.StructMember ( - "str_list", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id (), "long_seq1", _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id (), "long_seq2", _tcOf_members0); - _members0[3] = new org.omg.CORBA.StructMember ( - "twoDimSeq", - _tcOf_members0, - null); - _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id (), "long_seq1", _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id (), "long_seq2", _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_sequence_tc (0, _tcOf_members0); - _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.id (), "long_seq3", _tcOf_members0); - _members0[4] = new org.omg.CORBA.StructMember ( - "threeDimSeq", - _tcOf_members0, - null); - __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.id (), "SomeStruct", _members0); - __active = false; + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + synchronized (org.omg.CORBA.TypeCode.class) { + if (__typeCode == null) { + if (__active) { + return org.omg.CORBA.ORB.init().create_recursive_tc(_id); + } + __active = true; + org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[5]; + org.omg.CORBA.TypeCode _tcOf_members0 = null; + _tcOf_members0 = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.type(); + _members0[0] = new org.omg.CORBA.StructMember("innerStruct", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); + _members0[1] = new org.omg.CORBA.StructMember("str", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_string_tc(0); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper + .id(), + "string_list", + _tcOf_members0); + _members0[2] = new org.omg.CORBA.StructMember("str_list", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper + .id(), + "long_seq1", + _tcOf_members0); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper + .id(), + "long_seq2", + _tcOf_members0); + _members0[3] = new org.omg.CORBA.StructMember("twoDimSeq", _tcOf_members0, null); + _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper + .id(), + "long_seq1", + _tcOf_members0); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper + .id(), + "long_seq2", + _tcOf_members0); + _tcOf_members0 = org.omg.CORBA.ORB.init().create_sequence_tc(0, _tcOf_members0); + _tcOf_members0 = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper + .id(), + "long_seq3", + _tcOf_members0); + _members0[4] = new org.omg.CORBA.StructMember("threeDimSeq", _tcOf_members0, null); + __typeCode = + org.omg.CORBA.ORB.init() + .create_struct_tc(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper + .id(), + "SomeStruct", + _members0); + __active = false; + } + } } - } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value = new org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct (); - value.innerStruct = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read (istream); - value.str = istream.read_string (); - value.str_list = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read (istream); - value.twoDimSeq = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read (istream); - value.threeDimSeq = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read (istream); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value = + new org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct(); + value.innerStruct = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read(istream); + value.str = istream.read_string(); + value.str_list = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read(istream); + value.twoDimSeq = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read(istream); + value.threeDimSeq = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read(istream); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value) - { - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write (ostream, value.innerStruct); - ostream.write_string (value.str); - org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write (ostream, value.str_list); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write (ostream, value.twoDimSeq); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write (ostream, value.threeDimSeq); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value) { + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write(ostream, value.innerStruct); + ostream.write_string(value.str); + org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write(ostream, value.str_list); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write(ostream, value.twoDimSeq); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write(ostream, value.threeDimSeq); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHolder.java index 28e0673c54..3231a136dc 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/SomeStructHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class SomeStructHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value = null; - - public SomeStructHolder () - { - } - - public SomeStructHolder (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.type (); - } +public final class SomeStructHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct value = null; + + public SomeStructHolder() { + } + + public SomeStructHolder(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObject.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObject.java index 121700cdec..28d3ecdc91 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObject.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObject.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/TestObject.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface TestObject extends TestObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface TestObject extends TestObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface TestObject diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHelper.java index a707dbc06b..29ff2edfd2 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,74 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class TestObjectHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"; +abstract public class TestObjectHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.TestObject that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.TestObject that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.id (), "TestObject"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.id(), + "TestObject"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_TestObjectStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_TestObjectStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.TestObject value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.TestObject value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.TestObject) - return (org.apache.tuscany.sca.binding.corba.testing.generated.TestObject)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.TestObject) + return (org.apache.tuscany.sca.binding.corba.testing.generated.TestObject)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.TestObject) - return (org.apache.tuscany.sca.binding.corba.testing.generated.TestObject)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.generated.TestObject unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.generated.TestObject) + return (org.apache.tuscany.sca.binding.corba.testing.generated.TestObject)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.generated._TestObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHolder.java index ae9b343072..b8aea13c8d 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class TestObjectHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.TestObject value = null; - - public TestObjectHolder () - { - } - - public TestObjectHolder (org.apache.tuscany.sca.binding.corba.testing.generated.TestObject initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.type (); - } +public final class TestObjectHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.TestObject value = null; + + public TestObjectHolder() { + } + + public TestObjectHolder(org.apache.tuscany.sca.binding.corba.testing.generated.TestObject initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.TestObjectHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectOperations.java index 534297c96e..0bacb6746a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/TestObjectOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,12 +26,19 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public interface TestObjectOperations -{ - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct pickStructFromArgs (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3, int structNumber); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct setStruct (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct setSimpleStruct (org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg); - int[] setLongSeq1 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg); - int[][] setLongSeq2 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg); - int[][][] setLongSeq3 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg); +public interface TestObjectOperations { + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct pickStructFromArgs(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3, + int structNumber); + + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct setStruct(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg); + + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct setSimpleStruct(org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg); + + int[] setLongSeq1(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg); + + int[][] setLongSeq2(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg); + + int[][][] setLongSeq3(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg); } // interface TestObjectOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterImplBase.java index eabb25bf4c..a4b7fcf72f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,211 +26,206 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public abstract class _ArraysSetterImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _ArraysSetterImplBase () - { - } - - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("setBoolean", new java.lang.Integer (0)); - _methods.put ("setChar", new java.lang.Integer (1)); - _methods.put ("setWchar", new java.lang.Integer (2)); - _methods.put ("setOctet", new java.lang.Integer (3)); - _methods.put ("setShort", new java.lang.Integer (4)); - _methods.put ("setUnsignedShort", new java.lang.Integer (5)); - _methods.put ("setLong", new java.lang.Integer (6)); - _methods.put ("setUnsignedLong", new java.lang.Integer (7)); - _methods.put ("setLongLong", new java.lang.Integer (8)); - _methods.put ("setUnsignedLongLong", new java.lang.Integer (9)); - _methods.put ("setFloat", new java.lang.Integer (10)); - _methods.put ("setDouble", new java.lang.Integer (11)); - _methods.put ("setString", new java.lang.Integer (12)); - _methods.put ("setWstring", new java.lang.Integer (13)); - _methods.put ("setRemoteObject", new java.lang.Integer (14)); - } - - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setBoolean - { - boolean arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read (in); - boolean $result[] = null; - $result = this.setBoolean (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write (out, $result); - break; - } - - case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setChar - { - char arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read (in); - char $result[] = null; - $result = this.setChar (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write (out, $result); - break; - } - - case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setWchar - { - char arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read (in); - char $result[] = null; - $result = this.setWchar (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write (out, $result); - break; - } - - case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setOctet - { - byte arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read (in); - byte $result[] = null; - $result = this.setOctet (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write (out, $result); - break; - } - - case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setShort - { - short arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read (in); - short $result[] = null; - $result = this.setShort (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write (out, $result); - break; - } - - case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedShort - { - short arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read (in); - short $result[] = null; - $result = this.setUnsignedShort (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write (out, $result); - break; - } - - case 6: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setLong - { - int arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read (in); - int $result[] = null; - $result = this.setLong (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write (out, $result); - break; - } - - case 7: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedLong - { - int arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read (in); - int $result[] = null; - $result = this.setUnsignedLong (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write (out, $result); - break; - } - - case 8: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setLongLong - { - long arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read (in); - long $result[] = null; - $result = this.setLongLong (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write (out, $result); - break; - } - - case 9: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedLongLong - { - long arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read (in); - long $result[] = null; - $result = this.setUnsignedLongLong (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.write (out, $result); - break; - } - - case 10: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setFloat - { - float arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read (in); - float $result[] = null; - $result = this.setFloat (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write (out, $result); - break; - } - - case 11: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setDouble - { - double arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read (in); - double $result[] = null; - $result = this.setDouble (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write (out, $result); - break; - } - - case 12: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setString - { - String arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read (in); - String $result[] = null; - $result = this.setString (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write (out, $result); - break; - } - - case 13: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setWstring - { - String arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read (in); - String $result[] = null; - $result = this.setWstring (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write (out, $result); - break; - } - - case 14: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setRemoteObject - { - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj[] = org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result[] = null; - $result = this.setRemoteObject (obj); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write (out, $result); - break; - } - - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } - - return out; - } // _invoke +public abstract class _ArraysSetterImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter, org.omg.CORBA.portable.InvokeHandler { - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"}; + // Constructors + public _ArraysSetterImplBase() { + } - public String[] _ids () - { - return (String[])__ids.clone (); - } + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("setBoolean", new java.lang.Integer(0)); + _methods.put("setChar", new java.lang.Integer(1)); + _methods.put("setWchar", new java.lang.Integer(2)); + _methods.put("setOctet", new java.lang.Integer(3)); + _methods.put("setShort", new java.lang.Integer(4)); + _methods.put("setUnsignedShort", new java.lang.Integer(5)); + _methods.put("setLong", new java.lang.Integer(6)); + _methods.put("setUnsignedLong", new java.lang.Integer(7)); + _methods.put("setLongLong", new java.lang.Integer(8)); + _methods.put("setUnsignedLongLong", new java.lang.Integer(9)); + _methods.put("setFloat", new java.lang.Integer(10)); + _methods.put("setDouble", new java.lang.Integer(11)); + _methods.put("setString", new java.lang.Integer(12)); + _methods.put("setWstring", new java.lang.Integer(13)); + _methods.put("setRemoteObject", new java.lang.Integer(14)); + } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setBoolean + { + boolean arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read(in); + boolean $result[] = null; + $result = this.setBoolean(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write(out, $result); + break; + } + + case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setChar + { + char arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read(in); + char $result[] = null; + $result = this.setChar(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write(out, $result); + break; + } + + case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setWchar + { + char arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read(in); + char $result[] = null; + $result = this.setWchar(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write(out, $result); + break; + } + + case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setOctet + { + byte arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read(in); + byte $result[] = null; + $result = this.setOctet(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write(out, $result); + break; + } + + case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setShort + { + short arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read(in); + short $result[] = null; + $result = this.setShort(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write(out, $result); + break; + } + + case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedShort + { + short arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read(in); + short $result[] = null; + $result = this.setUnsignedShort(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write(out, $result); + break; + } + + case 6: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setLong + { + int arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read(in); + int $result[] = null; + $result = this.setLong(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write(out, $result); + break; + } + + case 7: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedLong + { + int arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read(in); + int $result[] = null; + $result = this.setUnsignedLong(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write(out, $result); + break; + } + + case 8: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setLongLong + { + long arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read(in); + long $result[] = null; + $result = this.setLongLong(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write(out, $result); + break; + } + + case 9: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setUnsignedLongLong + { + long arg[] = + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read(in); + long $result[] = null; + $result = this.setUnsignedLongLong(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper + .write(out, $result); + break; + } + + case 10: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setFloat + { + float arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read(in); + float $result[] = null; + $result = this.setFloat(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write(out, $result); + break; + } + + case 11: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setDouble + { + double arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read(in); + double $result[] = null; + $result = this.setDouble(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write(out, $result); + break; + } + + case 12: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setString + { + String arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read(in); + String $result[] = null; + $result = this.setString(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write(out, $result); + break; + } + + case 13: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setWstring + { + String arg[] = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read(in); + String $result[] = null; + $result = this.setWstring(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write(out, $result); + break; + } + + case 14: // org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter/setRemoteObject + { + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj[] = + org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result[] = null; + $result = this.setRemoteObject(obj); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write(out, $result); + break; + } + + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } + + return out; + } // _invoke + + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"}; + + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _ArraysSetterImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterStub.java index 1bdfb41d19..5bb715fbe1 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_ArraysSetterStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,333 +26,317 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public class _ArraysSetterStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter -{ +public class _ArraysSetterStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.ArraysSetter { - public boolean[] setBoolean (boolean[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setBoolean", true); - org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write ($out, arg); - $in = _invoke ($out); - boolean $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setBoolean (arg ); - } finally { - _releaseReply ($in); - } - } // setBoolean + public boolean[] setBoolean(boolean[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setBoolean", true); + org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write($out, arg); + $in = _invoke($out); + boolean $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setBoolean(arg); + } finally { + _releaseReply($in); + } + } // setBoolean - public char[] setChar (char[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setChar", true); - org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write ($out, arg); - $in = _invoke ($out); - char $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setChar (arg ); - } finally { - _releaseReply ($in); - } - } // setChar + public char[] setChar(char[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setChar", true); + org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write($out, arg); + $in = _invoke($out); + char $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setChar(arg); + } finally { + _releaseReply($in); + } + } // setChar - public char[] setWchar (char[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setWchar", true); - org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write ($out, arg); - $in = _invoke ($out); - char $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setWchar (arg ); - } finally { - _releaseReply ($in); - } - } // setWchar + public char[] setWchar(char[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setWchar", true); + org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write($out, arg); + $in = _invoke($out); + char $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setWchar(arg); + } finally { + _releaseReply($in); + } + } // setWchar - public byte[] setOctet (byte[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setOctet", true); - org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write ($out, arg); - $in = _invoke ($out); - byte $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setOctet (arg ); - } finally { - _releaseReply ($in); - } - } // setOctet + public byte[] setOctet(byte[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setOctet", true); + org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write($out, arg); + $in = _invoke($out); + byte $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setOctet(arg); + } finally { + _releaseReply($in); + } + } // setOctet - public short[] setShort (short[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setShort", true); - org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write ($out, arg); - $in = _invoke ($out); - short $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setShort (arg ); - } finally { - _releaseReply ($in); - } - } // setShort + public short[] setShort(short[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setShort", true); + org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write($out, arg); + $in = _invoke($out); + short $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setShort(arg); + } finally { + _releaseReply($in); + } + } // setShort - public short[] setUnsignedShort (short[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedShort", true); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write ($out, arg); - $in = _invoke ($out); - short $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedShort (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedShort + public short[] setUnsignedShort(short[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedShort", true); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write($out, arg); + $in = _invoke($out); + short $result[] = + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedShort(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedShort - public int[] setLong (int[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLong", true); - org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write ($out, arg); - $in = _invoke ($out); - int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLong (arg ); - } finally { - _releaseReply ($in); - } - } // setLong + public int[] setLong(int[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLong", true); + org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write($out, arg); + $in = _invoke($out); + int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLong(arg); + } finally { + _releaseReply($in); + } + } // setLong - public int[] setUnsignedLong (int[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedLong", true); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write ($out, arg); - $in = _invoke ($out); - int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedLong (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedLong + public int[] setUnsignedLong(int[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedLong", true); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write($out, arg); + $in = _invoke($out); + int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedLong(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedLong - public long[] setLongLong (long[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLongLong", true); - org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write ($out, arg); - $in = _invoke ($out); - long $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLongLong (arg ); - } finally { - _releaseReply ($in); - } - } // setLongLong + public long[] setLongLong(long[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLongLong", true); + org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write($out, arg); + $in = _invoke($out); + long $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLongLong(arg); + } finally { + _releaseReply($in); + } + } // setLongLong - public long[] setUnsignedLongLong (long[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedLongLong", true); - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.write ($out, arg); - $in = _invoke ($out); - long $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedLongLong (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedLongLong + public long[] setUnsignedLongLong(long[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedLongLong", true); + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.write($out, arg); + $in = _invoke($out); + long $result[] = + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedLongLong(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedLongLong - public float[] setFloat (float[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setFloat", true); - org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write ($out, arg); - $in = _invoke ($out); - float $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setFloat (arg ); - } finally { - _releaseReply ($in); - } - } // setFloat + public float[] setFloat(float[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setFloat", true); + org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write($out, arg); + $in = _invoke($out); + float $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setFloat(arg); + } finally { + _releaseReply($in); + } + } // setFloat - public double[] setDouble (double[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setDouble", true); - org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write ($out, arg); - $in = _invoke ($out); - double $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setDouble (arg ); - } finally { - _releaseReply ($in); - } - } // setDouble + public double[] setDouble(double[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setDouble", true); + org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write($out, arg); + $in = _invoke($out); + double $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setDouble(arg); + } finally { + _releaseReply($in); + } + } // setDouble - public String[] setString (String[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setString", true); - org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write ($out, arg); - $in = _invoke ($out); - String $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setString (arg ); - } finally { - _releaseReply ($in); - } - } // setString + public String[] setString(String[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setString", true); + org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write($out, arg); + $in = _invoke($out); + String $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setString(arg); + } finally { + _releaseReply($in); + } + } // setString - public String[] setWstring (String[] arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setWstring", true); - org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write ($out, arg); - $in = _invoke ($out); - String $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setWstring (arg ); - } finally { - _releaseReply ($in); - } - } // setWstring + public String[] setWstring(String[] arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setWstring", true); + org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write($out, arg); + $in = _invoke($out); + String $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setWstring(arg); + } finally { + _releaseReply($in); + } + } // setWstring - public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] setRemoteObject (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] obj) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setRemoteObject", true); - org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write ($out, obj); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setRemoteObject (obj ); - } finally { - _releaseReply ($in); - } - } // setRemoteObject + public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] setRemoteObject(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] obj) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setRemoteObject", true); + org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write($out, obj); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result[] = + org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setRemoteObject(obj); + } finally { + _releaseReply($in); + } + } // setRemoteObject - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/ArraysSetter:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _ArraysSetterStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterImplBase.java index 8b6330bd48..b5083ecb4a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,211 +26,204 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public abstract class _PrimitivesSetterImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _PrimitivesSetterImplBase () - { - } - - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("setBoolean", new java.lang.Integer (0)); - _methods.put ("setChar", new java.lang.Integer (1)); - _methods.put ("setWchar", new java.lang.Integer (2)); - _methods.put ("setOctet", new java.lang.Integer (3)); - _methods.put ("setShort", new java.lang.Integer (4)); - _methods.put ("setUnsignedShort", new java.lang.Integer (5)); - _methods.put ("setLong", new java.lang.Integer (6)); - _methods.put ("setUnsignedLong", new java.lang.Integer (7)); - _methods.put ("setLongLong", new java.lang.Integer (8)); - _methods.put ("setUnsignedLongLong", new java.lang.Integer (9)); - _methods.put ("setFloat", new java.lang.Integer (10)); - _methods.put ("setDouble", new java.lang.Integer (11)); - _methods.put ("setString", new java.lang.Integer (12)); - _methods.put ("setWstring", new java.lang.Integer (13)); - _methods.put ("setRemoteObject", new java.lang.Integer (14)); - } - - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setBoolean - { - boolean arg = in.read_boolean (); - boolean $result = false; - $result = this.setBoolean (arg); - out = $rh.createReply(); - out.write_boolean ($result); - break; - } - - case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setChar - { - char arg = in.read_char (); - char $result = (char)0; - $result = this.setChar (arg); - out = $rh.createReply(); - out.write_char ($result); - break; - } - - case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setWchar - { - char arg = in.read_wchar (); - char $result = (char)0; - $result = this.setWchar (arg); - out = $rh.createReply(); - out.write_wchar ($result); - break; - } - - case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setOctet - { - byte arg = in.read_octet (); - byte $result = (byte)0; - $result = this.setOctet (arg); - out = $rh.createReply(); - out.write_octet ($result); - break; - } - - case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setShort - { - short arg = in.read_short (); - short $result = (short)0; - $result = this.setShort (arg); - out = $rh.createReply(); - out.write_short ($result); - break; - } - - case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedShort - { - short arg = in.read_ushort (); - short $result = (short)0; - $result = this.setUnsignedShort (arg); - out = $rh.createReply(); - out.write_ushort ($result); - break; - } - - case 6: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setLong - { - int arg = in.read_long (); - int $result = (int)0; - $result = this.setLong (arg); - out = $rh.createReply(); - out.write_long ($result); - break; - } - - case 7: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedLong - { - int arg = in.read_ulong (); - int $result = (int)0; - $result = this.setUnsignedLong (arg); - out = $rh.createReply(); - out.write_ulong ($result); - break; - } - - case 8: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setLongLong - { - long arg = in.read_longlong (); - long $result = (long)0; - $result = this.setLongLong (arg); - out = $rh.createReply(); - out.write_longlong ($result); - break; - } - - case 9: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedLongLong - { - long arg = in.read_ulonglong (); - long $result = (long)0; - $result = this.setUnsignedLongLong (arg); - out = $rh.createReply(); - out.write_ulonglong ($result); - break; - } - - case 10: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setFloat - { - float arg = in.read_float (); - float $result = (float)0; - $result = this.setFloat (arg); - out = $rh.createReply(); - out.write_float ($result); - break; - } - - case 11: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setDouble - { - double arg = in.read_double (); - double $result = (double)0; - $result = this.setDouble (arg); - out = $rh.createReply(); - out.write_double ($result); - break; - } - - case 12: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setString - { - String arg = in.read_string (); - String $result = null; - $result = this.setString (arg); - out = $rh.createReply(); - out.write_string ($result); - break; - } - - case 13: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setWstring - { - String arg = in.read_wstring (); - String $result = null; - $result = this.setWstring (arg); - out = $rh.createReply(); - out.write_wstring ($result); - break; - } - - case 14: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setRemoteObject - { - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result = null; - $result = this.setRemoteObject (obj); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write (out, $result); - break; - } - - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } - - return out; - } // _invoke +public abstract class _PrimitivesSetterImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter, org.omg.CORBA.portable.InvokeHandler { - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"}; + // Constructors + public _PrimitivesSetterImplBase() { + } - public String[] _ids () - { - return (String[])__ids.clone (); - } + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("setBoolean", new java.lang.Integer(0)); + _methods.put("setChar", new java.lang.Integer(1)); + _methods.put("setWchar", new java.lang.Integer(2)); + _methods.put("setOctet", new java.lang.Integer(3)); + _methods.put("setShort", new java.lang.Integer(4)); + _methods.put("setUnsignedShort", new java.lang.Integer(5)); + _methods.put("setLong", new java.lang.Integer(6)); + _methods.put("setUnsignedLong", new java.lang.Integer(7)); + _methods.put("setLongLong", new java.lang.Integer(8)); + _methods.put("setUnsignedLongLong", new java.lang.Integer(9)); + _methods.put("setFloat", new java.lang.Integer(10)); + _methods.put("setDouble", new java.lang.Integer(11)); + _methods.put("setString", new java.lang.Integer(12)); + _methods.put("setWstring", new java.lang.Integer(13)); + _methods.put("setRemoteObject", new java.lang.Integer(14)); + } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setBoolean + { + boolean arg = in.read_boolean(); + boolean $result = false; + $result = this.setBoolean(arg); + out = $rh.createReply(); + out.write_boolean($result); + break; + } + + case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setChar + { + char arg = in.read_char(); + char $result = (char)0; + $result = this.setChar(arg); + out = $rh.createReply(); + out.write_char($result); + break; + } + + case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setWchar + { + char arg = in.read_wchar(); + char $result = (char)0; + $result = this.setWchar(arg); + out = $rh.createReply(); + out.write_wchar($result); + break; + } + + case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setOctet + { + byte arg = in.read_octet(); + byte $result = (byte)0; + $result = this.setOctet(arg); + out = $rh.createReply(); + out.write_octet($result); + break; + } + + case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setShort + { + short arg = in.read_short(); + short $result = (short)0; + $result = this.setShort(arg); + out = $rh.createReply(); + out.write_short($result); + break; + } + + case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedShort + { + short arg = in.read_ushort(); + short $result = (short)0; + $result = this.setUnsignedShort(arg); + out = $rh.createReply(); + out.write_ushort($result); + break; + } + + case 6: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setLong + { + int arg = in.read_long(); + int $result = (int)0; + $result = this.setLong(arg); + out = $rh.createReply(); + out.write_long($result); + break; + } + + case 7: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedLong + { + int arg = in.read_ulong(); + int $result = (int)0; + $result = this.setUnsignedLong(arg); + out = $rh.createReply(); + out.write_ulong($result); + break; + } + + case 8: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setLongLong + { + long arg = in.read_longlong(); + long $result = (long)0; + $result = this.setLongLong(arg); + out = $rh.createReply(); + out.write_longlong($result); + break; + } + + case 9: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setUnsignedLongLong + { + long arg = in.read_ulonglong(); + long $result = (long)0; + $result = this.setUnsignedLongLong(arg); + out = $rh.createReply(); + out.write_ulonglong($result); + break; + } + + case 10: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setFloat + { + float arg = in.read_float(); + float $result = (float)0; + $result = this.setFloat(arg); + out = $rh.createReply(); + out.write_float($result); + break; + } + + case 11: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setDouble + { + double arg = in.read_double(); + double $result = (double)0; + $result = this.setDouble(arg); + out = $rh.createReply(); + out.write_double($result); + break; + } + + case 12: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setString + { + String arg = in.read_string(); + String $result = null; + $result = this.setString(arg); + out = $rh.createReply(); + out.write_string($result); + break; + } + + case 13: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setWstring + { + String arg = in.read_wstring(); + String $result = null; + $result = this.setWstring(arg); + out = $rh.createReply(); + out.write_wstring($result); + break; + } + + case 14: // org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter/setRemoteObject + { + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj = + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result = null; + $result = this.setRemoteObject(obj); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write(out, $result); + break; + } + + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } + + return out; + } // _invoke + + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"}; + + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _PrimitivesSetterImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterStub.java index d61157a5bc..ef1ec8c91b 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_PrimitivesSetterStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,333 +26,315 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public class _PrimitivesSetterStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter -{ +public class _PrimitivesSetterStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.PrimitivesSetter { - public boolean setBoolean (boolean arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setBoolean", true); - $out.write_boolean (arg); - $in = _invoke ($out); - boolean $result = $in.read_boolean (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setBoolean (arg ); - } finally { - _releaseReply ($in); - } - } // setBoolean + public boolean setBoolean(boolean arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setBoolean", true); + $out.write_boolean(arg); + $in = _invoke($out); + boolean $result = $in.read_boolean(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setBoolean(arg); + } finally { + _releaseReply($in); + } + } // setBoolean - public char setChar (char arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setChar", true); - $out.write_char (arg); - $in = _invoke ($out); - char $result = $in.read_char (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setChar (arg ); - } finally { - _releaseReply ($in); - } - } // setChar + public char setChar(char arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setChar", true); + $out.write_char(arg); + $in = _invoke($out); + char $result = $in.read_char(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setChar(arg); + } finally { + _releaseReply($in); + } + } // setChar - public char setWchar (char arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setWchar", true); - $out.write_wchar (arg); - $in = _invoke ($out); - char $result = $in.read_wchar (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setWchar (arg ); - } finally { - _releaseReply ($in); - } - } // setWchar + public char setWchar(char arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setWchar", true); + $out.write_wchar(arg); + $in = _invoke($out); + char $result = $in.read_wchar(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setWchar(arg); + } finally { + _releaseReply($in); + } + } // setWchar - public byte setOctet (byte arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setOctet", true); - $out.write_octet (arg); - $in = _invoke ($out); - byte $result = $in.read_octet (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setOctet (arg ); - } finally { - _releaseReply ($in); - } - } // setOctet + public byte setOctet(byte arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setOctet", true); + $out.write_octet(arg); + $in = _invoke($out); + byte $result = $in.read_octet(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setOctet(arg); + } finally { + _releaseReply($in); + } + } // setOctet - public short setShort (short arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setShort", true); - $out.write_short (arg); - $in = _invoke ($out); - short $result = $in.read_short (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setShort (arg ); - } finally { - _releaseReply ($in); - } - } // setShort + public short setShort(short arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setShort", true); + $out.write_short(arg); + $in = _invoke($out); + short $result = $in.read_short(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setShort(arg); + } finally { + _releaseReply($in); + } + } // setShort - public short setUnsignedShort (short arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedShort", true); - $out.write_ushort (arg); - $in = _invoke ($out); - short $result = $in.read_ushort (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedShort (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedShort + public short setUnsignedShort(short arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedShort", true); + $out.write_ushort(arg); + $in = _invoke($out); + short $result = $in.read_ushort(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedShort(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedShort - public int setLong (int arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLong", true); - $out.write_long (arg); - $in = _invoke ($out); - int $result = $in.read_long (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLong (arg ); - } finally { - _releaseReply ($in); - } - } // setLong + public int setLong(int arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLong", true); + $out.write_long(arg); + $in = _invoke($out); + int $result = $in.read_long(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLong(arg); + } finally { + _releaseReply($in); + } + } // setLong - public int setUnsignedLong (int arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedLong", true); - $out.write_ulong (arg); - $in = _invoke ($out); - int $result = $in.read_ulong (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedLong (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedLong + public int setUnsignedLong(int arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedLong", true); + $out.write_ulong(arg); + $in = _invoke($out); + int $result = $in.read_ulong(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedLong(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedLong - public long setLongLong (long arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLongLong", true); - $out.write_longlong (arg); - $in = _invoke ($out); - long $result = $in.read_longlong (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLongLong (arg ); - } finally { - _releaseReply ($in); - } - } // setLongLong + public long setLongLong(long arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLongLong", true); + $out.write_longlong(arg); + $in = _invoke($out); + long $result = $in.read_longlong(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLongLong(arg); + } finally { + _releaseReply($in); + } + } // setLongLong - public long setUnsignedLongLong (long arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setUnsignedLongLong", true); - $out.write_ulonglong (arg); - $in = _invoke ($out); - long $result = $in.read_ulonglong (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setUnsignedLongLong (arg ); - } finally { - _releaseReply ($in); - } - } // setUnsignedLongLong + public long setUnsignedLongLong(long arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setUnsignedLongLong", true); + $out.write_ulonglong(arg); + $in = _invoke($out); + long $result = $in.read_ulonglong(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setUnsignedLongLong(arg); + } finally { + _releaseReply($in); + } + } // setUnsignedLongLong - public float setFloat (float arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setFloat", true); - $out.write_float (arg); - $in = _invoke ($out); - float $result = $in.read_float (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setFloat (arg ); - } finally { - _releaseReply ($in); - } - } // setFloat + public float setFloat(float arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setFloat", true); + $out.write_float(arg); + $in = _invoke($out); + float $result = $in.read_float(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setFloat(arg); + } finally { + _releaseReply($in); + } + } // setFloat - public double setDouble (double arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setDouble", true); - $out.write_double (arg); - $in = _invoke ($out); - double $result = $in.read_double (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setDouble (arg ); - } finally { - _releaseReply ($in); - } - } // setDouble + public double setDouble(double arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setDouble", true); + $out.write_double(arg); + $in = _invoke($out); + double $result = $in.read_double(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setDouble(arg); + } finally { + _releaseReply($in); + } + } // setDouble - public String setString (String arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setString", true); - $out.write_string (arg); - $in = _invoke ($out); - String $result = $in.read_string (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setString (arg ); - } finally { - _releaseReply ($in); - } - } // setString + public String setString(String arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setString", true); + $out.write_string(arg); + $in = _invoke($out); + String $result = $in.read_string(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setString(arg); + } finally { + _releaseReply($in); + } + } // setString - public String setWstring (String arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setWstring", true); - $out.write_wstring (arg); - $in = _invoke ($out); - String $result = $in.read_wstring (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setWstring (arg ); - } finally { - _releaseReply ($in); - } - } // setWstring + public String setWstring(String arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setWstring", true); + $out.write_wstring(arg); + $in = _invoke($out); + String $result = $in.read_wstring(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setWstring(arg); + } finally { + _releaseReply($in); + } + } // setWstring - public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject setRemoteObject (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setRemoteObject", true); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write ($out, obj); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setRemoteObject (obj ); - } finally { - _releaseReply ($in); - } - } // setRemoteObject + public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject setRemoteObject(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject obj) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setRemoteObject", true); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write($out, obj); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject $result = + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setRemoteObject(obj); + } finally { + _releaseReply($in); + } + } // setRemoteObject - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/PrimitivesSetter:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _PrimitivesSetterStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectImplBase.java index 2a577a20e3..50e2078f9c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,40 +26,33 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public abstract class _RemoteObjectImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _RemoteObjectImplBase () - { - } +public abstract class _RemoteObjectImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject, org.omg.CORBA.portable.InvokeHandler { - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - } + // Constructors + public _RemoteObjectImplBase() { + } - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + } - return out; - } // _invoke + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"}; + return out; + } // _invoke - public String[] _ids () - { - return (String[])__ids.clone (); - } + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"}; + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _RemoteObjectImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectStub.java index f01e4fdffa..45c5ca3324 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_RemoteObjectStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,33 +26,29 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public class _RemoteObjectStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject -{ - - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"}; - - public String[] _ids () - { - return (String[])__ids.clone (); - } - - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } - - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } +public class _RemoteObjectStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject { + + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/RemoteObject:1.0"}; + + public String[] _ids() { + return (String[])__ids.clone(); + } + + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } + + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _RemoteObjectStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectImplBase.java index 3f55d95c02..25d1fad289 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,123 +26,123 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public abstract class _TestObjectImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.generated.TestObject, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _TestObjectImplBase () - { - } - - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("pickStructFromArgs", new java.lang.Integer (0)); - _methods.put ("setStruct", new java.lang.Integer (1)); - _methods.put ("setSimpleStruct", new java.lang.Integer (2)); - _methods.put ("setLongSeq1", new java.lang.Integer (3)); - _methods.put ("setLongSeq2", new java.lang.Integer (4)); - _methods.put ("setLongSeq3", new java.lang.Integer (5)); - } - - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/pickStructFromArgs - { - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1 = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2 = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3 = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read (in); - int structNumber = in.read_long (); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = null; - $result = this.pickStructFromArgs (arg1, arg2, arg3, structNumber); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write (out, $result); - break; - } - - case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setStruct - { - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = null; - $result = this.setStruct (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write (out, $result); - break; - } - - case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setSimpleStruct - { - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg = new org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder (); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct $result = null; - $result = this.setSimpleStruct (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write (out, $result); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write (out, arg.value); - break; - } - - case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq1 - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg = new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder (); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read (in); - int $result[] = null; - $result = this.setLongSeq1 (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write (out, $result); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write (out, arg.value); - break; - } - - case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq2 - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg = new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder (); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read (in); - int $result[][] = null; - $result = this.setLongSeq2 (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write (out, $result); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write (out, arg.value); - break; - } - - case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq3 - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg = new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder (); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read (in); - int $result[][][] = null; - $result = this.setLongSeq3 (arg); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write (out, $result); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write (out, arg.value); - break; - } - - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } - - return out; - } // _invoke +public abstract class _TestObjectImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.TestObject, org.omg.CORBA.portable.InvokeHandler { - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + // Constructors + public _TestObjectImplBase() { + } - public String[] _ids () - { - return (String[])__ids.clone (); - } + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("pickStructFromArgs", new java.lang.Integer(0)); + _methods.put("setStruct", new java.lang.Integer(1)); + _methods.put("setSimpleStruct", new java.lang.Integer(2)); + _methods.put("setLongSeq1", new java.lang.Integer(3)); + _methods.put("setLongSeq2", new java.lang.Integer(4)); + _methods.put("setLongSeq3", new java.lang.Integer(5)); + } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/pickStructFromArgs + { + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1 = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2 = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3 = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read(in); + int structNumber = in.read_long(); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = null; + $result = this.pickStructFromArgs(arg1, arg2, arg3, structNumber); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write(out, $result); + break; + } + + case 1: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setStruct + { + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = null; + $result = this.setStruct(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write(out, $result); + break; + } + + case 2: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setSimpleStruct + { + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg = + new org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder(); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct $result = null; + $result = this.setSimpleStruct(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write(out, $result); + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write(out, arg.value); + break; + } + + case 3: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq1 + { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg = + new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder(); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read(in); + int $result[] = null; + $result = this.setLongSeq1(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write(out, $result); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write(out, arg.value); + break; + } + + case 4: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq2 + { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg = + new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder(); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read(in); + int $result[][] = null; + $result = this.setLongSeq2(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write(out, $result); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write(out, arg.value); + break; + } + + case 5: // org/apache/tuscany/sca/binding/corba/testing/generated/TestObject/setLongSeq3 + { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg = + new org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder(); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read(in); + int $result[][][] = null; + $result = this.setLongSeq3(arg); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write(out, $result); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write(out, arg.value); + break; + } + + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } + + return out; + } // _invoke + + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _TestObjectImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectStub.java index a2e781795e..f325d011de 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/_TestObjectStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,160 +26,156 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public class _TestObjectStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.generated.TestObject -{ +public class _TestObjectStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.generated.TestObject { - public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct pickStructFromArgs (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2, org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3, int structNumber) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("pickStructFromArgs", true); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write ($out, arg1); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write ($out, arg2); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write ($out, arg3); - $out.write_long (structNumber); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return pickStructFromArgs (arg1, arg2, arg3, structNumber ); - } finally { - _releaseReply ($in); - } - } // pickStructFromArgs + public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct pickStructFromArgs(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg1, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg2, + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg3, + int structNumber) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("pickStructFromArgs", true); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write($out, arg1); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write($out, arg2); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write($out, arg3); + $out.write_long(structNumber); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return pickStructFromArgs(arg1, arg2, arg3, structNumber); + } finally { + _releaseReply($in); + } + } // pickStructFromArgs - public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct setStruct (org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setStruct", true); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write ($out, arg); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setStruct (arg ); - } finally { - _releaseReply ($in); - } - } // setStruct + public org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct setStruct(org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setStruct", true); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.write($out, arg); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStruct $result = + org.apache.tuscany.sca.binding.corba.testing.generated.SomeStructHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setStruct(arg); + } finally { + _releaseReply($in); + } + } // setStruct - public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct setSimpleStruct (org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setSimpleStruct", true); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write ($out, arg.value); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct $result = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read ($in); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setSimpleStruct (arg ); - } finally { - _releaseReply ($in); - } - } // setSimpleStruct + public org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct setSimpleStruct(org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHolder arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setSimpleStruct", true); + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.write($out, arg.value); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStruct $result = + org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read($in); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.SimpleStructHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setSimpleStruct(arg); + } finally { + _releaseReply($in); + } + } // setSimpleStruct - public int[] setLongSeq1 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLongSeq1", true); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write ($out, arg.value); - $in = _invoke ($out); - int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read ($in); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLongSeq1 (arg ); - } finally { - _releaseReply ($in); - } - } // setLongSeq1 + public int[] setLongSeq1(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Holder arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLongSeq1", true); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write($out, arg.value); + $in = _invoke($out); + int $result[] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read($in); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLongSeq1(arg); + } finally { + _releaseReply($in); + } + } // setLongSeq1 - public int[][] setLongSeq2 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLongSeq2", true); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write ($out, arg.value); - $in = _invoke ($out); - int $result[][] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read ($in); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLongSeq2 (arg ); - } finally { - _releaseReply ($in); - } - } // setLongSeq2 + public int[][] setLongSeq2(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Holder arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLongSeq2", true); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write($out, arg.value); + $in = _invoke($out); + int $result[][] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read($in); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLongSeq2(arg); + } finally { + _releaseReply($in); + } + } // setLongSeq2 - public int[][][] setLongSeq3 (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("setLongSeq3", true); - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write ($out, arg.value); - $in = _invoke ($out); - int $result[][][] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read ($in); - arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return setLongSeq3 (arg ); - } finally { - _releaseReply ($in); - } - } // setLongSeq3 + public int[][][] setLongSeq3(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder arg) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("setLongSeq3", true); + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write($out, arg.value); + $in = _invoke($out); + int $result[][][] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read($in); + arg.value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return setLongSeq3(arg); + } finally { + _releaseReply($in); + } + } // setLongSeq3 - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/generated/TestObject:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _TestObjectStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHelper.java index e1f13665d8..f3d96e8fd7 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class boolean_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/boolean_list:1.0"; +abstract public class boolean_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/boolean_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, boolean[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, boolean[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static boolean[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static boolean[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.id (), "boolean_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_boolean); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.id(), + "boolean_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static boolean[] read (org.omg.CORBA.portable.InputStream istream) - { - boolean value[] = null; - int _len0 = istream.read_long (); - value = new boolean[_len0]; - istream.read_boolean_array (value, 0, _len0); - return value; - } + public static boolean[] read(org.omg.CORBA.portable.InputStream istream) { + boolean value[] = null; + int _len0 = istream.read_long(); + value = new boolean[_len0]; + istream.read_boolean_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, boolean[] value) - { - ostream.write_long (value.length); - ostream.write_boolean_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, boolean[] value) { + ostream.write_long(value.length); + ostream.write_boolean_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHolder.java index 3ac1ffd697..cb0ab8bcfd 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/boolean_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class boolean_listHolder implements org.omg.CORBA.portable.Streamable -{ - public boolean value[] = null; - - public boolean_listHolder () - { - } - - public boolean_listHolder (boolean[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.type (); - } +public final class boolean_listHolder implements org.omg.CORBA.portable.Streamable { + public boolean value[] = null; + + public boolean_listHolder() { + } + + public boolean_listHolder(boolean[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.boolean_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHelper.java index 65abc6c994..0bde1e701c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/char_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class char_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/char_list:1.0"; +abstract public class char_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/char_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, char[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, char[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static char[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static char[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_char); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.id (), "char_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_char); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.id(), + "char_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static char[] read (org.omg.CORBA.portable.InputStream istream) - { - char value[] = null; - int _len0 = istream.read_long (); - value = new char[_len0]; - istream.read_char_array (value, 0, _len0); - return value; - } + public static char[] read(org.omg.CORBA.portable.InputStream istream) { + char value[] = null; + int _len0 = istream.read_long(); + value = new char[_len0]; + istream.read_char_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, char[] value) - { - ostream.write_long (value.length); - ostream.write_char_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, char[] value) { + ostream.write_long(value.length); + ostream.write_char_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHolder.java index 17ff7d0016..19b2942cfe 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/char_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/char_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class char_listHolder implements org.omg.CORBA.portable.Streamable -{ - public char value[] = null; - - public char_listHolder () - { - } - - public char_listHolder (char[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.type (); - } +public final class char_listHolder implements org.omg.CORBA.portable.Streamable { + public char value[] = null; + + public char_listHolder() { + } + + public char_listHolder(char[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.char_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHelper.java index c7f8133261..8bb5a9c69d 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/double_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class double_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/double_list:1.0"; +abstract public class double_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/double_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, double[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, double[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static double[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static double[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_double); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.id (), "double_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_double); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.id(), + "double_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static double[] read (org.omg.CORBA.portable.InputStream istream) - { - double value[] = null; - int _len0 = istream.read_long (); - value = new double[_len0]; - istream.read_double_array (value, 0, _len0); - return value; - } + public static double[] read(org.omg.CORBA.portable.InputStream istream) { + double value[] = null; + int _len0 = istream.read_long(); + value = new double[_len0]; + istream.read_double_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, double[] value) - { - ostream.write_long (value.length); - ostream.write_double_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, double[] value) { + ostream.write_long(value.length); + ostream.write_double_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHolder.java index a5495f068a..dc89e71092 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/double_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/double_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class double_listHolder implements org.omg.CORBA.portable.Streamable -{ - public double value[] = null; - - public double_listHolder () - { - } - - public double_listHolder (double[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.type (); - } +public final class double_listHolder implements org.omg.CORBA.portable.Streamable { + public double value[] = null; + + public double_listHolder() { + } + + public double_listHolder(double[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.double_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHelper.java index 92de24dab0..7b71aa0a9f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/float_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class float_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/float_list:1.0"; +abstract public class float_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/float_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, float[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, float[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static float[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static float[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.id (), "float_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_float); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.id(), + "float_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static float[] read (org.omg.CORBA.portable.InputStream istream) - { - float value[] = null; - int _len0 = istream.read_long (); - value = new float[_len0]; - istream.read_float_array (value, 0, _len0); - return value; - } + public static float[] read(org.omg.CORBA.portable.InputStream istream) { + float value[] = null; + int _len0 = istream.read_long(); + value = new float[_len0]; + istream.read_float_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, float[] value) - { - ostream.write_long (value.length); - ostream.write_float_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, float[] value) { + ostream.write_long(value.length); + ostream.write_float_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHolder.java index dd00bdc28b..513bab37cc 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/float_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/float_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class float_listHolder implements org.omg.CORBA.portable.Streamable -{ - public float value[] = null; - - public float_listHolder () - { - } - - public float_listHolder (float[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.type (); - } +public final class float_listHolder implements org.omg.CORBA.portable.Streamable { + public float value[] = null; + + public float_listHolder() { + } + + public float_listHolder(float[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.float_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHelper.java index e4caba864a..c1d06e2ba9 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class long_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_list:1.0"; +abstract public class long_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, int[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, int[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static int[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static int[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.id (), "long_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.id(), + "long_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static int[] read (org.omg.CORBA.portable.InputStream istream) - { - int value[] = null; - int _len0 = istream.read_long (); - value = new int[_len0]; - istream.read_long_array (value, 0, _len0); - return value; - } + public static int[] read(org.omg.CORBA.portable.InputStream istream) { + int value[] = null; + int _len0 = istream.read_long(); + value = new int[_len0]; + istream.read_long_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value) - { - ostream.write_long (value.length); - ostream.write_long_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, int[] value) { + ostream.write_long(value.length); + ostream.write_long_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHolder.java index 5df530e8b3..f9ad7b77ac 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class long_listHolder implements org.omg.CORBA.portable.Streamable -{ - public int value[] = null; - - public long_listHolder () - { - } - - public long_listHolder (int[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.type (); - } +public final class long_listHolder implements org.omg.CORBA.portable.Streamable { + public int value[] = null; + + public long_listHolder() { + } + + public long_listHolder(int[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.long_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHelper.java index bee5bd414b..cfb292fc01 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -abstract public class long_long_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_long_list:1.0"; +abstract public class long_long_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_long_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, long[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, long[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static long[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static long[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_longlong); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.id (), "long_long_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_longlong); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.id(), + "long_long_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static long[] read (org.omg.CORBA.portable.InputStream istream) - { - long value[] = null; - int _len0 = istream.read_long (); - value = new long[_len0]; - istream.read_longlong_array (value, 0, _len0); - return value; - } + public static long[] read(org.omg.CORBA.portable.InputStream istream) { + long value[] = null; + int _len0 = istream.read_long(); + value = new long[_len0]; + istream.read_longlong_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, long[] value) - { - ostream.write_long (value.length); - ostream.write_longlong_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, long[] value) { + ostream.write_long(value.length); + ostream.write_longlong_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHolder.java index 47f077a617..02f46a7d85 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_long_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 14:12:28 CEST */ -public final class long_long_listHolder implements org.omg.CORBA.portable.Streamable -{ - public long value[] = null; - - public long_long_listHolder () - { - } - - public long_long_listHolder (long[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.type (); - } +public final class long_long_listHolder implements org.omg.CORBA.portable.Streamable { + public long value[] = null; + + public long_long_listHolder() { + } + + public long_long_listHolder(long[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.long_long_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Helper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Helper.java index 58c7903e15..505aa3f026 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Helper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Helper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Helper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class long_seq1Helper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1:1.0"; +abstract public class long_seq1Helper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1:1.0"; + + public static void insert(org.omg.CORBA.Any a, int[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, int[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static int[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static int[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id (), "long_seq1", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id(), + "long_seq1", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static int[] read (org.omg.CORBA.portable.InputStream istream) - { - int value[] = null; - int _len0 = istream.read_long (); - value = new int[_len0]; - istream.read_long_array (value, 0, _len0); - return value; - } + public static int[] read(org.omg.CORBA.portable.InputStream istream) { + int value[] = null; + int _len0 = istream.read_long(); + value = new int[_len0]; + istream.read_long_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value) - { - ostream.write_long (value.length); - ostream.write_long_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, int[] value) { + ostream.write_long(value.length); + ostream.write_long_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Holder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Holder.java index 56edf46e57..5cbaa109ee 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Holder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Holder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq1Holder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class long_seq1Holder implements org.omg.CORBA.portable.Streamable -{ - public int value[] = null; - - public long_seq1Holder () - { - } - - public long_seq1Holder (int[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.type (); - } +public final class long_seq1Holder implements org.omg.CORBA.portable.Streamable { + public int value[] = null; + + public long_seq1Holder() { + } + + public long_seq1Holder(int[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Helper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Helper.java index 9f486727a7..2f792888fb 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Helper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Helper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Helper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,57 +26,58 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class long_seq2Helper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2:1.0"; +abstract public class long_seq2Helper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2:1.0"; + + public static void insert(org.omg.CORBA.Any a, int[][] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, int[][] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static int[][] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static int[][] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id (), "long_seq1", __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id (), "long_seq2", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id(), + "long_seq1", + __typeCode); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id(), + "long_seq2", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static int[][] read (org.omg.CORBA.portable.InputStream istream) - { - int value[][] = null; - int _len0 = istream.read_long (); - value = new int[_len0][]; - for (int _o1 = 0;_o1 < value.length; ++_o1) - value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read (istream); - return value; - } + public static int[][] read(org.omg.CORBA.portable.InputStream istream) { + int value[][] = null; + int _len0 = istream.read_long(); + value = new int[_len0][]; + for (int _o1 = 0; _o1 < value.length; ++_o1) + value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.read(istream); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, int[][] value) - { - ostream.write_long (value.length); - for (int _i0 = 0;_i0 < value.length; ++_i0) - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write (ostream, value[_i0]); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, int[][] value) { + ostream.write_long(value.length); + for (int _i0 = 0; _i0 < value.length; ++_i0) + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.write(ostream, value[_i0]); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Holder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Holder.java index 691effb6b3..8b2ccc1f73 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Holder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Holder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq2Holder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class long_seq2Holder implements org.omg.CORBA.portable.Streamable -{ - public int value[][] = null; - - public long_seq2Holder () - { - } - - public long_seq2Holder (int[][] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.type (); - } +public final class long_seq2Holder implements org.omg.CORBA.portable.Streamable { + public int value[][] = null; + + public long_seq2Holder() { + } + + public long_seq2Holder(int[][] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Helper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Helper.java index 963da418a5..67e224f0be 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Helper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Helper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Helper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,59 +26,64 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class long_seq3Helper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3:1.0"; +abstract public class long_seq3Helper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3:1.0"; + + public static void insert(org.omg.CORBA.Any a, int[][][] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, int[][][] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static int[][][] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static int[][][] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id (), "long_seq1", __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id (), "long_seq2", __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.id (), "long_seq3", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq1Helper.id(), + "long_seq1", + __typeCode); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.id(), + "long_seq2", + __typeCode); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.id(), + "long_seq3", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static int[][][] read (org.omg.CORBA.portable.InputStream istream) - { - int value[][][] = null; - int _len0 = istream.read_long (); - value = new int[_len0][][]; - for (int _o1 = 0;_o1 < value.length; ++_o1) - value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read (istream); - return value; - } + public static int[][][] read(org.omg.CORBA.portable.InputStream istream) { + int value[][][] = null; + int _len0 = istream.read_long(); + value = new int[_len0][][]; + for (int _o1 = 0; _o1 < value.length; ++_o1) + value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.read(istream); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, int[][][] value) - { - ostream.write_long (value.length); - for (int _i0 = 0;_i0 < value.length; ++_i0) - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write (ostream, value[_i0]); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, int[][][] value) { + ostream.write_long(value.length); + for (int _i0 = 0; _i0 < value.length; ++_i0) + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq2Helper.write(ostream, value[_i0]); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Holder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Holder.java index 434d298430..5d4adfba2d 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Holder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Holder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/long_seq3Holder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class long_seq3Holder implements org.omg.CORBA.portable.Streamable -{ - public int value[][][] = null; - - public long_seq3Holder () - { - } - - public long_seq3Holder (int[][][] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.type (); - } +public final class long_seq3Holder implements org.omg.CORBA.portable.Streamable { + public int value[][][] = null; + + public long_seq3Holder() { + } + + public long_seq3Holder(int[][][] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Helper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHelper.java index 09d0f7d0ca..c7d86d9179 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class octet_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/octet_list:1.0"; +abstract public class octet_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/octet_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, byte[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, byte[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static byte[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static byte[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_octet); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.id (), "octet_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_octet); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.id(), + "octet_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static byte[] read (org.omg.CORBA.portable.InputStream istream) - { - byte value[] = null; - int _len0 = istream.read_long (); - value = new byte[_len0]; - istream.read_octet_array (value, 0, _len0); - return value; - } + public static byte[] read(org.omg.CORBA.portable.InputStream istream) { + byte value[] = null; + int _len0 = istream.read_long(); + value = new byte[_len0]; + istream.read_octet_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, byte[] value) - { - ostream.write_long (value.length); - ostream.write_octet_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, byte[] value) { + ostream.write_long(value.length); + ostream.write_octet_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHolder.java index a9e4e9b295..09b2b85c6a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/octet_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class octet_listHolder implements org.omg.CORBA.portable.Streamable -{ - public byte value[] = null; - - public octet_listHolder () - { - } - - public octet_listHolder (byte[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.type (); - } +public final class octet_listHolder implements org.omg.CORBA.portable.Streamable { + public byte value[] = null; + + public octet_listHolder() { + } + + public octet_listHolder(byte[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.octet_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHelper.java index 4edee3aba0..e88b1e06c4 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,55 +26,55 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class remote_object_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_list:1.0"; +abstract public class remote_object_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.type (); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.id (), "remote_object_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.type(); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper + .id(), + "remote_object_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] read (org.omg.CORBA.portable.InputStream istream) - { - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value[] = null; - int _len0 = istream.read_long (); - value = new org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[_len0]; - for (int _o1 = 0;_o1 < value.length; ++_o1) - value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read (istream); - return value; - } + public static org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] read(org.omg.CORBA.portable.InputStream istream) { + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value[] = null; + int _len0 = istream.read_long(); + value = new org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[_len0]; + for (int _o1 = 0; _o1 < value.length; ++_o1) + value[_o1] = org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.read(istream); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] value) - { - ostream.write_long (value.length); - for (int _i0 = 0;_i0 < value.length; ++_i0) - org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write (ostream, value[_i0]); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] value) { + ostream.write_long(value.length); + for (int _i0 = 0; _i0 < value.length; ++_i0) + org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObjectHelper.write(ostream, value[_i0]); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHolder.java index 3b94159486..d3f996c5b4 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/remote_object_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class remote_object_listHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value[] = null; - - public remote_object_listHolder () - { - } - - public remote_object_listHolder (org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.type (); - } +public final class remote_object_listHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject value[] = null; + + public remote_object_listHolder() { + } + + public remote_object_listHolder(org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.remote_object_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHelper.java index c97a2e8fda..7c58d47f7c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/short_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class short_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/short_list:1.0"; +abstract public class short_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/short_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, short[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, short[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static short[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static short[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.id (), "short_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_short); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.id(), + "short_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static short[] read (org.omg.CORBA.portable.InputStream istream) - { - short value[] = null; - int _len0 = istream.read_long (); - value = new short[_len0]; - istream.read_short_array (value, 0, _len0); - return value; - } + public static short[] read(org.omg.CORBA.portable.InputStream istream) { + short value[] = null; + int _len0 = istream.read_long(); + value = new short[_len0]; + istream.read_short_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, short[] value) - { - ostream.write_long (value.length); - ostream.write_short_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, short[] value) { + ostream.write_long(value.length); + ostream.write_short_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHolder.java index e35a975abc..5be5a65c43 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/short_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/short_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class short_listHolder implements org.omg.CORBA.portable.Streamable -{ - public short value[] = null; - - public short_listHolder () - { - } - - public short_listHolder (short[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.type (); - } +public final class short_listHolder implements org.omg.CORBA.portable.Streamable { + public short value[] = null; + + public short_listHolder() { + } + + public short_listHolder(short[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.short_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHelper.java index aa59601dd4..a40d5fa8de 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/string_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,55 +26,52 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class string_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/string_list:1.0"; +abstract public class string_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/string_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, String[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, String[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static String[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static String[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.id (), "string_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().create_string_tc(0); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.id(), + "string_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static String[] read (org.omg.CORBA.portable.InputStream istream) - { - String value[] = null; - int _len0 = istream.read_long (); - value = new String[_len0]; - for (int _o1 = 0;_o1 < value.length; ++_o1) - value[_o1] = istream.read_string (); - return value; - } + public static String[] read(org.omg.CORBA.portable.InputStream istream) { + String value[] = null; + int _len0 = istream.read_long(); + value = new String[_len0]; + for (int _o1 = 0; _o1 < value.length; ++_o1) + value[_o1] = istream.read_string(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) - { - ostream.write_long (value.length); - for (int _i0 = 0;_i0 < value.length; ++_i0) - ostream.write_string (value[_i0]); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, String[] value) { + ostream.write_long(value.length); + for (int _i0 = 0; _i0 < value.length; ++_i0) + ostream.write_string(value[_i0]); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHolder.java index 4feeb1155c..76f99408f2 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/string_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/string_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class string_listHolder implements org.omg.CORBA.portable.Streamable -{ - public String value[] = null; - - public string_listHolder () - { - } - - public string_listHolder (String[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.type (); - } +public final class string_listHolder implements org.omg.CORBA.portable.Streamable { + public String value[] = null; + + public string_listHolder() { + } + + public string_listHolder(String[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.string_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHelper.java index 743bd459b0..d7594b0815 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,51 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class unsigned_long_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_list:1.0"; +abstract public class unsigned_long_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, int[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, int[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static int[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static int[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.id (), "unsigned_long_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper + .id(), + "unsigned_long_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static int[] read (org.omg.CORBA.portable.InputStream istream) - { - int value[] = null; - int _len0 = istream.read_long (); - value = new int[_len0]; - istream.read_ulong_array (value, 0, _len0); - return value; - } + public static int[] read(org.omg.CORBA.portable.InputStream istream) { + int value[] = null; + int _len0 = istream.read_long(); + value = new int[_len0]; + istream.read_ulong_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value) - { - ostream.write_long (value.length); - ostream.write_ulong_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, int[] value) { + ostream.write_long(value.length); + ostream.write_ulong_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHolder.java index 5bea8b9e20..e9fbcccc36 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class unsigned_long_listHolder implements org.omg.CORBA.portable.Streamable -{ - public int value[] = null; - - public unsigned_long_listHolder () - { - } - - public unsigned_long_listHolder (int[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.type (); - } +public final class unsigned_long_listHolder implements org.omg.CORBA.portable.Streamable { + public int value[] = null; + + public unsigned_long_listHolder() { + } + + public unsigned_long_listHolder(int[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHelper.java index 26d7954337..6ef187c4e5 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,53 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class unsigned_long_long_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_list:1.0"; +abstract public class unsigned_long_long_listHelper { + private static String _id = + "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, long[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, long[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static long[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static long[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulonglong); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.id (), "unsigned_long_long_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulonglong); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB + .init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper + .id(), + "unsigned_long_long_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static long[] read (org.omg.CORBA.portable.InputStream istream) - { - long value[] = null; - int _len0 = istream.read_long (); - value = new long[_len0]; - istream.read_ulonglong_array (value, 0, _len0); - return value; - } + public static long[] read(org.omg.CORBA.portable.InputStream istream) { + long value[] = null; + int _len0 = istream.read_long(); + value = new long[_len0]; + istream.read_ulonglong_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, long[] value) - { - ostream.write_long (value.length); - ostream.write_ulonglong_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, long[] value) { + ostream.write_long(value.length); + ostream.write_ulonglong_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHolder.java index 2c6b652812..59bc015c38 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_long_long_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class unsigned_long_long_listHolder implements org.omg.CORBA.portable.Streamable -{ - public long value[] = null; - - public unsigned_long_long_listHolder () - { - } - - public unsigned_long_long_listHolder (long[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.type (); - } +public final class unsigned_long_long_listHolder implements org.omg.CORBA.portable.Streamable { + public long value[] = null; + + public unsigned_long_long_listHolder() { + } + + public unsigned_long_long_listHolder(long[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_long_long_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHelper.java index c16b9c617f..ec4526cebf 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,51 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class unsigned_short_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_list:1.0"; +abstract public class unsigned_short_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, short[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, short[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static short[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static short[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ushort); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.id (), "unsigned_short_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ushort); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper + .id(), + "unsigned_short_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static short[] read (org.omg.CORBA.portable.InputStream istream) - { - short value[] = null; - int _len0 = istream.read_long (); - value = new short[_len0]; - istream.read_ushort_array (value, 0, _len0); - return value; - } + public static short[] read(org.omg.CORBA.portable.InputStream istream) { + short value[] = null; + int _len0 = istream.read_long(); + value = new short[_len0]; + istream.read_ushort_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, short[] value) - { - ostream.write_long (value.length); - ostream.write_ushort_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, short[] value) { + ostream.write_long(value.length); + ostream.write_ushort_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHolder.java index 1ce8cdecd5..56ab28f0be 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/unsigned_short_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class unsigned_short_listHolder implements org.omg.CORBA.portable.Streamable -{ - public short value[] = null; - - public unsigned_short_listHolder () - { - } - - public unsigned_short_listHolder (short[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.type (); - } +public final class unsigned_short_listHolder implements org.omg.CORBA.portable.Streamable { + public short value[] = null; + + public unsigned_short_listHolder() { + } + + public unsigned_short_listHolder(short[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.unsigned_short_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHelper.java index eeaec560dc..73a10d3b7f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,53 +26,50 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class wchar_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/wchar_list:1.0"; +abstract public class wchar_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/wchar_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, char[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, char[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static char[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static char[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_wchar); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.id (), "wchar_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_wchar); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.id(), + "wchar_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static char[] read (org.omg.CORBA.portable.InputStream istream) - { - char value[] = null; - int _len0 = istream.read_long (); - value = new char[_len0]; - istream.read_wchar_array (value, 0, _len0); - return value; - } + public static char[] read(org.omg.CORBA.portable.InputStream istream) { + char value[] = null; + int _len0 = istream.read_long(); + value = new char[_len0]; + istream.read_wchar_array(value, 0, _len0); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, char[] value) - { - ostream.write_long (value.length); - ostream.write_wchar_array (value, 0, value.length); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, char[] value) { + ostream.write_long(value.length); + ostream.write_wchar_array(value, 0, value.length); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHolder.java index 76d32fb999..c5c1e87756 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/wchar_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class wchar_listHolder implements org.omg.CORBA.portable.Streamable -{ - public char value[] = null; - - public wchar_listHolder () - { - } - - public wchar_listHolder (char[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.type (); - } +public final class wchar_listHolder implements org.omg.CORBA.portable.Streamable { + public char value[] = null; + + public wchar_listHolder() { + } + + public wchar_listHolder(char[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.wchar_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHelper.java index 517cdc236b..3e45568f01 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,55 +26,52 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -abstract public class wstring_listHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/wstring_list:1.0"; +abstract public class wstring_listHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/generated/wstring_list:1.0"; + + public static void insert(org.omg.CORBA.Any a, String[] that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, String[] that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static String[] extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static String[] extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_wstring_tc (0); - __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); - __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.id (), "wstring_list", __typeCode); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = org.omg.CORBA.ORB.init().create_wstring_tc(0); + __typeCode = org.omg.CORBA.ORB.init().create_sequence_tc(0, __typeCode); + __typeCode = + org.omg.CORBA.ORB.init() + .create_alias_tc(org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.id(), + "wstring_list", + __typeCode); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static String[] read (org.omg.CORBA.portable.InputStream istream) - { - String value[] = null; - int _len0 = istream.read_long (); - value = new String[_len0]; - for (int _o1 = 0;_o1 < value.length; ++_o1) - value[_o1] = istream.read_wstring (); - return value; - } + public static String[] read(org.omg.CORBA.portable.InputStream istream) { + String value[] = null; + int _len0 = istream.read_long(); + value = new String[_len0]; + for (int _o1 = 0; _o1 < value.length; ++_o1) + value[_o1] = istream.read_wstring(); + return value; + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, String[] value) - { - ostream.write_long (value.length); - for (int _i0 = 0;_i0 < value.length; ++_i0) - ostream.write_wstring (value[_i0]); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, String[] value) { + ostream.write_long(value.length); + for (int _i0 = 0; _i0 < value.length; ++_i0) + ostream.write_wstring(value[_i0]); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java index 3197cc0564..bdbf9d995b 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; - /** * org/apache/tuscany/sca/binding/corba/testing/generated/wstring_listHolder.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.generated; * monday, 23 june 2008 2008 14:12:28 CEST */ -public final class wstring_listHolder implements org.omg.CORBA.portable.Streamable -{ - public String value[] = null; - - public wstring_listHolder () - { - } - - public wstring_listHolder (String[] initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.type (); - } +public final class wstring_listHolder implements org.omg.CORBA.portable.Streamable { + public String value[] = null; + + public wstring_listHolder() { + } + + public wstring_listHolder(String[] initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.generated.wstring_listHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java index 2aae808109..7c33b1d449 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/Calc.java @@ -23,8 +23,8 @@ import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.DivBy public interface Calc { - public double div(double arg1, double arg2) throws DivByZero; + public double div(double arg1, double arg2) throws DivByZero; - public double divForSmallArgs(double arg1, double arg2); + public double divForSmallArgs(double arg1, double arg2); } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java index d47f66fc15..d0ebff5fec 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/DummyObject.java @@ -21,7 +21,8 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public interface DummyObject { - int getLong(); - DummyObject cloneObject(); - + int getLong(); + + DummyObject cloneObject(); + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java index 0fb8a3ffab..0c9de5bb31 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum1.java @@ -21,16 +21,16 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public class InvalidEnum1 { - public static final InvalidEnum1 red = new InvalidEnum1(0); + public static final InvalidEnum1 red = new InvalidEnum1(0); - public int value() { - return 0; - } + public int value() { + return 0; + } - public static InvalidEnum1 from_int(int value) { - return null; - } + public static InvalidEnum1 from_int(int value) { + return null; + } - protected InvalidEnum1(int value) { - } + protected InvalidEnum1(int value) { + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java index 6c8f568bb4..8746eb7f9b 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum2.java @@ -21,13 +21,13 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public class InvalidEnum2 { - public static final int _red = 0; - public static final InvalidEnum2 red = new InvalidEnum2(_red); + public static final int _red = 0; + public static final InvalidEnum2 red = new InvalidEnum2(_red); - public static InvalidEnum2 from_int(int value) { - return null; - } + public static InvalidEnum2 from_int(int value) { + return null; + } - protected InvalidEnum2(int value) { - } + protected InvalidEnum2(int value) { + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java index ca630e361e..6d124b0485 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidEnum3.java @@ -21,13 +21,13 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public class InvalidEnum3 { - public static final int _red = 0; - public static final InvalidEnum2 red = new InvalidEnum2(_red); + public static final int _red = 0; + public static final InvalidEnum2 red = new InvalidEnum2(_red); - public int value() { - return 0; - } + public int value() { + return 0; + } - protected InvalidEnum3(int value) { - } + protected InvalidEnum3(int value) { + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java index 180211ecdc..8cf66e2fac 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct1.java @@ -21,8 +21,8 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public final class InvalidStruct1 { - public InvalidStruct1() { - - } - + public InvalidStruct1() { + + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java index 34699111eb..5f361512f0 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct2.java @@ -21,11 +21,11 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public final class InvalidStruct2 { - public int f1; - public String f2; - - public InvalidStruct2(int f1, String f2) { - - } - + public int f1; + public String f2; + + public InvalidStruct2(int f1, String f2) { + + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java index 59c8c2d39c..adc81ea5a2 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/InvalidStruct3.java @@ -21,16 +21,16 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public final class InvalidStruct3 { - public int f1; - public String f2; - public static byte f3; + public int f1; + public String f2; + public static byte f3; - public InvalidStruct3() { + public InvalidStruct3() { - } + } - public InvalidStruct3(int f1, String f2, byte f3) { + public InvalidStruct3(int f1, String f2, byte f3) { - } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java index 031b0549a2..a514b5e222 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/NonCorbaException.java @@ -21,8 +21,8 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; public class NonCorbaException extends Exception { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; + + public String someField; - public String someField; - } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java index 6887517073..85ca3798f4 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SimpleStruct.java @@ -23,8 +23,8 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; * @version $Rev$ $Date$ */ public class SimpleStruct { - - public String field1; - public int field2; - + + public String field1; + public int field2; + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java index cb723fc359..d8cdf1835a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/hierarchy/SomeStruct.java @@ -24,10 +24,10 @@ package org.apache.tuscany.sca.binding.corba.testing.hierarchy; */ public class SomeStruct { - public SimpleStruct innerStruct; - public String str; - public String[] str_list; - public int[][] twoDimSeq; - public int[][][] threeDimSeq; - + public SimpleStruct innerStruct; + public String str; + public String[] str_list; + public int[][] twoDimSeq; + public int[][][] threeDimSeq; + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObject.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObject.java index 57fed51b1e..bb72fdbbf3 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObject.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObject.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/DummyObject.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public interface DummyObject extends DummyObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface DummyObject extends DummyObjectOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface DummyObject diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHelper.java index a040eafeaa..606d333bb3 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -abstract public class DummyObjectHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"; +abstract public class DummyObjectHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.references.DummyObject that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.id (), "DummyObject"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB + .init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.id(), + "DummyObject"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_DummyObjectStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_DummyObjectStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.references.DummyObject value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.DummyObject) - return (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.DummyObject) + return (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.DummyObject) - return (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub stub = new org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.references.DummyObject unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.DummyObject) + return (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub stub = + new org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHolder.java index 03563c43fb..0ff9540502 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public final class DummyObjectHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject value = null; - - public DummyObjectHolder () - { - } - - public DummyObjectHolder (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.type (); - } +public final class DummyObjectHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject value = null; + + public DummyObjectHolder() { + } + + public DummyObjectHolder(org.apache.tuscany.sca.binding.corba.testing.references.DummyObject initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectOperations.java index 7de62f0043..912bd16f9b 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/DummyObjectOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,8 +26,8 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public interface DummyObjectOperations -{ - int getLong (); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject cloneObject (); +public interface DummyObjectOperations { + int getLong(); + + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject cloneObject(); } // interface DummyObjectOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager.java index c1afbe0c80..79f7959c72 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,6 +26,5 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public interface ObjectManager extends ObjectManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity -{ +public interface ObjectManager extends ObjectManagerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity { } // interface ObjectManager diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHelper.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHelper.java index 3ad9dced0f..495a614d84 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHelper.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHelper.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,78 +26,75 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -abstract public class ObjectManagerHelper -{ - private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"; +abstract public class ObjectManagerHelper { + private static String _id = "IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"; + + public static void insert(org.omg.CORBA.Any a, + org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager that) { + org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); + a.type(type()); + write(out, that); + a.read_value(out.create_input_stream(), type()); + } - public static void insert (org.omg.CORBA.Any a, org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager that) - { - org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); - a.type (type ()); - write (out, that); - a.read_value (out.create_input_stream (), type ()); - } + public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager extract(org.omg.CORBA.Any a) { + return read(a.create_input_stream()); + } - public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager extract (org.omg.CORBA.Any a) - { - return read (a.create_input_stream ()); - } + private static org.omg.CORBA.TypeCode __typeCode = null; - private static org.omg.CORBA.TypeCode __typeCode = null; - synchronized public static org.omg.CORBA.TypeCode type () - { - if (__typeCode == null) - { - __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.id (), "ObjectManager"); + synchronized public static org.omg.CORBA.TypeCode type() { + if (__typeCode == null) { + __typeCode = + org.omg.CORBA.ORB.init() + .create_interface_tc(org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper + .id(), + "ObjectManager"); + } + return __typeCode; } - return __typeCode; - } - public static String id () - { - return _id; - } + public static String id() { + return _id; + } - public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager read (org.omg.CORBA.portable.InputStream istream) - { - return narrow (istream.read_Object (_ObjectManagerStub.class)); - } + public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager read(org.omg.CORBA.portable.InputStream istream) { + return narrow(istream.read_Object(_ObjectManagerStub.class)); + } - public static void write (org.omg.CORBA.portable.OutputStream ostream, org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager value) - { - ostream.write_Object ((org.omg.CORBA.Object) value); - } + public static void write(org.omg.CORBA.portable.OutputStream ostream, + org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager value) { + ostream.write_Object((org.omg.CORBA.Object)value); + } - public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager) - return (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager)obj; - else if (!obj._is_a (id ())) - throw new org.omg.CORBA.BAD_PARAM (); - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub stub = new org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager) + return (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager)obj; + else if (!obj._is_a(id())) + throw new org.omg.CORBA.BAD_PARAM(); + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub stub = + new org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub(); + stub._set_delegate(delegate); + return stub; + } } - } - public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager unchecked_narrow (org.omg.CORBA.Object obj) - { - if (obj == null) - return null; - else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager) - return (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager)obj; - else - { - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); - org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub stub = new org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub (); - stub._set_delegate(delegate); - return stub; + public static org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager unchecked_narrow(org.omg.CORBA.Object obj) { + if (obj == null) + return null; + else if (obj instanceof org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager) + return (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager)obj; + else { + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub stub = + new org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerStub(); + stub._set_delegate(delegate); + return stub; + } } - } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHolder.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHolder.java index 5bebb0dd30..11cfc82ac2 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHolder.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerHolder.java @@ -26,32 +26,26 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public final class ObjectManagerHolder implements org.omg.CORBA.portable.Streamable -{ - public org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager value = null; - - public ObjectManagerHolder () - { - } - - public ObjectManagerHolder (org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager initialValue) - { - value = initialValue; - } - - public void _read (org.omg.CORBA.portable.InputStream i) - { - value = org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.read (i); - } - - public void _write (org.omg.CORBA.portable.OutputStream o) - { - org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.write (o, value); - } - - public org.omg.CORBA.TypeCode _type () - { - return org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.type (); - } +public final class ObjectManagerHolder implements org.omg.CORBA.portable.Streamable { + public org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager value = null; + + public ObjectManagerHolder() { + } + + public ObjectManagerHolder(org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager initialValue) { + value = initialValue; + } + + public void _read(org.omg.CORBA.portable.InputStream i) { + value = org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.read(i); + } + + public void _write(org.omg.CORBA.portable.OutputStream o) { + org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.write(o, value); + } + + public org.omg.CORBA.TypeCode _type() { + return org.apache.tuscany.sca.binding.corba.testing.references.ObjectManagerHelper.type(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerOperations.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerOperations.java index 8fea465162..e0e56d1017 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerOperations.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerOperations.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/ObjectManagerOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,8 +26,8 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public interface ObjectManagerOperations -{ - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getDummyObject (); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getObjectByArgument (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy); +public interface ObjectManagerOperations { + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getDummyObject(); + + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getObjectByArgument(org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy); } // interface ObjectManagerOperations diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectImplBase.java index d6de74d185..bc36dd6b12 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,66 +26,58 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public abstract class _DummyObjectImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.references.DummyObject, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _DummyObjectImplBase () - { - } +public abstract class _DummyObjectImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject, org.omg.CORBA.portable.InvokeHandler { - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("getLong", new java.lang.Integer (0)); - _methods.put ("cloneObject", new java.lang.Integer (1)); - } + // Constructors + public _DummyObjectImplBase() { + } - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("getLong", new java.lang.Integer(0)); + _methods.put("cloneObject", new java.lang.Integer(1)); + } - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/references/DummyObject/getLong - { - int $result = (int)0; - $result = this.getLong (); - out = $rh.createReply(); - out.write_long ($result); - break; - } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - case 1: // org/apache/tuscany/sca/binding/corba/testing/references/DummyObject/cloneObject - { - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; - $result = this.cloneObject (); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write (out, $result); - break; - } + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/references/DummyObject/getLong + { + int $result = (int)0; + $result = this.getLong(); + out = $rh.createReply(); + out.write_long($result); + break; + } - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } + case 1: // org/apache/tuscany/sca/binding/corba/testing/references/DummyObject/cloneObject + { + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; + $result = this.cloneObject(); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write(out, $result); + break; + } - return out; - } // _invoke + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"}; + return out; + } // _invoke - public String[] _ids () - { - return (String[])__ids.clone (); - } + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"}; + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _DummyObjectImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectStub.java index d838b3152d..8f2d7b762d 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/_DummyObjectStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,71 +26,66 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public class _DummyObjectStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.references.DummyObject -{ +public class _DummyObjectStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject { - public int getLong () - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("getLong", true); - $in = _invoke ($out); - int $result = $in.read_long (); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return getLong ( ); - } finally { - _releaseReply ($in); - } - } // getLong + public int getLong() { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("getLong", true); + $in = _invoke($out); + int $result = $in.read_long(); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return getLong(); + } finally { + _releaseReply($in); + } + } // getLong - public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject cloneObject () - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("cloneObject", true); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return cloneObject ( ); - } finally { - _releaseReply ($in); - } - } // cloneObject + public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject cloneObject() { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("cloneObject", true); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return cloneObject(); + } finally { + _releaseReply($in); + } + } // cloneObject - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/references/DummyObject:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _DummyObjectStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerImplBase.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerImplBase.java index a511340a52..ecc654697e 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerImplBase.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerImplBase.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerImplBase.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,67 +26,60 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public abstract class _ObjectManagerImplBase extends org.omg.CORBA.portable.ObjectImpl - implements org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager, org.omg.CORBA.portable.InvokeHandler -{ - - // Constructors - public _ObjectManagerImplBase () - { - } +public abstract class _ObjectManagerImplBase extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager, org.omg.CORBA.portable.InvokeHandler { - private static java.util.Hashtable _methods = new java.util.Hashtable (); - static - { - _methods.put ("getDummyObject", new java.lang.Integer (0)); - _methods.put ("getObjectByArgument", new java.lang.Integer (1)); - } + // Constructors + public _ObjectManagerImplBase() { + } - public org.omg.CORBA.portable.OutputStream _invoke (String $method, - org.omg.CORBA.portable.InputStream in, - org.omg.CORBA.portable.ResponseHandler $rh) - { - org.omg.CORBA.portable.OutputStream out = null; - java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); - if (__method == null) - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + private static java.util.Hashtable _methods = new java.util.Hashtable(); + static { + _methods.put("getDummyObject", new java.lang.Integer(0)); + _methods.put("getObjectByArgument", new java.lang.Integer(1)); + } - switch (__method.intValue ()) - { - case 0: // org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager/getDummyObject - { - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; - $result = this.getDummyObject (); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write (out, $result); - break; - } + public org.omg.CORBA.portable.OutputStream _invoke(String $method, + org.omg.CORBA.portable.InputStream in, + org.omg.CORBA.portable.ResponseHandler $rh) { + org.omg.CORBA.portable.OutputStream out = null; + java.lang.Integer __method = (java.lang.Integer)_methods.get($method); + if (__method == null) + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - case 1: // org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager/getObjectByArgument - { - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read (in); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; - $result = this.getObjectByArgument (dummy); - out = $rh.createReply(); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write (out, $result); - break; - } + switch (__method.intValue()) { + case 0: // org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager/getDummyObject + { + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; + $result = this.getDummyObject(); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write(out, $result); + break; + } - default: - throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); - } + case 1: // org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager/getObjectByArgument + { + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy = + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read(in); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = null; + $result = this.getObjectByArgument(dummy); + out = $rh.createReply(); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write(out, $result); + break; + } - return out; - } // _invoke + default: + throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); + } - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"}; + return out; + } // _invoke - public String[] _ids () - { - return (String[])__ids.clone (); - } + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"}; + public String[] _ids() { + return (String[])__ids.clone(); + } } // class _ObjectManagerImplBase diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerStub.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerStub.java index 75fe4ec5b8..b1c99b015f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerStub.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerStub.java @@ -19,7 +19,6 @@ package org.apache.tuscany.sca.binding.corba.testing.references; - /** * org/apache/tuscany/sca/binding/corba/testing/references/_ObjectManagerStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" @@ -27,72 +26,68 @@ package org.apache.tuscany.sca.binding.corba.testing.references; * niedziela, 8 czerwiec 2008 16:43:12 CEST */ -public class _ObjectManagerStub extends org.omg.CORBA.portable.ObjectImpl implements org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager -{ +public class _ObjectManagerStub extends org.omg.CORBA.portable.ObjectImpl implements + org.apache.tuscany.sca.binding.corba.testing.references.ObjectManager { - public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getDummyObject () - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("getDummyObject", true); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return getDummyObject ( ); - } finally { - _releaseReply ($in); - } - } // getDummyObject + public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getDummyObject() { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("getDummyObject", true); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return getDummyObject(); + } finally { + _releaseReply($in); + } + } // getDummyObject - public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getObjectByArgument (org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy) - { - org.omg.CORBA.portable.InputStream $in = null; - try { - org.omg.CORBA.portable.OutputStream $out = _request ("getObjectByArgument", true); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write ($out, dummy); - $in = _invoke ($out); - org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read ($in); - return $result; - } catch (org.omg.CORBA.portable.ApplicationException $ex) { - $in = $ex.getInputStream (); - String _id = $ex.getId (); - throw new org.omg.CORBA.MARSHAL (_id); - } catch (org.omg.CORBA.portable.RemarshalException $rm) { - return getObjectByArgument (dummy ); - } finally { - _releaseReply ($in); - } - } // getObjectByArgument + public org.apache.tuscany.sca.binding.corba.testing.references.DummyObject getObjectByArgument(org.apache.tuscany.sca.binding.corba.testing.references.DummyObject dummy) { + org.omg.CORBA.portable.InputStream $in = null; + try { + org.omg.CORBA.portable.OutputStream $out = _request("getObjectByArgument", true); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.write($out, dummy); + $in = _invoke($out); + org.apache.tuscany.sca.binding.corba.testing.references.DummyObject $result = + org.apache.tuscany.sca.binding.corba.testing.references.DummyObjectHelper.read($in); + return $result; + } catch (org.omg.CORBA.portable.ApplicationException $ex) { + $in = $ex.getInputStream(); + String _id = $ex.getId(); + throw new org.omg.CORBA.MARSHAL(_id); + } catch (org.omg.CORBA.portable.RemarshalException $rm) { + return getObjectByArgument(dummy); + } finally { + _releaseReply($in); + } + } // getObjectByArgument - // Type-specific CORBA::Object operations - private static String[] __ids = { - "IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"}; + // Type-specific CORBA::Object operations + private static String[] __ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/references/ObjectManager:1.0"}; - public String[] _ids () - { - return (String[])__ids.clone (); - } + public String[] _ids() { + return (String[])__ids.clone(); + } - private void readObject (java.io.ObjectInputStream s) throws java.io.IOException - { - String str = s.readUTF (); - String[] args = null; - java.util.Properties props = null; - org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); - org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); - _set_delegate (delegate); - } + private void readObject(java.io.ObjectInputStream s) throws java.io.IOException { + String str = s.readUTF(); + String[] args = null; + java.util.Properties props = null; + org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init(args, props).string_to_object(str); + org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate(); + _set_delegate(delegate); + } - private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException - { - String[] args = null; - java.util.Properties props = null; - String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); - s.writeUTF (str); - } + private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { + String[] args = null; + java.util.Properties props = null; + String str = org.omg.CORBA.ORB.init(args, props).object_to_string(this); + s.writeUTF(str); + } } // class _ObjectManagerStub diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java index 482b41102e..0aec4d278d 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ArraysSetterServant.java @@ -24,66 +24,66 @@ import org.apache.tuscany.sca.binding.corba.testing.generated._ArraysSetterImplB public class ArraysSetterServant extends _ArraysSetterImplBase { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public boolean[] setBoolean(boolean[] arg) { - return arg; - } + public boolean[] setBoolean(boolean[] arg) { + return arg; + } - public char[] setChar(char[] arg) { - return arg; - } + public char[] setChar(char[] arg) { + return arg; + } - public double[] setDouble(double[] arg) { - return arg; - } + public double[] setDouble(double[] arg) { + return arg; + } - public float[] setFloat(float[] arg) { - return arg; - } + public float[] setFloat(float[] arg) { + return arg; + } - public int[] setLong(int[] arg) { - return arg; - } + public int[] setLong(int[] arg) { + return arg; + } - public long[] setLongLong(long[] arg) { - return arg; - } + public long[] setLongLong(long[] arg) { + return arg; + } - public byte[] setOctet(byte[] arg) { - return arg; - } + public byte[] setOctet(byte[] arg) { + return arg; + } - public RemoteObject[] setRemoteObject(RemoteObject[] obj) { - return obj; - } + public RemoteObject[] setRemoteObject(RemoteObject[] obj) { + return obj; + } - public short[] setShort(short[] arg) { - return arg; - } + public short[] setShort(short[] arg) { + return arg; + } - public String[] setString(String[] arg) { - return arg; - } + public String[] setString(String[] arg) { + return arg; + } - public int[] setUnsignedLong(int[] arg) { - return arg; - } + public int[] setUnsignedLong(int[] arg) { + return arg; + } - public long[] setUnsignedLongLong(long[] arg) { - return arg; - } + public long[] setUnsignedLongLong(long[] arg) { + return arg; + } - public short[] setUnsignedShort(short[] arg) { - return arg; - } + public short[] setUnsignedShort(short[] arg) { + return arg; + } - public char[] setWchar(char[] arg) { - return arg; - } + public char[] setWchar(char[] arg) { + return arg; + } - public String[] setWstring(String[] arg) { - return arg; - } + public String[] setWstring(String[] arg) { + return arg; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java index 00fe8aef8f..fd789e19cb 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/CalcServant.java @@ -26,28 +26,27 @@ import org.apache.tuscany.sca.binding.corba.testing.exceptions.CalcPackage.NotSu public class CalcServant extends _CalcImplBase { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public double div(double arg1, double arg2) throws DivByZero { - if (arg2 == 0) { - DivByZero exception = new DivByZero(); - exception.arguments = new Arguments(arg1, arg2); - exception.info = "Error occured during div: div by zero"; - throw exception; - } else { - return arg1 / arg2; - } - } + public double div(double arg1, double arg2) throws DivByZero { + if (arg2 == 0) { + DivByZero exception = new DivByZero(); + exception.arguments = new Arguments(arg1, arg2); + exception.info = "Error occured during div: div by zero"; + throw exception; + } else { + return arg1 / arg2; + } + } - public double divForSmallArgs(double arg1, double arg2) throws DivByZero, - NotSupported { - if (arg1 > 100 || arg2 > 100) { - NotSupported exception = new NotSupported(); - exception.info = "arg1: " + arg1 + ", arg2: " + arg2; - throw exception; - } else { - return div(arg1, arg2); - } - } + public double divForSmallArgs(double arg1, double arg2) throws DivByZero, NotSupported { + if (arg1 > 100 || arg2 > 100) { + NotSupported exception = new NotSupported(); + exception.info = "arg1: " + arg1 + ", arg2: " + arg2; + throw exception; + } else { + return div(arg1, arg2); + } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java index 5214152767..2e205f1d0f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/DummyObjectServant.java @@ -24,19 +24,19 @@ import org.apache.tuscany.sca.binding.corba.testing.references._DummyObjectImplB public class DummyObjectServant extends _DummyObjectImplBase { - private static final long serialVersionUID = 1L; - private int retVal; + private static final long serialVersionUID = 1L; + private int retVal; - public DummyObjectServant() { - retVal = (int) System.currentTimeMillis(); - } + public DummyObjectServant() { + retVal = (int)System.currentTimeMillis(); + } - public int getLong() { - return retVal; - } + public int getLong() { + return retVal; + } - public DummyObject cloneObject() { - return new DummyObjectServant(); - } + public DummyObject cloneObject() { + return new DummyObjectServant(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java index 58cc370f10..52386aeef7 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/EnumManagerServant.java @@ -24,10 +24,10 @@ import org.apache.tuscany.sca.binding.corba.testing.enums._EnumManagerImplBase; public class EnumManagerServant extends _EnumManagerImplBase { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public Color getColor(Color color) { - return color; - } + public Color getColor(Color color) { + return color; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java index 00fc367139..dda8203f79 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/InvalidTypesServant.java @@ -23,12 +23,12 @@ import org.apache.tuscany.sca.binding.corba.testing.hierarchy.InvalidStruct1; public class InvalidTypesServant { - public InvalidStruct1 firstMethodWithInvalidArg() { - return null; - } - - public void secondMethodWithInvalidArg(InvalidStruct1 arg) { - - } - + public InvalidStruct1 firstMethodWithInvalidArg() { + return null; + } + + public void secondMethodWithInvalidArg(InvalidStruct1 arg) { + + } + } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java index b6a025e4db..20700a0392 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/NonCorbaServant.java @@ -23,14 +23,14 @@ import org.apache.tuscany.sca.binding.corba.testing.hierarchy.NonCorbaException; public class NonCorbaServant { - public String setString(String arg) { - return arg; - } + public String setString(String arg) { + return arg; + } - public void throwException() throws NonCorbaException { - NonCorbaException e = new NonCorbaException(); - e.someField = "test"; - throw e; - } + public void throwException() throws NonCorbaException { + NonCorbaException e = new NonCorbaException(); + e.someField = "test"; + throw e; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java index 92ff53dff5..213c7fbd7c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/ObjectManagerServant.java @@ -24,14 +24,14 @@ import org.apache.tuscany.sca.binding.corba.testing.references._ObjectManagerImp public class ObjectManagerServant extends _ObjectManagerImplBase { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public DummyObject getObjectByArgument(DummyObject arg) { - return arg; - } + public DummyObject getObjectByArgument(DummyObject arg) { + return arg; + } - public DummyObject getDummyObject() { - return new DummyObjectServant(); - } + public DummyObject getDummyObject() { + return new DummyObjectServant(); + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java index 71eae7f698..92e18741ae 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/PrimitivesSetterServant.java @@ -23,67 +23,67 @@ import org.apache.tuscany.sca.binding.corba.testing.generated.RemoteObject; import org.apache.tuscany.sca.binding.corba.testing.generated._PrimitivesSetterImplBase; public class PrimitivesSetterServant extends _PrimitivesSetterImplBase { - - private static final long serialVersionUID = 1L; - public boolean setBoolean(boolean arg) { - return arg; - } + private static final long serialVersionUID = 1L; - public char setChar(char arg) { - return arg; - } + public boolean setBoolean(boolean arg) { + return arg; + } - public double setDouble(double arg) { - return arg; - } + public char setChar(char arg) { + return arg; + } - public float setFloat(float arg) { - return arg; - } + public double setDouble(double arg) { + return arg; + } - public int setLong(int arg) { - return arg; - } + public float setFloat(float arg) { + return arg; + } - public long setLongLong(long arg) { - return arg; - } + public int setLong(int arg) { + return arg; + } - public byte setOctet(byte arg) { - return arg; - } + public long setLongLong(long arg) { + return arg; + } - public RemoteObject setRemoteObject(RemoteObject obj) { - return obj; - } + public byte setOctet(byte arg) { + return arg; + } - public short setShort(short arg) { - return arg; - } + public RemoteObject setRemoteObject(RemoteObject obj) { + return obj; + } - public String setString(String arg) { - return arg; - } + public short setShort(short arg) { + return arg; + } - public int setUnsignedLong(int arg) { - return arg; - } + public String setString(String arg) { + return arg; + } - public long setUnsignedLongLong(long arg) { - return arg; - } + public int setUnsignedLong(int arg) { + return arg; + } - public short setUnsignedShort(short arg) { - return arg; - } + public long setUnsignedLongLong(long arg) { + return arg; + } - public char setWchar(char arg) { - return arg; - } + public short setUnsignedShort(short arg) { + return arg; + } - public String setWstring(String arg) { - return arg; - } + public char setWchar(char arg) { + return arg; + } + + public String setWstring(String arg) { + return arg; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java index 0b16ddd27e..153268983f 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/servants/TestObjectServant.java @@ -32,41 +32,40 @@ import org.apache.tuscany.sca.binding.corba.testing.generated.long_seq3Holder; */ public class TestObjectServant extends _TestObjectImplBase { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - public int[] setLongSeq1(long_seq1Holder arg) { - return arg.value; - } + public int[] setLongSeq1(long_seq1Holder arg) { + return arg.value; + } - public int[][] setLongSeq2(long_seq2Holder arg) { - - return arg.value; - } + public int[][] setLongSeq2(long_seq2Holder arg) { - public int[][][] setLongSeq3(long_seq3Holder arg) { - return arg.value; - } + return arg.value; + } - public SimpleStruct setSimpleStruct(SimpleStructHolder arg) { - return arg.value; - } + public int[][][] setLongSeq3(long_seq3Holder arg) { + return arg.value; + } - public SomeStruct setStruct(SomeStruct arg) { - return arg; - } + public SimpleStruct setSimpleStruct(SimpleStructHolder arg) { + return arg.value; + } - public SomeStruct pickStructFromArgs(SomeStruct arg1, - SomeStruct arg2, SomeStruct arg3, int structNumber) { - switch (structNumber) { - case 1: - return arg1; - case 2: - return arg2; - case 3: - return arg3; - default: - return arg1; - } - } + public SomeStruct setStruct(SomeStruct arg) { + return arg; + } + + public SomeStruct pickStructFromArgs(SomeStruct arg1, SomeStruct arg2, SomeStruct arg3, int structNumber) { + switch (structNumber) { + case 1: + return arg1; + case 2: + return arg2; + case 3: + return arg3; + default: + return arg1; + } + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestDataType.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestDataType.java index 14e16de864..c051cae3ff 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestDataType.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestDataType.java @@ -28,60 +28,60 @@ import org.apache.tuscany.sca.interfacedef.DataType; */ public class TestDataType<L> implements DataType<L> { - public Class<?> typeClass; - public L logical; + public Class<?> typeClass; + public L logical; - public TestDataType(Class<?> typeClass) { - this.typeClass = typeClass; - } + public TestDataType(Class<?> typeClass) { + this.typeClass = typeClass; + } - public TestDataType(Class<?> typeClass, L logical) { - this.typeClass = typeClass; - this.logical = logical; - } + public TestDataType(Class<?> typeClass, L logical) { + this.typeClass = typeClass; + this.logical = logical; + } - public String getDataBinding() { - return null; - } + public String getDataBinding() { + return null; + } - public Type getGenericType() { - return null; - } + public Type getGenericType() { + return null; + } - public L getLogical() { - return logical; - } + public L getLogical() { + return logical; + } - public <T> T getMetaData(Class<T> arg0) { - return null; - } + public <T> T getMetaData(Class<T> arg0) { + return null; + } - public Class<?> getPhysical() { - return typeClass; - } + public Class<?> getPhysical() { + return typeClass; + } - public void setDataBinding(String arg0) { + public void setDataBinding(String arg0) { - } + } - public void setGenericType(Type arg0) { + public void setGenericType(Type arg0) { - } + } - public void setLogical(L arg0) { + public void setLogical(L arg0) { - } + } - public <T> void setMetaData(Class<T> arg0, T arg1) { + public <T> void setMetaData(Class<T> arg0, T arg1) { - } + } - public void setPhysical(Class<?> arg0) { + public void setPhysical(Class<?> arg0) { - } + } - public Object clone() { - return null; - } + public Object clone() { + return null; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterface.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterface.java index 8eb0ab24ef..8c74fd3a8c 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterface.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterface.java @@ -32,66 +32,66 @@ import org.apache.tuscany.sca.policy.PolicySet; */ public class TestInterface implements Interface { - private List<Operation> operations; + private List<Operation> operations; - public TestInterface(List<Operation> opearations) { - this.operations = opearations; - } + public TestInterface(List<Operation> opearations) { + this.operations = opearations; + } - public List<Operation> getOperations() { - return operations; - } + public List<Operation> getOperations() { + return operations; + } - public boolean isConversational() { - return false; - } + public boolean isConversational() { + return false; + } - public boolean isDynamic() { - return false; - } + public boolean isDynamic() { + return false; + } - public boolean isRemotable() { - return false; - } + public boolean isRemotable() { + return false; + } - public void resetDataBinding(String dataBinding) { + public void resetDataBinding(String dataBinding) { - } + } - public void setConversational(boolean conversational) { + public void setConversational(boolean conversational) { - } + } - public void setDefaultDataBinding(String dataBinding) { + public void setDefaultDataBinding(String dataBinding) { - } + } - public void setRemotable(boolean remotable) { + public void setRemotable(boolean remotable) { - } + } - public List<PolicySet> getApplicablePolicySets() { - return null; - } + public List<PolicySet> getApplicablePolicySets() { + return null; + } - public List<PolicySet> getPolicySets() { - return null; - } + public List<PolicySet> getPolicySets() { + return null; + } - public List<Intent> getRequiredIntents() { - return null; - } + public List<Intent> getRequiredIntents() { + return null; + } - public IntentAttachPointType getType() { - return null; - } + public IntentAttachPointType getType() { + return null; + } - public void setType(IntentAttachPointType type) { + public void setType(IntentAttachPointType type) { - } + } - public Object clone() { - return null; - } + public Object clone() { + return null; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterfaceContract.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterfaceContract.java index 35fd4731d6..7108ad194a 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterfaceContract.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestInterfaceContract.java @@ -28,30 +28,30 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; */ public class TestInterfaceContract implements InterfaceContract { - private Interface iface; + private Interface iface; - public Interface getCallbackInterface() { - return null; - } + public Interface getCallbackInterface() { + return null; + } - public Interface getInterface() { - return iface; - } + public Interface getInterface() { + return iface; + } - public InterfaceContract makeUnidirectional(boolean isCallback) { - return null; - } + public InterfaceContract makeUnidirectional(boolean isCallback) { + return null; + } - public void setCallbackInterface(Interface callbackInterface) { + public void setCallbackInterface(Interface callbackInterface) { - } + } - public void setInterface(Interface callInterface) { - this.iface = callInterface; - } + public void setInterface(Interface callInterface) { + this.iface = callInterface; + } - public Object clone() { - return null; - } + public Object clone() { + return null; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java index f7d65a0b51..e4b1d601c1 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestOperation.java @@ -39,135 +39,135 @@ import org.apache.tuscany.sca.policy.PolicySet; */ public class TestOperation implements Operation { - private DataType<List<DataType>> inputType; - private DataType outputType; - private String name; + private DataType<List<DataType>> inputType; + private DataType outputType; + private String name; - public ConversationSequence getConversationSequence() { - return null; - } + public ConversationSequence getConversationSequence() { + return null; + } - public String getDataBinding() { - return null; - } + public String getDataBinding() { + return null; + } - public Map<QName, List<DataType<XMLType>>> getFaultBeans() { - return null; - } + public Map<QName, List<DataType<XMLType>>> getFaultBeans() { + return null; + } - public List<DataType> getFaultTypes() { - return null; - } + public List<DataType> getFaultTypes() { + return null; + } - public DataType<List<DataType>> getInputType() { - return inputType; - } + public DataType<List<DataType>> getInputType() { + return inputType; + } - public Interface getInterface() { - return null; - } + public Interface getInterface() { + return null; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public DataType getOutputType() { - return outputType; - } + public DataType getOutputType() { + return outputType; + } - public WrapperInfo getWrapper() { - return null; - } + public WrapperInfo getWrapper() { + return null; + } - public boolean isDynamic() { - return false; - } + public boolean isDynamic() { + return false; + } - public boolean isNonBlocking() { - return false; - } + public boolean isNonBlocking() { + return false; + } - public boolean isUnresolved() { - return false; - } + public boolean isUnresolved() { + return false; + } - public boolean isWrapperStyle() { - return false; - } + public boolean isWrapperStyle() { + return false; + } - public void setConversationSequence(ConversationSequence sequence) { + public void setConversationSequence(ConversationSequence sequence) { - } + } - public void setDataBinding(String dataBinding) { + public void setDataBinding(String dataBinding) { - } + } - public void setDynamic(boolean b) { + public void setDynamic(boolean b) { - } + } - public void setFaultBeans(Map<QName, List<DataType<XMLType>>> faultBeans) { + public void setFaultBeans(Map<QName, List<DataType<XMLType>>> faultBeans) { - } + } - public void setFaultTypes(List<DataType> faultTypes) { + public void setFaultTypes(List<DataType> faultTypes) { - } + } - public void setInputType(DataType<List<DataType>> inputType) { - this.inputType = inputType; - } + public void setInputType(DataType<List<DataType>> inputType) { + this.inputType = inputType; + } - public void setInterface(Interface interfaze) { + public void setInterface(Interface interfaze) { - } + } - public void setName(String name) { - this.name = name; - } + public void setName(String name) { + this.name = name; + } - public void setNonBlocking(boolean nonBlocking) { + public void setNonBlocking(boolean nonBlocking) { - } + } - public void setOutputType(DataType outputType) { - this.outputType = outputType; - } + public void setOutputType(DataType outputType) { + this.outputType = outputType; + } - public void setUnresolved(boolean unresolved) { + public void setUnresolved(boolean unresolved) { - } + } - public void setWrapper(WrapperInfo wrapperInfo) { + public void setWrapper(WrapperInfo wrapperInfo) { - } + } - public void setWrapperStyle(boolean wrapperStyle) { + public void setWrapperStyle(boolean wrapperStyle) { - } + } - public List<PolicySet> getApplicablePolicySets() { - return null; - } + public List<PolicySet> getApplicablePolicySets() { + return null; + } - public List<PolicySet> getPolicySets() { - return null; - } + public List<PolicySet> getPolicySets() { + return null; + } - public Object clone() { - return null; - } + public Object clone() { + return null; + } - public List<Intent> getRequiredIntents() { - return null; - } + public List<Intent> getRequiredIntents() { + return null; + } - public IntentAttachPointType getType() { - return null; - } + public IntentAttachPointType getType() { + return null; + } - public void setType(IntentAttachPointType type) { - } + public void setType(IntentAttachPointType type) { + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeComponentService.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeComponentService.java index 594b8a8a38..58793c044e 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeComponentService.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeComponentService.java @@ -48,188 +48,182 @@ import org.apache.tuscany.sca.runtime.RuntimeWire; */ public class TestRuntimeComponentService implements RuntimeComponentService { - private InterfaceContract interfaceContract; - private RuntimeWire runtimeWire; - - public TestRuntimeComponentService(Object invocationTarget) { - runtimeWire = new TestRuntimeWire(invocationTarget); - List<Operation> operations = new ArrayList<Operation>(); - Method[] methods = invocationTarget.getClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - int mod = methods[i].getModifiers(); - if (methods[i].getDeclaringClass().equals(invocationTarget.getClass()) && Modifier.isPublic(mod) && !methods[i].getName().startsWith("_")) { - Operation operation = new TestOperation(); - DataType returnType = new TestDataType(methods[i] - .getReturnType()); - operation.setOutputType(returnType); - Class<?>[] argTypes = methods[i].getParameterTypes(); - List<DataType> argDataTypes = new ArrayList<DataType>(); - for (int j = 0; j < argTypes.length; j++) { - argDataTypes.add(new TestDataType(argTypes[j])); - } - TestDataType<List<DataType>> inputDataType = new TestDataType<List<DataType>>( - null, argDataTypes); - operation.setInputType(inputDataType); - operations.add(operation); - operation.setName(methods[i].getName()); - } - } - TestInterface iface = new TestInterface(operations); - interfaceContract = new TestInterfaceContract(); - interfaceContract.setInterface(iface); - } + private InterfaceContract interfaceContract; + private RuntimeWire runtimeWire; + + public TestRuntimeComponentService(Object invocationTarget) { + runtimeWire = new TestRuntimeWire(invocationTarget); + List<Operation> operations = new ArrayList<Operation>(); + Method[] methods = invocationTarget.getClass().getMethods(); + for (int i = 0; i < methods.length; i++) { + int mod = methods[i].getModifiers(); + if (methods[i].getDeclaringClass().equals(invocationTarget.getClass()) && Modifier.isPublic(mod) + && !methods[i].getName().startsWith("_")) { + Operation operation = new TestOperation(); + DataType returnType = new TestDataType(methods[i].getReturnType()); + operation.setOutputType(returnType); + Class<?>[] argTypes = methods[i].getParameterTypes(); + List<DataType> argDataTypes = new ArrayList<DataType>(); + for (int j = 0; j < argTypes.length; j++) { + argDataTypes.add(new TestDataType(argTypes[j])); + } + TestDataType<List<DataType>> inputDataType = new TestDataType<List<DataType>>(null, argDataTypes); + operation.setInputType(inputDataType); + operations.add(operation); + operation.setName(methods[i].getName()); + } + } + TestInterface iface = new TestInterface(operations); + interfaceContract = new TestInterfaceContract(); + interfaceContract.setInterface(iface); + } - public void addPolicyProvider(Binding binding, PolicyProvider policyProvider) { + public void addPolicyProvider(Binding binding, PolicyProvider policyProvider) { - } + } - public ServiceBindingProvider getBindingProvider(Binding binding) { - return null; - } + public ServiceBindingProvider getBindingProvider(Binding binding) { + return null; + } - public List<RuntimeWire> getCallbackWires() { - return null; - } + public List<RuntimeWire> getCallbackWires() { + return null; + } - public InvocationChain getInvocationChain(Binding binding, - Operation operation) { - return null; - } + public InvocationChain getInvocationChain(Binding binding, Operation operation) { + return null; + } - public InvocationChain getInvocationChain(Binding binding, - InterfaceContract interfaceContract, Operation operation) { - return null; - } + public InvocationChain getInvocationChain(Binding binding, InterfaceContract interfaceContract, Operation operation) { + return null; + } - public Invoker getInvoker(Binding binding, Operation operation) { - return null; - } + public Invoker getInvoker(Binding binding, Operation operation) { + return null; + } - public Invoker getInvoker(Binding binding, - InterfaceContract interfaceContract, Operation operation) { - return null; - } + public Invoker getInvoker(Binding binding, InterfaceContract interfaceContract, Operation operation) { + return null; + } - public List<PolicyProvider> getPolicyProviders(Binding binding) { - return null; - } + public List<PolicyProvider> getPolicyProviders(Binding binding) { + return null; + } - public RuntimeWire getRuntimeWire(Binding binding) { - return runtimeWire; - } + public RuntimeWire getRuntimeWire(Binding binding) { + return runtimeWire; + } - public RuntimeWire getRuntimeWire(Binding binding, - InterfaceContract interfaceContract) { - return null; - } + public RuntimeWire getRuntimeWire(Binding binding, InterfaceContract interfaceContract) { + return null; + } - public List<RuntimeWire> getRuntimeWires() { - return null; - } + public List<RuntimeWire> getRuntimeWires() { + return null; + } - public void setBindingProvider(Binding binding, - ServiceBindingProvider bindingProvider) { + public void setBindingProvider(Binding binding, ServiceBindingProvider bindingProvider) { - } + } - public ComponentReference getCallbackReference() { - return null; - } + public ComponentReference getCallbackReference() { + return null; + } - public Service getService() { - return null; - } + public Service getService() { + return null; + } - public void setCallbackReference(ComponentReference callbackReference) { + public void setCallbackReference(ComponentReference callbackReference) { - } + } - public void setService(Service service) { + public void setService(Service service) { - } + } - public InterfaceContract getInterfaceContract() { - return interfaceContract; - } + public InterfaceContract getInterfaceContract() { + return interfaceContract; + } - public String getName() { - return null; - } + public String getName() { + return null; + } - public boolean isCallback() { - return false; - } + public boolean isCallback() { + return false; + } - public void setInterfaceContract(InterfaceContract interfaceContract) { - this.interfaceContract = interfaceContract; - } + public void setInterfaceContract(InterfaceContract interfaceContract) { + this.interfaceContract = interfaceContract; + } - public void setIsCallback(boolean isCallback) { + public void setIsCallback(boolean isCallback) { - } + } - public void setName(String name) { + public void setName(String name) { - } + } - public boolean isUnresolved() { - return false; - } + public boolean isUnresolved() { + return false; + } - public void setUnresolved(boolean unresolved) { + public void setUnresolved(boolean unresolved) { - } + } - public List<Object> getExtensions() { - return null; - } + public List<Object> getExtensions() { + return null; + } - public List<Intent> getRequiredIntents() { - return null; - } + public List<Intent> getRequiredIntents() { + return null; + } - public IntentAttachPointType getType() { - return null; - } + public IntentAttachPointType getType() { + return null; + } - public void setType(IntentAttachPointType type) { + public void setType(IntentAttachPointType type) { - } + } - public List<ConfiguredOperation> getConfiguredOperations() { - return null; - } + public List<ConfiguredOperation> getConfiguredOperations() { + return null; + } - public <B> B getBinding(Class<B> bindingClass) { - return null; - } + public <B> B getBinding(Class<B> bindingClass) { + return null; + } - public List<Binding> getBindings() { - return null; - } + public List<Binding> getBindings() { + return null; + } - public Callback getCallback() { - return null; - } + public Callback getCallback() { + return null; + } - public <B> B getCallbackBinding(Class<B> bindingClass) { - return null; - } + public <B> B getCallbackBinding(Class<B> bindingClass) { + return null; + } - public void setCallback(Callback callback) { + public void setCallback(Callback callback) { - } + } - public List<PolicySet> getApplicablePolicySets() { - return null; - } + public List<PolicySet> getApplicablePolicySets() { + return null; + } - public List<PolicySet> getPolicySets() { - return null; - } + public List<PolicySet> getPolicySets() { + return null; + } - public Object clone() { - return null; - } + public Object clone() { + return null; + } } diff --git a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java index a5b478b868..96130eb793 100644 --- a/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java +++ b/java/sca/modules/binding-corba-runtime/src/test/java/org/apache/tuscany/sca/binding/corba/testing/service/mocks/TestRuntimeWire.java @@ -34,68 +34,66 @@ import org.apache.tuscany.sca.runtime.RuntimeWire; */ public class TestRuntimeWire implements RuntimeWire { - private Object invocationTarget; - - public TestRuntimeWire(Object invocationTarget) { - this.invocationTarget = invocationTarget; - } - - public InvocationChain getInvocationChain(Operation arg0) { - return null; - } - - public List<InvocationChain> getInvocationChains() { - return null; - } - - public EndpointReference getSource() { - return null; - } - - public EndpointReference getTarget() { - return null; - } - - public Object invoke(Operation operation, Object[] args) - throws InvocationTargetException { - Class<?>[] types = new Class<?>[args.length]; - for (int i = 0; i < args.length; i++) { - types[i] = args[i].getClass(); - } - Object result = null; - try { - Method[] methods = invocationTarget.getClass().getMethods(); - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equals(operation.getName())) { - result = methods[i].invoke(invocationTarget, args); - break; - } - } - } catch (InvocationTargetException e) { - throw e; - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - - return result; - } - - public Object invoke(Operation operation, Message arg1) - throws InvocationTargetException { - - return null; - } - - public void rebuild() { - - } - - public void setTarget(EndpointReference arg0) { - - } - - public Object clone() { - return null; - } + private Object invocationTarget; + + public TestRuntimeWire(Object invocationTarget) { + this.invocationTarget = invocationTarget; + } + + public InvocationChain getInvocationChain(Operation arg0) { + return null; + } + + public List<InvocationChain> getInvocationChains() { + return null; + } + + public EndpointReference getSource() { + return null; + } + + public EndpointReference getTarget() { + return null; + } + + public Object invoke(Operation operation, Object[] args) throws InvocationTargetException { + Class<?>[] types = new Class<?>[args.length]; + for (int i = 0; i < args.length; i++) { + types[i] = args[i].getClass(); + } + Object result = null; + try { + Method[] methods = invocationTarget.getClass().getMethods(); + for (int i = 0; i < methods.length; i++) { + if (methods[i].getName().equals(operation.getName())) { + result = methods[i].invoke(invocationTarget, args); + break; + } + } + } catch (InvocationTargetException e) { + throw e; + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + + return result; + } + + public Object invoke(Operation operation, Message arg1) throws InvocationTargetException { + + return null; + } + + public void rebuild() { + + } + + public void setTarget(EndpointReference arg0) { + + } + + public Object clone() { + return null; + } } |