Package org.apache.woden.wsdl20.xml

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


        // //////////////////////////////////////////////////////////////////////////////////////////////////

        // we really need to do this for a single porttype!
        InterfaceOperationElement[] operationElements = interfaceElement
                .getInterfaceOperationElements();
        InterfaceOperationElement opElement;
        for (int k = 0; k < operationElements.length; k++) {
            opElement = operationElements[k];
            InterfaceMessageReferenceElement[] interfaceMessageReferenceElements = opElement
                    .getInterfaceMessageReferenceElements();

            for (int i = 0; i < interfaceMessageReferenceElements.length; i++) {
                InterfaceMessageReferenceElement interfaceMessageReferenceElement = interfaceMessageReferenceElements[i];
                String direction = interfaceMessageReferenceElement
                        .getDirection().toString();
                messagesMap.put(interfaceMessageReferenceElement
                        .getElementName(), interfaceMessageReferenceElement);
                if (Direction.IN.toString().equalsIgnoreCase(direction)) {
                    inputOperationsMap.put(opElement.getName(),
                            interfaceMessageReferenceElement);
                } else if (Direction.OUT.toString().equalsIgnoreCase(direction)) {
                    outputOperationsMap.put(opElement.getName(),
                            interfaceMessageReferenceElement);
                }
            }

            InterfaceFaultReferenceElement[] interfaceFaultReferenceElements = opElement
                    .getInterfaceFaultReferenceElements();

            for (int i = 0; i < interfaceFaultReferenceElements.length; i++) {
                InterfaceFaultReferenceElement interfaceFaultReferenceElement = interfaceFaultReferenceElements[i];
                String direction = interfaceFaultReferenceElement
View Full Code Here


  {
  boolean isValid = true;
  int numInterfaceOperations = interfaceOperations.length;
  for(int j = 0; j < numInterfaceOperations; j++)
  {
    InterfaceOperationElement interfaceOperation = interfaceOperations[j];
   
    if(!validateInterfaceMessageReferences(descElement, interfaceOperation.getInterfaceMessageReferenceElements(), errorReporter))
    isValid = false;
   
    if(!validateInterfaceFaultReferences(descElement, interfaceOperation.getInterfaceFaultReferenceElements(), errorReporter))
      isValid = false;
  }
    return isValid;
  }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.woden.wsdl20.xml.BindingOperationElement#getInterfaceOperationElement()
     */
    public InterfaceOperationElement getInterfaceOperationElement()
    {
        InterfaceOperationElement oper = null;
        BindingElement binding = (BindingElement)getParentElement();
        InterfaceElement interfac = binding.getInterfaceElement();
        if(interfac != null) {
            InterfaceOperation operComp = ((Interface)interfac).getFromAllInterfaceOperations(fRef);
            if(operComp != null) {
View Full Code Here

    /*
     * @see org.apache.woden.wsdl20.xml.InterfaceElement#getInterfaceOperationElement(javax.xml.namespace.QName)
     */
    public InterfaceOperationElement getInterfaceOperationElement(QName operName)
    {
        InterfaceOperationElement oper = null;
       
        if(operName != null)
        {
            InterfaceOperationElement tempOper = null;
            for(Iterator i=fInterfaceOperationElements.iterator(); i.hasNext(); )
            {
                tempOper = (InterfaceOperationElement)i.next();
                if(operName.equals(tempOper.getName()))
                {
                    oper = tempOper;
                    break;
                }
            }
View Full Code Here

                OMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                          Constants.ELEM_OPERATION,
                          des);
            for(int ind=0;ind<operations.length;ind++){

                InterfaceOperationElement operation =operations[ind] ;
                if (operation!=null){

                    pw.print("    <" + tagName);

                    QName name=operation.getName();
                    if(name!=null){
                        OMUtils.printAttribute(Constants.ATTR_NAME,
                                name.getLocalPart(),
                                pw);
                    }

                    URI pattern=operation.getPattern();
                    if(pattern!=null){
                        OMUtils.printAttribute(Constants.ATTR_PATTERN,
                                pattern.toString(),
                                pw);
                    }

                    URI[] styles=operation.getStyle();
                    for(int i=0;i<styles.length;i++){
                        if(styles[i]!=null){

                            OMUtils.printAttribute(
                                    Constants.ATTR_STYLE,
                                    styles[i].toString(),
                                    pw);
                        }
                    }
                   
                    printExtensibilityAttributes(operation.getExtensionAttributes(), operation, pw);
                    pw.println('>');
                    printDocumentation(operation.getDocumentationElements(), des, pw);
                    printInterfaceMessageReferences(operation.getInterfaceMessageReferenceElements(),des, pw);
                    printInterfaceFaultReferences(operation.getInterfaceFaultReferenceElements(),des,pw);
                    printExtensibilityElements(operation.getClass(), operation.getExtensionElements(), des, pw);
                    pw.println("    </" + tagName + '>');

                }

            }
View Full Code Here

            XMLElement operEl,
            DescriptionElement desc,
            InterfaceElement parent)
            throws WSDLException {

        InterfaceOperationElement oper = parent.addInterfaceOperationElement();

        String name = operEl.getAttributeValue(Constants.ATTR_NAME);
        if(name != null)
        {
            oper.setName(new NCName(name));
        }

        String style = operEl.getAttributeValue(Constants.ATTR_STYLE);
        if(style != null)
        {
            List stringList = StringUtils.parseNMTokens(style);
            String uriString = null;
            Iterator it = stringList.iterator();
            while(it.hasNext())
            {
                uriString = (String)it.next();
                oper.addStyleURI(getURI(uriString));
            }
        }

        String pat = operEl.getAttributeValue(Constants.ATTR_PATTERN);
        if(pat != null)
        {
            oper.setPattern(getURI(pat));
        }

        parseExtensionAttributes(operEl, InterfaceOperationElement.class, oper, desc);

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

        XMLElement[] children = operEl.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, oper);
            }
            else if (Constants.Q_ELEM_INPUT.equals(tempElQN))
            {
                parseInterfaceMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTPUT.equals(tempElQN))
            {
                parseInterfaceMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_INFAULT.equals(tempElQN))
            {
                parseInterfaceFaultReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTFAULT.equals(tempElQN))
            {
                parseInterfaceFaultReference(tempEl, desc, oper);
            }
            else
            {
                oper.addExtensionElement(
                        parseExtensionElement(InterfaceOperationElement.class, oper, tempEl, desc) );
            }
        }

        return oper;
View Full Code Here

        else
        {
            //This is a limited solution supporting the 3 MEPs in the Part 2 spec.
            //TODO generic support for user-defined, extensible MEPs.
           
            InterfaceOperationElement iop = (InterfaceOperationElement)faultRef.getParentElement();
            URI mep = iop.getPattern();
           
            if(Constants.MEP_URI_IN_OUT.equals(mep))
            {
                //Ruleset is fault-replaces-message, so fault is in same direction as msg.
                //The <output> is replaced by an <outfault>.
View Full Code Here

                DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL20,
                          Constants.ELEM_OPERATION,
                          des);
            for(int ind=0;ind<operations.length;ind++){

                InterfaceOperationElement operation =operations[ind] ;
                if (operation!=null){

                    pw.print("    <" + tagName);

                    QName name=operation.getName();
                    if(name!=null){
                        DOMUtils.printAttribute(Constants.ATTR_NAME,
                                name.getLocalPart(),
                                pw);
                    }

                    URI pattern=operation.getPattern();
                    if(pattern!=null){
                        DOMUtils.printAttribute(Constants.ATTR_PATTERN,
                                pattern.toString(),
                                pw);
                    }

                    URI[] styles=operation.getStyle();
                    for(int i=0;i<styles.length;i++){
                        if(styles[i]!=null){

                            DOMUtils.printAttribute(
                                    Constants.ATTR_STYLE,
                                    styles[i].toString(),
                                    pw);
                        }
                    }
                    printExtensibilityAttributes(operation.getExtensionAttributes(), operation, pw);
                    pw.println('>');
                    printDocumentation(operation.getDocumentationElements(), des, pw);
                    printInterfaceMessageReferences(operation.getInterfaceMessageReferenceElements(),des, pw);
                    printInterfaceFaultReferences(operation.getInterfaceFaultReferenceElements(),des,pw);
                    printExtensibilityElements(operation.getClass(), operation.getExtensionElements(), des, pw);
                    pw.println("    </" + tagName + '>');

                }

            }
View Full Code Here

        {
            //This is a limited solution supporting the 3 MEPs in the Part 2 spec.
            //TODO generic support for user-defined, extensible MEPs.
           
            BindingOperationElement bop = (BindingOperationElement)faultRef.getParentElement();
            InterfaceOperationElement iop = bop.getInterfaceOperationElement();
            URI mep = (iop != null ? iop.getPattern() : null); //iop might be null if the WSDL is invalid
           
            if(Constants.MEP_URI_IN_OUT.equals(mep))
            {
                //Ruleset is fault-replaces-message, so fault is in same direction as msg.
                //The <output> is replaced by an <outfault>.
View Full Code Here

            // }
            //
            // }

            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();

                    // WSDL 2.0 spec requires that even the built-in schema should be returned
                    // once asked for schema definitions. But for data binding purposes we can ignore that
View Full Code Here

TOP

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

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.