Examples of JAXBDataBindingCallback


Examples of org.objectweb.celtix.bus.jaxws.JAXBDataBindingCallback

        // First try call the operation using a void return type
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleOutParam", params));
        bindingImpl.unmarshal(corbaContext,
                              objContext,
                              new JAXBDataBindingCallback(objContext.getMethod(),
                                                          DataBindingCallback.Mode.MESSAGE,
                                                          null));
       
        Object[] resultArgs = objContext.getMessageObjects();
        // In this case, there should be no parameters since the out param is mapped to the return type
        assertTrue(resultArgs == null);
       
        // Now try the call with a return type
        params = new Class[1];
        params[0] = new Holder<Short>().getClass();
       
        corbaContext.put(ObjectMessageContext.MESSAGE_INPUT, false);
        corbaContext.getMessage().setStreamableReturn(arg0);
        objContext = new ObjectMessageContextImpl();
        objContext.setMethod(paramModesClass.getMethod("testSingleOutParamWithReturn", params));
        objContext.setMessageObjects(new Holder<Short>(new Short((short)0)));
       
        bindingImpl.unmarshal(corbaContext,
                              objContext,
                              new JAXBDataBindingCallback(objContext.getMethod(),
                                                          DataBindingCallback.Mode.MESSAGE,
                                                          null));
       
        resultArgs = objContext.getMessageObjects();
        assertTrue(resultArgs.length == 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.