Examples of BindingOperationElement


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

    /* (non-Javadoc)
     * @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)
View Full Code Here

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

            XMLElement bindOpEl,
            DescriptionElement desc,
            BindingElement parent)
            throws WSDLException {

        BindingOperationElement oper = parent.addBindingOperationElement();

        QName refQN = null;
        String ref = bindOpEl.getAttributeValue(Constants.ATTR_REF);
        if(ref != null)
        {
            try {
                refQN = bindOpEl.getQName(ref);
                oper.setRef(refQN);
            } catch (WSDLException e) {
                getErrorReporter().reportError(
                        new ErrorLocatorImpl()//TODO line&col nos.
                        "WSDL505",
                        new Object[] {ref, bindOpEl.getQName()},
                        ErrorReporter.SEVERITY_ERROR);
            }
        }

        parseExtensionAttributes(bindOpEl, BindingOperationElement.class, oper, desc);

        /* Parse the child elements of binding <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 = bindOpEl.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))
            {
                parseBindingMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTPUT.equals(tempElQN))
            {
                parseBindingMessageReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_INFAULT.equals(tempElQN))
            {
                parseBindingFaultReference(tempEl, desc, oper);
            }
            else if (Constants.Q_ELEM_OUTFAULT.equals(tempElQN))
            {
                parseBindingFaultReference(tempEl, desc, oper);
            }
            else
            {
                oper.addExtensionElement(
                        parseExtensionElement(BindingOperationElement.class, oper, tempEl, desc) );
            }
        }

        return oper;
View Full Code Here

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

        else
        {
            //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.
View Full Code Here

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

    {
        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++)
                {
View Full Code Here

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

     * TODO decide if this type of qname-based accessor is needed, either internally or on API.
     * TODO also consider if getBindingOperationWithRef is needed (i.e. component model)
     */
    public BindingOperationElement getBindingOperationElementWithRef(QName qname)
    {
        BindingOperationElement operation = null;
        if(qname != null)
        {
            BindingOperationElement bindOp = null;
            Iterator i = fOperations.iterator();
            while(i.hasNext())
            {
                bindOp = (BindingOperationElement)i.next();
                if(qname.equals(bindOp.getRef()))
                {
                    operation = bindOp;
                    break;
                }
            }
View Full Code Here

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

      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    if(!val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned false for a binding with an interface and an operation specified.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when a fault is specified
  // and an interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingFaultElement bindingFault = binding.addBindingFaultElement();
    if(!val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned false for a binding with an interface and a fault specified.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when an operation and a fault are specified
  // and an interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingFaultElement bindingFault = binding.addBindingFaultElement();
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    if(!val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned false for a binding with an interface and an operation and a fault specified.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an operation is specified
  // and no interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name1);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    if(val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned true for a binding with an operation and no interface.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when a fault is specified
  // and no interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name1);
      BindingFaultElement bindingFault = binding.addBindingFaultElement();
    if(val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned true for a binding with a fault and no interface.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an operation and a fault are specified
  // and no interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name1);
      BindingFaultElement bindingFault = binding.addBindingFaultElement();
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    if(val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned true for a binding with an operation and a fault and no interface.");
    }
  }
View Full Code Here

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

      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with an interface with no operations and one binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when an interface is specified with one operation and
  // the binding defines a binding operation for the interface operation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name2);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    bindingOperation.setRef(name2QN);
     
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with an interface with one operation and one binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an interface is specified with one operation and
  // the binding defines no operations.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name2);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
     
    if(val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned true for a binding with an interface with one operation and no binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when an interface is specified with one operation through
  // an extended interface and the binding defines a binding operation for the operation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      interfac.addExtendedInterfaceName(name2QN);
      InterfaceElement interfac2 = descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceOperationElement interfaceOperation = interfac2.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
    binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    bindingOperation.setRef(name3QN);
     
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with an interface with one extended operation and one binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an interface is specified with one operation through
  // an extended interface and the binding defines no operations.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      interfac.addExtendedInterfaceName(name2QN);
      InterfaceElement interfac2 = descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceOperationElement interfaceOperation = interfac2.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
     
    if(val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned true for a binding with an interface with one extended operation and no binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when an interface is specified with two operations, one
  // explicit and one inherited, and the binding defines operations for both.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      interfac.addExtendedInterfaceName(name2QN);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceImpl interfac2 = new InterfaceImpl();
      interfac2.setName(name2);
      InterfaceOperationElement interfaceOperation2 = interfac2.addInterfaceOperationElement();
      interfaceOperation2.setName(name4);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingOperationElement bindingOperation2 = binding.addBindingOperationElement();
      bindingOperation2.setRef(name4QN);
     
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with an interface with one defined operation and one extended operation and two binding operations defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an interface is specified with two operations, one
  // explicit and one inherited, and the binding defines an operation only for the explicit operation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      interfac.addExtendedInterfaceName(name2QN);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceElement interfac2 = descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceOperationElement interfaceOperation2 = interfac2.addInterfaceOperationElement();
      interfaceOperation2.setName(name4);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
     
    if(val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned true for a binding with an interface with one defined operation and one extended operation and one binding operation defined for the defined operation.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false when an interface is specified with two operations, one
  // explicit and one inherited, and the binding defines an operation only for the inherited operation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      interfac.addExtendedInterfaceName(name2QN);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceImpl interfac2 = new InterfaceImpl();
      interfac2.setName(name2);
      InterfaceOperationElement interfaceOperation2 = interfac2.addInterfaceOperationElement();
      interfaceOperation2.setName(name4);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
     
    if(val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned true for a binding with an interface with one defined operation and one inherited operation and one binding operation defined for the inherited operation.");
    }
View Full Code Here

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

      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name2);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
    bindingOperation.setRef(name2QN);
     
    if(!val.testAssertionBindingOperation1051(descEl.toComponent().getBindings()[0].getBindingOperations(), reporter))
    {
      fail("The testAssertionBindingOperation1051 method returned false with one valid binding operation defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when there are two binding operations defined with
  // unique interface operations.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceOperationElement interfaceOperation2 = interfac.addInterfaceOperationElement();
      interfaceOperation2.setName(name4);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingOperationElement bindingOperation2 = binding.addBindingOperationElement();
      bindingOperation2.setRef(name4QN);
     
    if(!val.testAssertionBindingOperation1051(descEl.toComponent().getBindings()[0].getBindingOperations(), reporter))
    {
      fail("The testAssertionBindingOperation1051 method returned false with two valid binding operations defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
 
  // Test that the assertion returns false when there are two binding operations defined with
  // the same interface operation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingOperationElement bindingOperation2 = binding.addBindingOperationElement();
      bindingOperation2.setRef(name3QN);
     
    if(val.testAssertionBindingOperation1051(descEl.toComponent().getBindings()[0].getBindingOperations(), reporter))
    {
      fail("The testAssertionBindingOperation1051 method returned true with two binding operations defined with the same interface operation.");
    }
View Full Code Here

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

      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);

      BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference.setMessageLabel(MessageLabel.IN);
         
    if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
    {
      fail("The testAssertionBindingMessageReference1052 method returned false with one valid binding message reference defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when there are two binding message references defined with
  // unique interface message references.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      InterfaceMessageReferenceElement interfaceMessageReference2 = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference2.setMessageLabel(MessageLabel.OUT);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference.setMessageLabel(MessageLabel.IN);
      BindingMessageReferenceElement bindingMessageReference2 = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference2.setMessageLabel(MessageLabel.OUT);
         
    if(!val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
    {
      fail("The testAssertionBindingMessageReference1052 method returned false with two valid binding message references defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
 
  // Test that the assertion returns false when there are two binding message references define with
  // the same interface message reference.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name3);
      InterfaceMessageReferenceElement interfaceMessageReference = interfaceOperation.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setMessageLabel(MessageLabel.IN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name3QN);
      BindingMessageReferenceElement bindingMessageReference = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference.setMessageLabel(MessageLabel.IN);
      BindingMessageReferenceElement bindingMessageReference2 = bindingOperation.addBindingMessageReferenceElement();
      bindingMessageReference2.setMessageLabel(MessageLabel.IN);
         
    if(val.testAssertionBindingMessageReference1052(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingMessageReferences(), reporter))
    {
      fail("The testAssertionBindingMessageReference1052 method returned true with two binding message references defined with the same interface message reference.");
View Full Code Here

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

      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
      BindingFaultReferenceElement bindingFaultReference = bindingOperation.addBindingFaultReferenceElement();

      bindingFaultReference.setMessageLabel(MessageLabel.IN);
      bindingFaultReference.setRef(name3QN);
         
    if(!val.testAssertionBindingFaultReference1055(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingFaultReferences(), reporter))
    {
      fail("The testAssertionBindingFaultReference1055 method returned false with one valid binding fault reference defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when there are two binding fault references defined with
  // unique interface fault references.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name3);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name4);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      InterfaceFaultReferenceElement interfaceFaultReference2 = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference2.setMessageLabel(MessageLabel.OUT);
      interfaceFaultReference2.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
      BindingFaultReferenceElement bindingFaultReference = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference.setMessageLabel(MessageLabel.IN);
      bindingFaultReference.setRef(name3QN);
      BindingFaultReferenceElement bindingFaultReference2 = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference2.setMessageLabel(MessageLabel.OUT);
      bindingFaultReference2.setRef(name3QN);
         
    if(!val.testAssertionBindingFaultReference1055(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingFaultReferences(), reporter))
    {
      fail("The testAssertionBindingFaultReference1055 method returned false with two valid binding fault references defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
 
  // Test that the assertion returns false when there are two binding fault references define with
  // the same interface fault reference.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement interfaceFault = interfac.addInterfaceFaultElement();
      interfaceFault.setName(name3);
      InterfaceOperationElement interfaceOperation = interfac.addInterfaceOperationElement();
      interfaceOperation.setName(name4);
      InterfaceFaultReferenceElement interfaceFaultReference = interfaceOperation.addInterfaceFaultReferenceElement();
      interfaceFaultReference.setMessageLabel(MessageLabel.IN);
      interfaceFaultReference.setRef(name3QN);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
      BindingOperationElement bindingOperation = binding.addBindingOperationElement();
      bindingOperation.setRef(name4QN);
      BindingFaultReferenceElement bindingFaultReference = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference.setMessageLabel(MessageLabel.IN);
      bindingFaultReference.setRef(name3QN);
      BindingFaultReferenceElement bindingFaultReference2 = bindingOperation.addBindingFaultReferenceElement();
      bindingFaultReference2.setMessageLabel(MessageLabel.IN);
      bindingFaultReference2.setRef(name3QN);
         
    if(val.testAssertionBindingFaultReference1055(descEl.toComponent().getBindings()[0].getBindingOperations()[0].getBindingFaultReferences(), reporter))
    {
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.