Package org.apache.tuscany.sca.interfacedef.util

Examples of org.apache.tuscany.sca.interfacedef.util.ElementInfo


        List<ElementInfo> childElements =
            input ? operation.getInputWrapper().getChildElements() : operation.getOutputWrapper().getChildElements();
        List<String> childNames = new ArrayList<String>();
        Map<String, Object> values = new HashMap<String, Object>();
        for (int i = 0; i < childElements.size(); i++) {
            ElementInfo e = childElements.get(i);
            String name = e.getQName().getLocalPart();
            childNames.add(name);
            values.put(name, childObjects[i]);
        }
        // Get the property descriptor map
        Map<String, JAXBPropertyDescriptor> pdMap = null;
View Full Code Here


                // not be an issue. 
                if (matchingWsdlOp.isInputWrapperStyle()) {
                    if (op.getInputType().getLogical().size() == 1) {
                        // we only need to know what the wrapper is on the deserialization
                        // might need to change this when the input/output wrapper style is different
                        ElementInfo ei = op.getInputWrapper().getWrapperElement();
                        String namespace = ei.getQName().getNamespaceURI();
                        String opName = ei.getQName().getLocalPart();
                        OMNamespace ns = factory.createOMNamespace(namespace, "ns1");
                        OMElement wrapper = factory.createOMElement(opName, ns);
                        this.inputWrapperMap.put(name, wrapper);
                    }
                }
View Full Code Here

                }

                if (matchingWsdlOp.isOutputWrapperStyle()) {
                    // we only need to know what the wrapper is on the deserialization
                    // might need to change this when there input/output wrapper style is different
                    ElementInfo ei = op.getOutputWrapper().getWrapperElement();
                    String namespace = ei.getQName().getNamespaceURI();
                    String opName = ei.getQName().getLocalPart();
                    OMNamespace ns = factory.createOMNamespace(namespace, "ns2");
                    OMElement wrapper = factory.createOMElement(opName, ns);

                    this.outputWrapperMap.put(name, wrapper);
                }
View Full Code Here

    private static ElementInfo getElementInfo(XmlSchemaElement element) {
        if (element == null) {
            return null;
        }
        ElementInfo elementInfo = new ElementInfo(element.getQName(), getTypeInfo(element.getSchemaType()));
        elementInfo.setMany(element.getMaxOccurs() > 1);
        elementInfo.setNillable(element.isNillable());
        return elementInfo;
    }
View Full Code Here

   
    public void testCreate() {
        HelperContext context = HelperProvider.getDefaultContext();
        XSDHelper xsdHelper = context.getXSDHelper();
        xsdHelper.define(getClass().getResourceAsStream("/wrapper.xsd"), null);
        ElementInfo element = new ElementInfo(new QName("http://www.example.com/wrapper", "op"), null);
        Operation op = new OperationImpl();
        WrapperInfo wrapperInfo = new WrapperInfo(SDODataBinding.NAME, element, null);
        op.setInputWrapper(wrapperInfo);
        DataObject wrapper = (DataObject) handler.create(op, true);
        assertNotNull(wrapper);
View Full Code Here

        }
        */

        public WrapperInfo getInputWrapperInfo() throws InvalidWSDLException {
            if (inputWrapperInfo == null) {
                ElementInfo in = getElementInfo(getInputWrapperElement());
                List<ElementInfo> inChildren = new ArrayList<ElementInfo>();
                if (in != null) {
                    for (XmlSchemaElement e : getInputChildElements()) {
                        inChildren.add(getElementInfo(e));
                    }
View Full Code Here

            return inputWrapperInfo;
        }

        public WrapperInfo getOutputWrapperInfo() throws InvalidWSDLException {
            if (outputWrapperInfo == null) {
                ElementInfo out = getElementInfo(getOutputWrapperElement());
                List<ElementInfo> outChildren = new ArrayList<ElementInfo>();
                if (out != null) {
                    for (XmlSchemaElement e : getOutputChildElements()) {
                        outChildren.add(getElementInfo(e));
                    }
View Full Code Here

    public OMElement create(Operation operation, boolean input) {
        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();

        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() :
            outputWrapperInfo.getWrapperElement();
       
        OMElement wrapper = AxiomHelper.createOMElement(factory, element.getQName());
        return wrapper;
    }
View Full Code Here

     */
    public DataType getWrapperType(Operation operation, boolean input) {
        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();

        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() :
            outputWrapperInfo.getWrapperElement();
       
        DataType<XMLType> wrapperType =
            new DataTypeImpl<XMLType>(AxiomDataBinding.NAME, OMElement.class, new XMLType(element));
        return wrapperType;
View Full Code Here

    public boolean isInstance(Object wrapperObj, Operation operation, boolean input) {
        WrapperInfo inputWrapperInfo = operation.getInputWrapper();
        WrapperInfo outputWrapperInfo = operation.getOutputWrapper();

        ElementInfo element = input ? inputWrapperInfo.getWrapperElement() :
            outputWrapperInfo.getWrapperElement();
       
        OMElement wrapper = (OMElement)wrapperObj;
        if (!element.getQName().equals(wrapper.getQName())) {
            return false;
        }
        return true;
        /*
        Set<QName> names = new HashSet<QName>();
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.interfacedef.util.ElementInfo

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.