Package org.apache.tuscany.spi.idl

Examples of org.apache.tuscany.spi.idl.WrapperInfo


                    for (XmlSchemaElement e : getOutputChildElements()) {
                        outChildren.add(getElementInfo(e));
                    }
                }
                wrapperInfo =
                        new WrapperInfo(in, out, inChildren, outChildren, getUnwrappedInputType(), getUnwrappedOutputType());
            }
            return wrapperInfo;
        }
View Full Code Here


                targetWrapperHandler = getWapperHandler(targetOp);
            }

            if ((!sourceWrapped) && targetWrapped) {
                // Unwrapped --> Wrapped
                WrapperInfo wrapper = targetOp.getWrapper();
                Object targetWrapper =
                    targetWrapperHandler.create(wrapper.getOutputWrapperElement(), context);
                if (response == null) {
                    return targetWrapper;
                }

                ElementInfo argElement = wrapper.getOutputChildElements().get(0);
                DataType<QName> argType = wrapper.getUnwrappedOutputType();
                Object child = response;
                child = mediator.mediate(response, sourceType.getLogical(), argType, context.getMetadata());
                targetWrapperHandler.setChild(targetWrapper, 0, argElement, child);
                return targetWrapper;
            } else if (sourceWrapped && (!targetWrapped)) {
View Full Code Here

            targetWrapperHandler = getWapperHandler(targetType.getLogical().get(0).getDataBinding(), true);
        }

        if ((!sourceWrapped) && targetWrapped) {
            // Unwrapped --> Wrapped
            WrapperInfo wrapper = targetOp.getWrapper();
            ElementInfo wrapperElement = wrapper.getInputWrapperElement();

            // If the source can be wrapped, wrapped it first
            if (sourceWrapperHandler != null) {
                Object sourceWrapper = sourceWrapperHandler.create(wrapperElement, context);
                for (int i = 0; i < source.length; i++) {
                    ElementInfo argElement = wrapper.getInputChildElements().get(i);
                    sourceWrapperHandler.setChild(sourceWrapper, i, argElement, source[0]);
                }
            }
            Object targetWrapper = targetWrapperHandler.create(wrapperElement, context);
            if (source == null) {
                return new Object[] {targetWrapper};
            }
            List<DataType<QName>> argTypes = wrapper.getUnwrappedInputType().getLogical();

            for (int i = 0; i < source.length; i++) {
                ElementInfo argElement = wrapper.getInputChildElements().get(i);
                DataType<QName> argType = argTypes.get(i);
                Object child = source[i];
                child =
                    mediator.mediate(source[i], sourceType.getLogical().get(i), argType, context
                        .getMetadata());
View Full Code Here

                                                                                               null));

        responseType.setMetadata(ElementInfo.class.getName(), inputElement);
        responseType.setMetadata(OPERATION_KEY, op);

        WrapperInfo wrapperInfo =
            new WrapperInfo(inputElement, outputElement, inputElements, outputElements, inputType, statusType);
        op.setWrapper(wrapperInfo);
        op.setDataBinding(DOMDataBinding.NAME);

        MediatorImpl m = new MediatorImpl();
        TransformerRegistryImpl tr = new TransformerRegistryImpl();
View Full Code Here

TOP

Related Classes of org.apache.tuscany.spi.idl.WrapperInfo

Copyright © 2018 www.massapicom. 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.