Package javax.wsdl

Examples of javax.wsdl.QName


        Iterator i = parts.iterator();

        while (i.hasNext()) {
            Part part = (Part) i.next();
           
            QName qType = part.getTypeName();
            if (qType != null) {
                v.add(symbolTable.getType(qType));
            } else {
                qType = part.getElementName();
                if (qType != null) {
View Full Code Here


            pw.println("            Class simplesf = org.apache.axis.encoding.ser.SimpleNonPrimitiveSerializerFactory.class;");
            pw.println("            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;");
        }
        firstSer = false ;

        QName qname = type.getQName();

        pw.println("            qName = new javax.xml.rpc.namespace.QName(\""
                   + qname.getNamespaceURI() + "\", \"" + qname.getLocalPart()
                   + "\");");
        pw.println("            cachedSerQNames.add(qName);");
        pw.println("            cls = " + type.getName() + ".class;");
        pw.println("            cachedSerClasses.add(cls);");
        if (type.getName().endsWith("[]")) {
View Full Code Here

            // We need to use the Qname of the actual type, not the QName of the element
            TypeEntry type = p.getType();
            if (type instanceof DefinedElement) {
                type = type.getRefType();
            }
            QName qn = type.getQName();
            String javaType = type.getName();

            if (javaType != null) {
                javaType += ".class, ";
            } else {
                javaType = "";
            }

            String typeString = "new javax.xml.rpc.namespace.QName(\"" +
                    qn.getNamespaceURI() + "\", \"" +
                    qn.getLocalPart() + "\")";
            QName paramQName = p.getQName();
            String qnName = "p" + i + "QName";
            pw.println("        javax.xml.rpc.namespace.QName " + qnName + " = new javax.xml.rpc.namespace.QName(\"" +
                    paramQName.getNamespaceURI() + "\", \"" +
                    paramQName.getLocalPart() + "\");");
            if (p.getMode() == Parameter.IN) {
                pw.println("        call.addParameter(" + qnName + ", "
                           + typeString + ", "
                           + javaType + "javax.xml.rpc.ParameterMode.IN);");
            }
            else if (p.getMode() == Parameter.INOUT) {
                pw.println("        call.addParameter(" + qnName + ", "
                           + typeString + ", "
                           + javaType + "javax.xml.rpc.ParameterMode.INOUT);");
            }
            else { // p.getMode() == Parameter.OUT
                pw.println("        call.addParameter(" + qnName + ", "
                           + typeString + ", "
                           + javaType + "javax.xml.rpc.ParameterMode.OUT);");
            }
        }
        // set output type
        if (parms.returnType != null) {
            // We need to use the Qname of the actual type, not the QName of the element
            QName qn = parms.returnType.getQName();
            if (parms.returnType instanceof DefinedElement) {
                Node node = symbolTable.getTypeEntry(parms.returnType.getQName(), true).getNode();
                QName qn2 = Utils.getNodeTypeRefQName(node, "type");
                if (qn2 != null) {
                    qn = qn2;
                }
            }
View Full Code Here

        // If the node has "type" and "maxOccurs" then the type is really
        // a collection.  There is no qname in the wsdl which we can use to represent
        // the collection, so we need to invent one.
        // The local part of the qname is changed to <local>[minOccurs, maxOccurs]
        // The namespace uri is changed to the targetNamespace of this node
        QName qName= getNodeTypeRefQName(node, "type");
        if (qName != null) {
            String maxOccursValue = getAttribute(node, "maxOccurs");
            String minOccursValue = getAttribute(node, "minOccurs");
            if (maxOccursValue == null) {
                maxOccursValue = "1";
            }
            if (minOccursValue == null) {
                minOccursValue = "1";
            }
            if (minOccursValue.equals("0") && maxOccursValue.equals("1")) {
                // If we have a minoccurs="0"/maxoccurs="1", this is just
                // like a nillable single value, so treat it as such.
                qName = getNillableQName(qName);
            } else if (!maxOccursValue.equals("1") || !minOccursValue.equals("1")) {
                String localPart = qName.getLocalPart();
//                localPart += "[" + minOccursValue + "," + maxOccursValue + "]";
//                qName.setLocalPart(localPart);
//                String namespace = getScopedAttribute(node, "targetNamespace");
//                if (namespace != null)
//                    qName.setNamespaceURI(namespace);
                localPart += "[" + maxOccursValue + "]";
                qName.setLocalPart(localPart);
            }
        }

        // Both "ref" and "element" reference elements
        if (qName == null) {
View Full Code Here

            typeAttrName.equals("type")) {
            if (getAttribute(node, "ref") == null &&
                getAttribute(node, "base") == null &&
                getAttribute(node, "element") == null &&
                SchemaUtils.getElementAnonQName(node) == null) {
                QName nodeName = getNodeQName(node);
                if (nodeName != null &&
                    Constants.isSchemaXSD(nodeName.getNamespaceURI()) &&
                    (nodeName.getLocalPart().equals("element") ||
                     nodeName.getLocalPart().equals("attribute"))) {
                    return getWSDLQName(Constants.XSD_ANYTYPE);
                }
            }             
        }
        
        // Return null if not found
        if (prefixedName == null) {
            return null;
        }
        // Change the prefixed name into a full qname
        QName qName = getQNameFromPrefixedName(node,prefixedName);

        // An alternate qname is returned if nillable
        if (typeAttrName.equals("type")) {
            String nillable = getAttribute(node, "nillable");
            if (nillable != null && nillable.equalsIgnoreCase("true")) {
View Full Code Here

           namespace = getScopedAttribute(node, "xmlns")// Get namespace for unqualified reference
        }
        else {
           namespace = getScopedAttribute(node, "xmlns:" + prefixedName.substring(0, prefixedName.lastIndexOf(":")));
        }
        return (new QName(namespace, localName));
    }
View Full Code Here

         */
        Message faultMessage = fault.getMessage();
        String exceptionName;
        if (faultMessage != null) {
            String faultName = faultMessage.getQName().getLocalPart();
            QName qname = new QName(namespace, faultName);
            exceptionName = symbolTable.getJavaName(qname);
        } else {
            exceptionName = xmlNameToJavaClass(fault.getName());
        }
        return exceptionName;
View Full Code Here

                }
            }
        }
       
        // Get the anonymous type of the element
        QName anonQName = SchemaUtils.getElementAnonQName(node);
        if (anonQName != null) {
            TypeEntry anonType = symbolTable.getType(anonQName);
            if (anonType != null && !types.contains(anonType)) {
                types.add(anonType);
            }
        }

        // Process extended types
        TypeEntry extendType = SchemaUtils.getComplexElementExtensionBase(node, symbolTable);
        if (extendType != null) {
            if (!types.contains(extendType)) {
                types.add(extendType);
                getNestedTypes(extendType, types, symbolTable, derivedFlag);
            }
        }

        // Process array element types
        QName elementQName = SchemaUtils.getArrayElementQName(node, new IntHolder(0));
        TypeEntry elementType = symbolTable.getType(elementQName);
        if (elementType != null) {
            if (!types.contains(elementType)) {
                types.add(elementType);
                getNestedTypes(elementType, types, symbolTable, derivedFlag);
View Full Code Here

    public static QName getWSDLQName(javax.xml.rpc.namespace.QName qname)
    {
        if (qname == null) {
            return null;
        }
        return new QName(qname.getNamespaceURI(), qname.getLocalPart());
    }
View Full Code Here

        // iterate over fault list, emitting code.
        Iterator fi = faults.entrySet().iterator();
        while (fi.hasNext()) {
            Map.Entry entry = (Map.Entry) fi.next();
            Fault fault = (Fault) entry.getKey();
            QName faultQName = (QName) entry.getValue();
            new JavaFaultWriter(emitter, faultQName, fault, symbolTable).write();
        }
    } // writeFaults
View Full Code Here

TOP

Related Classes of javax.wsdl.QName

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.