Examples of BooleanHolder


Examples of javax.xml.rpc.holders.BooleanHolder

        if (isXSDNode(node, "element"))
        {

            // Compare the componentQName with the name of the
            // full name.  If different, return componentQName
            BooleanHolder forElement = new BooleanHolder();
            QName componentQName = Utils.getTypeQName(node, forElement, true);

            if (componentQName != null)
            {
                QName fullQName = Utils.getTypeQName(node, forElement, false);
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

            if (restrictionNode != null)
            {
                baseType =
                    Utils.getTypeQName(
                        restrictionNode,
                        new BooleanHolder(),
                        false);

                if (baseType != null)
                {
                    if (!baseType.getLocalPart().equals("Array")
                        || !Constants.isSOAP_ENC(baseType.getNamespaceURI()))
                    {
                        if (!symbolTable.arrayTypeQNames.contains(baseType))
                        {
                            baseType = null; // Did not find base=soapenc:Array
                        }
                    }
                }
            }

            // Under the restriction there should be an attribute OR a sequence/all group node.
            // (There may be other #text nodes, which we will ignore).
            Node groupNode = null;
            Node attributeNode = null;

            if (baseType != null)
            {
                children = restrictionNode.getChildNodes();

                for (int j = 0;
                    (j < children.getLength())
                        && (groupNode == null)
                        && (attributeNode == null);
                    j++)
                {
                    Node kid = children.item(j);

                    if (isXSDNode(kid, "sequence") || isXSDNode(kid, "all"))
                    {
                        groupNode = kid;

                        if (groupNode.getChildNodes().getLength() == 0)
                        {

                            // This covers the rather odd but legal empty sequence.
                            // <complexType name="ArrayOfString">
                            // <complexContent>
                            // <restriction base="soapenc:Array">
                            // <sequence/>
                            // <attribute ref="soapenc:arrayType" wsdl:arrayType="string[]"/>
                            // </restriction>
                            // </complexContent>
                            // </complexType>
                            groupNode = null;
                        }
                    }

                    if (isXSDNode(kid, "attribute"))
                    {

                        // If the attribute node does not have ref="soapenc:arrayType"
                        // then keep looking.
                        BooleanHolder isRef = new BooleanHolder();
                        QName refQName = Utils.getTypeQName(kid, isRef, false);

                        if ((refQName != null)
                            && isRef.value
                            && refQName.getLocalPart().equals("arrayType")
                            && Constants.isSOAP_ENC(refQName.getNamespaceURI()))
                        {
                            attributeNode = kid;
                        }
                    }
                }
            }

            // If there is an attribute node, look at wsdl:arrayType to get the element type
            if (attributeNode != null)
            {
                String wsdlArrayTypeValue = null;
                Vector attrs =
                    Utils.getAttributesWithLocalName(
                        attributeNode,
                        "arrayType");

                for (int i = 0;
                    (i < attrs.size()) && (wsdlArrayTypeValue == null);
                    i++)
                {
                    Node attrNode = (Node) attrs.elementAt(i);
                    String attrName = attrNode.getNodeName();
                    QName attrQName =
                        Utils.getQNameFromPrefixedName(attributeNode, attrName);

                    if (Constants.isWSDL(attrQName.getNamespaceURI()))
                    {
                        wsdlArrayTypeValue = attrNode.getNodeValue();
                    }
                }

                // The value could have any number of [] or [,] on the end
                // Strip these off to get the prefixed name.
                // The convert the prefixed name into a qname.
                // Count the number of [ and , to get the dim information.
                if (wsdlArrayTypeValue != null)
                {
                    int i = wsdlArrayTypeValue.indexOf('[');

                    if (i > 0)
                    {
                        String prefixedName =
                            wsdlArrayTypeValue.substring(0, i);
                        String mangledString =
                            wsdlArrayTypeValue.replace(',', '[');

                        dims.value = 0;

                        int index = mangledString.indexOf('[');

                        while (index > 0)
                        {
                            dims.value++;

                            index = mangledString.indexOf('[', index + 1);
                        }

                        return Utils.getQNameFromPrefixedName(
                            restrictionNode,
                            prefixedName);
                    }
                }
            }
            else
                if (groupNode != null)
                {

                    // Get the first element node under the group node.
                    NodeList elements = groupNode.getChildNodes();
                    Node elementNode = null;

                    for (int i = 0;
                        (i < elements.getLength()) && (elementNode == null);
                        i++)
                    {
                        Node kid = elements.item(i);

                        if (isXSDNode(kid, "element"))
                        {
                            elementNode = elements.item(i);

                            break;
                        }
                    }

                    // The element node should have maxOccurs="unbounded" and
                    // a type
                    if (elementNode != null)
                    {
                        String maxOccursValue =
                            Utils.getAttribute(elementNode, "maxOccurs");

                        if ((maxOccursValue != null)
                            && maxOccursValue.equalsIgnoreCase("unbounded"))
                        {

                            // Get the QName of the type without considering maxOccurs
                            dims.value = 1;

                            return Utils.getTypeQName(
                                elementNode,
                                new BooleanHolder(),
                                true);
                        }
                    }
                }
        }
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

        // Get the name and type qnames.
        // The type qname is used to locate the TypeEntry, which is then
        // used to retrieve the proper java name of the type.
        QName attributeName = Utils.getNodeNameQName(child);
        BooleanHolder forElement = new BooleanHolder();
        QName attributeType = Utils.getTypeQName(child, forElement, false);

        // An attribute is either qualified or unqualified.
        // If the ref= attribute is used, the name of the ref'd element is used
        // (which must be a root element).  If the ref= attribute is not
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

      // The restriction node indicates the type being restricted
      // (the base attribute contains this type).
      // The base type must be a simple type, and not boolean
      TypeEntry baseEType = null;
      if (restrictionNode != null) {
        QName baseType = Utils.getTypeQName(restrictionNode, new BooleanHolder(), false);
        baseEType = symbolTable.getType(baseType);
        if (baseEType != null) {
          String javaName = TypeMap.getBasicTypeClass4qname(baseEType.getQName());
          //String javaName = baseEType.getName();
          if (javaName == null || javaName.equals("boolean") ||
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

                // and element=.
                createTypeFromDef(node, true, level > SCHEMA_LEVEL);
            }
            else if (isXSD && localPart.equals("attribute")) {
                // Create a type entry for the referenced type
                BooleanHolder forElement = new BooleanHolder();
                QName refQName = Utils.getTypeQName(node, forElement, false);

                if (refQName != null && !forElement.value) {
                    createTypeFromRef(node);
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

                return;
            }

            // If the node has a type or ref attribute, get the
            // qname representing the type
            BooleanHolder forElement = new BooleanHolder();
            QName refQName = Utils.getTypeQName(node, forElement, false);

            if (refQName != null) {
                // Error check - bug 12362
                if (qName.getLocalPart().length() == 0) {
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

     * Node may contain a reference (via type=, ref=, or element= attributes) to
     * another type.  Create a Type object representing this referenced type.
     */
    private void createTypeFromRef(Node node) throws IOException {
        // Get the QName of the node's type attribute value
        BooleanHolder forElement = new BooleanHolder();
        QName qName = Utils.getTypeQName(node, forElement, false);
        if (qName != null) {
            // Error check - bug 12362
            if (qName.getLocalPart().length() == 0) {
                String name = Utils.getAttribute(node, "name");
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

            //    <element name="bar"...>  <--- This one
            node = getTypeEntry(elementName, true).getNode();

            // Check if this element is of the form:
            //    <element name="foo" type="tns:foo_type"/>
            BooleanHolder forElement = new BooleanHolder();
            QName type = Utils.getTypeQName(node, forElement, false);
            if (type != null && !forElement.value) {
                // If in fact we have such a type, go get the node that
                // corresponds to THAT definition.
                node = getTypeEntry(type, false).getNode();
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

        // isReferenced flag if this entry exists in the immediate WSDL file.
        Node node = entry.getNode();
        if (addImports || node == null || node.getOwnerDocument() == doc) {
            entry.setIsReferenced(true);
            if (entry instanceof DefinedElement) {
                BooleanHolder forElement = new BooleanHolder();
                QName referentName = Utils.getTypeQName(node, forElement, false);
                if (referentName != null) {
                    TypeEntry referent = getTypeEntry(referentName, forElement.value);
                    if (referent != null) {
                        setTypeReferences(referent, doc, literal);
View Full Code Here

Examples of javax.xml.rpc.holders.BooleanHolder

        while (ops.hasNext()) {
            Operation op = (Operation) ops.next();
            OperationType type = op.getStyle();
            Parameters params = bEntry.getParameters(op);
            // did we emit a constructor that throws?
            BooleanHolder bThrow = new BooleanHolder(false);

            // These operation types are not supported.  The signature
            // will be a string stating that fact.
            if (type == OperationType.NOTIFICATION
                    || type == OperationType.SOLICIT_RESPONSE) {
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.