Examples of BindingElement


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

    private BindingElement parseBinding(
            XMLElement bindEl,
            DescriptionElement desc)
            throws WSDLException {

        BindingElement binding = desc.addBindingElement();

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

        QName intfaceQN = null;
        String intface = bindEl.getAttributeValue(Constants.ATTR_INTERFACE);
        if(intface != null)
        {
            try {
                intfaceQN = bindEl.getQName(intface);
                binding.setInterfaceName(intfaceQN);
            } catch (WSDLException e) {
                getErrorReporter().reportError(
                        new ErrorLocatorImpl()//TODO line&col nos.
                        "WSDL505",
                        new Object[] {intface, bindEl.getQName()},
                        ErrorReporter.SEVERITY_ERROR);
            }
        }

        String type = bindEl.getAttributeValue(Constants.ATTR_TYPE);
        if(type != null) {
            binding.setType(getURI(type));
        }

        parseExtensionAttributes(bindEl, BindingElement.class, binding, desc);

        /* Parse the child elements of <binding>.
         * 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 = bindEl.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, binding);
            }
            else if (Constants.Q_ELEM_FAULT.equals(tempElQN))
            {
                parseBindingFault(tempEl, desc, binding);
            }
            else if (Constants.Q_ELEM_OPERATION.equals(tempElQN))
            {
                parseBindingOperation(tempEl, desc, binding);
            }
            else
            {
                binding.addExtensionElement(
                        parseExtensionElement(BindingElement.class, binding, tempEl, desc) );
            }
        }

        return binding;
View Full Code Here

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

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

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

       
        //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)service.getParentElement();
       
        BindingElement binding = (BindingElement)desc.getBinding(fBindingName);
        return binding;
    }
View Full Code Here

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

     * @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) {
                oper = operComp.toElement();
            }
View Full Code Here

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

    // Test that the assertion returns true when no operation or fault is specified
  // and an interface is not specified.
  try
  {
      DescriptionElement desc = factory.newDescription();
      BindingElement bindingEl = desc.addBindingElement();
      bindingEl.setName(name1);
    if(!val.testAssertionBinding1044(desc.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned false for a binding with no interface, operation, or faults specified.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when no operation or fault is specified
  // and an interface is specified.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
    BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
    if(!val.testAssertionBinding1044(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1044 method returned false for a binding with an interface and no operation or faults specified.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true when an operation 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);
      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.BindingElement

      }
    // Test that the assertion returns true for a binding with an absolute type.
  try
  {
      DescriptionElement descEl = factory.newDescription();
    BindingElement binding = descEl.addBindingElement();
    binding.setType(new URI("http://www.sample.org"));
    if(!val.testAssertionBinding1048(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1048 method returned false for a binding with an absolute type.");
    }
  }
  catch(URISyntaxException e)
  {
    fail("There was a problem creating the type URI for the test method " + e);
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
    // Test that the assertion returns false for a binding with a relative type.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
    BindingElement binding = descEl.addBindingElement();
    binding.setType(new URI("sample.org"));
    if(val.testAssertionBinding1048(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1048 method returned true for a binding with a relative type.");
    }
  }
  catch(URISyntaxException e)
  {
    fail("There was a problem creating the type URI for the test method " + e);
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
    // Test that the assertion returns true for a binding with a null type. This will be
  // caught be schema validation.
  try
  {
      DescriptionElement descEl = factory.newDescription();
    BindingElement binding = descEl.addBindingElement();
    if(!val.testAssertionBinding1048(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1048 method returned false for a binding with a null type.");
    }
  }
View Full Code Here

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

    // Test that the assertion returns true for a list of bindings that only contains one binding.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
    BindingElement binding = descEl.addBindingElement();
    binding.setName(name1);
    if(!val.testAssertionBinding1049(descEl.toComponent().getBindings(), reporter))
    {
      fail("The testAssertionBinding1049 method returned false for an list of bindings that contains only one binding.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for a list of bindings that contains no duplicate names.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
    BindingElement binding = descEl.addBindingElement();
    binding.setName(name1);
      BindingElement binding2 = descEl.addBindingElement();
    binding2.setName(name2);
      BindingElement binding3 = descEl.addBindingElement();
    binding3.setName(name3);
   
    Binding[] bindings = descEl.toComponent().getBindings();
   
    if(!val.testAssertionBinding1049(bindings, reporter))
    {
      fail("The testAssertionBinding1049 method returned false for a list of bindings that contains no duplicates.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false for two bindings that are defined with the same QName object.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name1);
      BindingElement binding2 = descEl.addBindingElement();
      binding2.setName(name2);
      BindingElement binding3 = descEl.addBindingElement();
    binding3.setName(name1);
   
    Binding[] bindings = descEl.toComponent().getBindings();
   
    if(val.testAssertionBinding1049(bindings, reporter))
    {
      fail("The testAssertionBinding1049 method returned true for a list of binginds that contains two bindings defined with the same QName object.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false for two bindings that are defined with the same name and
  // different QName objects.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      BindingElement binding = descEl.addBindingElement();
    binding.setName(name1);
      BindingElement binding2 = descEl.addBindingElement();
      binding2.setName(name2);
      BindingElement binding3 = descEl.addBindingElement();
    binding3.setName(new NCName("name1"));
   
    Binding[] bindings = descEl.toComponent().getBindings();
   
    if(val.testAssertionBinding1049(bindings, reporter))
    {
View Full Code Here

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

    // Test that the assertion returns true when the binding does not specify an interface.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name1);
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with no defined interface.");
    }
  }
  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 no operations and
    // the binding has no operations defined.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      BindingElement binding = descEl.addBindingElement();
      binding.setName(name2);
      binding.setInterfaceName(name1QN);
    if(!val.testAssertionBinding1045(descEl.toComponent().getBindings()[0], reporter))
    {
      fail("The testAssertionBinding1045 method returned false for a binding with an interface with no operations.");
    }
  }
  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 no operations and
  // the binding has an operation defined.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      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.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  handler.reset();
 
  // Test that two messages are returned when an interface with two operations, one explicit and one
  // inherited, is specified and the binding defines no operations.
  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);
     
    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 no binding operations defined.");
    }
View Full Code Here

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

      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.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.BindingElement

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