Package org.apache.woden.wsdl20.xml

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


            description = readInTheWSDLFile(fullPath);
        } catch (AxisFault axisFault) {
            throw new WSDLException("ERROR", "Exception occured while reading WSDL 2.0 doc", axisFault);
        }

        DescriptionElement descriptionElement = description.toElement();
        savedTargetNamespace = descriptionElement.getTargetNamespace()
                .toString();
        namespacemap = descriptionElement.getDeclaredNamespaces();
        this.description = description;
        this.serviceName = null;
        if (name != null) {
            serviceName = new QName(descriptionElement.getTargetNamespace().toString(), name);
        }
        this.interfaceName = interfaceName;
        this.axisService = new AxisService();
        setPolicyRegistryFromService(axisService);
    }
View Full Code Here


            // null));
            // }
            //
            // }

            DescriptionElement descriptionElement = description.toElement();
            TypesElement typesElement = descriptionElement
                    .getTypesElement();
            if (typesElement != null) {
                Schema[] schemas = typesElement.getSchemas();
                for (int i = 0; i < schemas.length; i++) {
                    XmlSchema schemaDefinition = schemas[i].getSchemaDefinition();
View Full Code Here

        }
        try {
            if (description == null) {

                Description description;
                DescriptionElement descriptionElement;
                if (wsdlURI != null && !"".equals(wsdlURI)) {
                    description = readInTheWSDLFile(wsdlURI);
                    descriptionElement = description.toElement();
                } else if (in != null) {
                    description = readInTheWSDLFile(in);
                    descriptionElement = description.toElement();
                } else {
                    throw new AxisFault("No resources found to read the wsdl");
                }

                savedTargetNamespace = descriptionElement.getTargetNamespace().toString();
                namespacemap = descriptionElement.getDeclaredNamespaces();
                this.description = description;

            }
            // Create the namespacemap
View Full Code Here

     */
    private void addDocumentation(AxisDescription axisDescription, DocumentableElement element) {
        DocumentationElement[] documentationElements = element.getDocumentationElements();
        String documentation = "";
        for (int i = 0; i < documentationElements.length; i++) {
            DocumentationElement documentationElement = documentationElements[i];
            XMLElement contentElement = documentationElement.getContent();
            Element content = (Element)contentElement.getSource();
            if (content != null) {
                documentation = documentation + DOM2Writer.nodeToString(content.getFirstChild());
            }
        }
View Full Code Here

     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        InterfaceOperationElement oper = (InterfaceOperationElement)getParentElement();
        InterfaceElement interfac = (InterfaceElement)oper.getParentElement();
        if (interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
                fault = faultComp.toElement();
            }
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

    {
        //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

  boolean isValid = true;
 
  int numInterfaceElements = interfaces.length;
  for(int i = 0; i < numInterfaceElements; i++)
  {
    InterfaceElement interfaceElem = interfaces[i];
   
    if(!testAssertionInterface1012(interfaceElem, errorReporter))
    isValid = false;
   
    if(!validateInterfaceFaults(descElement, interfaceElem.getInterfaceFaultElements(), errorReporter))
      isValid = false;
   
    if(!validateInterfaceOperations(descElement, interfaceElem.getInterfaceOperationElements(), errorReporter))
    isValid = false;
  }
 
  return isValid;
  }
View Full Code Here

     */
    public InterfaceFaultElement getInterfaceFaultElement()
    {
        InterfaceFaultElement fault = null;
        BindingElement binding = (BindingElement)getParentElement();
        InterfaceElement interfac = binding.getInterfaceElement();
        if(interfac != null) {
            InterfaceFault faultComp = ((Interface)interfac).getFromAllInterfaceFaults(fRef);
            if (faultComp != null) {
                fault = faultComp.toElement();
            }
View Full Code Here

        if(fStyle.size() > 0)
        {
            array = new URI[fStyle.size()];
            fStyle.toArray(array);
        } else {
            InterfaceElement intf = (InterfaceElement)getParentElement();
            URI[] styleDef = intf.getStyleDefault();
            if(styleDef.length > 0) {
                array = styleDef;
            }
        }
        return array;
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.