Package org.apache.woden.wsdl20.xml

Examples of org.apache.woden.wsdl20.xml.InterfaceElement


    public InterfaceElement getExtendedInterfaceElement(QName interfaceName)
    {
        //Cast the containing description element to a description component to re-use its
        //logic for navigating a composite wsdl to retrieve the in-scope top-level components.
        Description desc = (Description)fParentElem;
        InterfaceElement intface = (InterfaceElement)desc.getInterface(interfaceName);
        return intface;
    }
View Full Code Here


    {
        List interfaces = new Vector();
        for(Iterator it = fExtends.iterator(); it.hasNext();)
        {
            QName qn = (QName)it.next();
            InterfaceElement intface = getExtendedInterfaceElement(qn);
            if(intface != null) interfaces.add(intface);
        }
       
        InterfaceElement[] array = new InterfaceElement[interfaces.size()];
        interfaces.toArray(array);
View Full Code Here

     */
    public XmlSchemaElement getXmlSchemaElement()
    {
        XmlSchemaElement xse = null;
        if (fElement != null && fElement.isQName()) {
            InterfaceElement interfac = (InterfaceElement)getParentElement();
            DescriptionElement desc = (DescriptionElement)interfac.getParentElement();
            TypesElement types = desc.getTypesElement();
            if(types != null) {
                xse = ((TypesImpl)types).getElementDeclaration(fElement.getQName());
            }
        }
View Full Code Here

    {
        //Cast the containing description element to a description component to re-use its
        //logic for navigating a composite wsdl to retrieve the in-scope top-level components.
        Description desc = (Description)fParentElem;
       
        InterfaceElement interfac = (InterfaceElement)desc.getInterface(fInterfaceName);
        return interfac;

    }
View Full Code Here

    private InterfaceElement parseInterface(
            XMLElement interfaceEl,
            DescriptionElement desc)
            throws WSDLException {
       
        InterfaceElement intface = desc.addInterfaceElement();

        String name = interfaceEl.getAttributeValue(Constants.ATTR_NAME);

        if(name != null)
        {
            intface.setName(new NCName(name));
        }

        String styleDefault = interfaceEl.getAttributeValue(Constants.ATTR_STYLE_DEFAULT);
        if(styleDefault != null)
        {
            List stringList = StringUtils.parseNMTokens(styleDefault);
            String uriString = null;
            Iterator it = stringList.iterator();
            while(it.hasNext())
            {
                uriString = (String)it.next();
                intface.addStyleDefaultURI(getURI(uriString));
            }
        }

        String extendsAtt = interfaceEl.getAttributeValue(Constants.ATTR_EXTENDS);
        if(extendsAtt != null)
        {
            List stringList = StringUtils.parseNMTokens(extendsAtt);
            String qnString = null;
            Iterator it = stringList.iterator();
            while(it.hasNext())
            {
                qnString = (String)it.next();
                intface.addExtendedInterfaceName(interfaceEl.getQName(qnString));
            }
        }

        parseExtensionAttributes(interfaceEl, InterfaceElement.class, intface, desc);

        /* Parse the child elements of <interface>.
         * As per WSDL 2.0 spec, they must be in the following order if present:
         * <documentation>
         * <fault> <operation> or extension elements in any order
         * TODO validate that the elements are in correct order
         */

        XMLElement[] children = interfaceEl.getChildElements();
        XMLElement tempEl = null;
        QName tempElQN = null;

        for(int i=0; i<children.length; i++)
        {
            tempEl = children[i];
            tempElQN = tempEl.getQName();

            if (Constants.Q_ELEM_DOCUMENTATION.equals(tempElQN))
            {
                parseDocumentation(tempEl, desc, intface);
            }
            else if (Constants.Q_ELEM_FAULT.equals(tempElQN))
            {
                parseInterfaceFault(tempEl, desc, intface);
            }
            else if (Constants.Q_ELEM_OPERATION.equals(tempElQN))
            {
                parseInterfaceOperation(tempEl, desc, intface);
            }
            else
            {
                intface.addExtensionElement(
                        parseExtensionElement(InterfaceElement.class, intface, tempEl, desc) );
            }
        }

        return intface;
View Full Code Here

            String tagName =
                DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                           Constants.ELEM_INTERFACE,
                           des);
            for(int ind=0;ind<intrfaces.length;ind++){
                InterfaceElement intrface = intrfaces[ind];
                if (intrface!=null){
                    pw.print("  <" + tagName);
                    QName name = intrface.getName();
                    if (name != null){
                        DOMUtils.printAttribute(Constants.ATTR_NAME,
                                name.getLocalPart(),
                                pw);
                    }

                    QName[] extendedInterfaces = intrface.getExtendedInterfaceNames();
                    String attrExtendedInterfaces="";
                    for(int i=0;i<extendedInterfaces.length;i++){                     
                        if(extendedInterfaces[i]!=null){
                          attrExtendedInterfaces=attrExtendedInterfaces + DOMUtils.
                                  getQualifiedValue(extendedInterfaces[i].getNamespaceURI(),
                                      extendedInterfaces[i].getLocalPart(), des);
                          if(i!=extendedInterfaces.length-1){
                            attrExtendedInterfaces=attrExtendedInterfaces+ " ";
                           
                          }
                          
                        }
                    }
                    if(extendedInterfaces.length>0){
                      DOMUtils.printAttribute(Constants.ATTR_EXTENDS,attrExtendedInterfaces,pw);                     
                    }
                   

                    URI[] styleDefaults = intrface.getStyleDefault();
                    for(int i=0;i<styleDefaults.length;i++){

                        URI styleDefault=styleDefaults[i];

                        if(styleDefault!=null){

                            DOMUtils.printAttribute(
                                    Constants.ATTR_STYLE_DEFAULT,
                                    styleDefault.toString(),
                                    pw);
                        }
                    }
                    printExtensibilityAttributes(intrface.getExtensionAttributes(), intrface, pw);
                    pw.println('>');
                    printDocumentation(intrface.getDocumentationElements(), des, pw);
                    printOperations(intrface.getInterfaceOperationElements(), des, pw);
                    printFaults(intrface.getInterfaceFaultElements(), des, pw);                  
                    printExtensibilityElements(intrface.getClass(), intrface.getExtensionElements(), des, pw);
                    pw.println("  </" + tagName + '>');
                }
            }
        }
     }
