Examples of InterfaceOperationElement


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

     * @see org.apache.woden.wsdl20.xml.BindingMessageReferenceElement#getInterfaceMessageReferenceElement()
     */
    public InterfaceMessageReferenceElement getInterfaceMessageReferenceElement() {
        InterfaceMessageReferenceElement intMsgRef = null;
        BindingOperationElement bindOp = (BindingOperationElement)getParentElement();
        InterfaceOperationElement intOp = bindOp.getInterfaceOperationElement();
        if(intOp != null)
        {
            //Determine the "effective" msg label for this binding msg ref.
            NCName effectiveMsgLabel = null;
            if(fMessageLabel != null)
            {
                effectiveMsgLabel = fMessageLabel;
            }
            else
            {
                //TODO: implement placeholder effective msg label, as per Part 1 of spec section 2.10.3
            }
           
            //Now match the effective msg label against the msg label of an interface msg reference.
            if(effectiveMsgLabel != null)
            {
                InterfaceMessageReferenceElement[] intMsgRefs = intOp.getInterfaceMessageReferenceElements();
                for(int i=0; i<intMsgRefs.length; i++)
                {
                    if( effectiveMsgLabel.equals(intMsgRefs[i].getMessageLabel()) )
                    {
                        intMsgRef = intMsgRefs[i];
View Full Code Here

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

            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

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

        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

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

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

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

        InterfaceFaultReferenceElement intFaultRef = null;
       
        if(fRef != null && fMessageLabel != null)
        {
            BindingOperationElement bindOp = (BindingOperationElement)getParentElement();
            InterfaceOperationElement intOp = bindOp.getInterfaceOperationElement();
            if(intOp != null)
            {
                InterfaceFaultReferenceElement[] intFaultRefs = intOp.getInterfaceFaultReferenceElements();
                for(int i=0; i<intFaultRefs.length; i++)
                {
                    InterfaceFaultReferenceElement temp = intFaultRefs[i];
                    if(fRef.equals(temp.getRef()) &&
                       fMessageLabel.equals(temp.getMessageLabel()))
View Full Code Here

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

  {
  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

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

     * @see org.apache.woden.wsdl20.xml.InterfaceFaultReferenceElement#getInterfaceFaultElement()
     */
    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

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

    /* (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

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

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

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

    /*
     * @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
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.