View Full Code Here

                    DOMUtils.printAttribute(Constants.ATTR_NAME,
                            name.getLocalPart(),
                            pw);
                }

                InterfaceElement intrface = binding.getInterfaceElement();
                if (intrface != null){


                    QName interfaceName=intrface.getName();
                    if(interfaceName!=null)
                    DOMUtils.printQualifiedAttribute(Constants.ATTR_INTERFACE,
                            interfaceName,
                            des,
                            pw);
View Full Code Here

            String tagName =
                OMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                           Constants.ELEM_INTERFACE,
                           des);
            for(int ind=0;ind<intrfaces.length;ind++){
                InterfaceElement intrface = intrfaces[ind];
                if (intrface!=null){
                    pw.print("  <" + tagName);
                    QName name = intrface.getName();
                    if (name != null){
                        OMUtils.printAttribute(Constants.ATTR_NAME,
                                name.getLocalPart(),
                                pw);
                    }
                   
                    QName[] extendedInterfaces = intrface.getExtendedInterfaceNames();
                    String attrExtendedInterfaces="";
                    for(int i=0;i<extendedInterfaces.length;i++){                     
                        if(extendedInterfaces[i]!=null){
                          attrExtendedInterfaces=attrExtendedInterfaces + OMUtils.
                                  getQualifiedValue(extendedInterfaces[i].getNamespaceURI(),
                                      extendedInterfaces[i].getLocalPart(), des);
                          if(i!=extendedInterfaces.length-1){
                            attrExtendedInterfaces=attrExtendedInterfaces+ " ";
                           
                          }
                          
                        }
                    }
                    if(extendedInterfaces.length>0){
                      OMUtils.printAttribute(Constants.ATTR_EXTENDS,attrExtendedInterfaces,pw);                     
                    }                   
          
                    URI[] styleDefaults = intrface.getStyleDefault();
                    for(int i=0;i<styleDefaults.length;i++){

                        URI styleDefault=styleDefaults[i];

                        if(styleDefault!=null){

                            OMUtils.printAttribute(
                                    Constants.ATTR_STYLE_DEFAULT,
                                    styleDefault.toString(),
                                    pw);
                        }
                    }
                    printExtensibilityAttributes(intrface.getExtensionAttributes(), intrface, pw);
                    pw.println('>');
                    printDocumentation(intrface.getDocumentationElements(), des, pw);
                    printOperations(intrface.getInterfaceOperationElements(), des, pw);
                    printFaults(intrface.getInterfaceFaultElements(), des, pw);   
                    printExtensibilityElements(intrface.getClass(), intrface.getExtensionElements(), des, pw);
                    pw.println("  </" + tagName + '>');
                }
            }
        }       
View Full Code Here

                if (name != null){
                    OMUtils.printAttribute(Constants.ATTR_NAME,
                            name.getLocalPart(),
                            pw);
                }
                InterfaceElement intrface = binding.getInterfaceElement();
                if (intrface != null){
                    QName interfaceName=intrface.getName();
                    if(interfaceName!=null)
                    OMUtils.printQualifiedAttribute(Constants.ATTR_INTERFACE,
                            interfaceName,
                            des,
                            pw);
View Full Code Here

        QName elementQName = null;

        if (WSDL2Constants.NMTOKEN_ELEMENT.equals(messageContentModelName)) {
            ElementDeclaration elementDeclaration = messageReference.getElementDeclaration();
            if (elementDeclaration == null) {
                InterfaceMessageReferenceElement messageReferenceElement =
                        messageReference.toElement();
                QName qName = messageReferenceElement.getElement().getQName();
                throw new AxisFault("Unable to find element " + qName.toString() + " reffered to by operation " + axisOperation.getName().getLocalPart());
            }
            elementQName = elementDeclaration.getName();
        } else if (WSDL2Constants.NMTOKEN_ANY.equals(messageContentModelName)) {
            elementQName = Constants.XSD_ANY;
View Full Code Here

TOP

Related Classes of org.apache.woden.wsdl20.xml.InterfaceElement

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.