Examples of DescriptionElement


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

        assertNotNull("The reader did not return a WSDL description.", descComp);
       
        fBindings = descComp.getBindings();
        fInterfaces = descComp.getInterfaces();
       
        DescriptionElement descElem = descComp.toElement();
        TypesElement types = descElem.getTypesElement()
    fSchemas = types.getSchemas();
    fImportedSchemas = types.getImportedSchemas();
    fInlinedSchemas = types.getInlinedSchemas();
       
        assertEquals("The Description should contain 1 Binding component.", 1, fBindings.length);
View Full Code Here

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

    }
   
    // Test that the assertion returns true for an interace that extends no other interfaces.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
    if(!val.testAssertionInterface1009(interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned false for an interface that extends no other interfaces.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true if the interface is not in the direct or indirect list.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      descEl.setTargetNamespace(namespace1);
     
      // Create an interface element, name it and add to the description element
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
     
      // Create another interface element, name it and add to the description element
      InterfaceElement interfac2 = descEl.addInterfaceElement();
      interfac2.setName(name2);

      interfac.addExtendedInterfaceName(interfac2.getName());
     
      InterfaceElement interfac3 = descEl.addInterfaceElement();
      interfac3.setName(name3);
     
      interfac.addExtendedInterfaceName(interfac3.getName());
     
      InterfaceElement interfac4 = descEl.addInterfaceElement();
      interfac4.setName(name4);
     
      interfac2.addExtendedInterfaceName(interfac4.getName());
       
      descComp.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
   
    if(!val.testAssertionInterface1009((Interface)interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned false for an interface that is not in the list of exteneded interfaces.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false if the interface is in the direct list.
  try
  {
    DescriptionElement descEl = factory.newDescription();
    Description descComp = descEl.toComponent();
      descEl.setTargetNamespace(namespace1);
    InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(name3);
      interfac.addExtendedInterfaceName(interfac.getName());
      interfac.addExtendedInterfaceName(interfac2.getName());
      interfac.addExtendedInterfaceName(interfac3.getName());
     
      descComp.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
   
    if(val.testAssertionInterface1009(interfac, reporter))
    {
      fail("The testAssertionInterface1009 method returned true for an interface that is in the direct extended interface list.");
    }
  }
  catch(Exception e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false if the interface is in the indirect list.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      Description descComp = descEl.toComponent();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(name3);
      interfac.addExtendedInterfaceName(interfac2.getName());
      interfac.addExtendedInterfaceName(interfac3.getName());
      interfac2.addExtendedInterfaceName(interfac.getName());
     
View Full Code Here

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

  }
 
    // Test that the assertion returns true for an interface that is the only interface defined.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
    interfac.setName(name1);
    if(!val.testAssertionInterface1010(new Interface[]{interfac}, reporter))
    {
      fail("The testAssertionInterface1010 method returned false for an list of interfaces that contains only one interface.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for a list of interfaces that contains no duplicate names.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
    interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
    interfac3.setName(name3);
   
    Interface[] interfaces = new Interface[]{interfac, interfac2, interfac3};
   
    if(!val.testAssertionInterface1010(interfaces, reporter))
    {
      fail("The testAssertionInterface1010 method returned false for a list of interfaces 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 interfaces that are defined with the same QName object.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
    interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
    interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
    interfac3.setName(name1);
   
    Interface[] interfaces = new Interface[]{interfac, interfac2, interfac3};
   
    if(val.testAssertionInterface1010(interfaces, reporter))
    {
      fail("The testAssertionInterface1010 method returned true for a list of interfaces that contains two interfaces 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 interfaces that are defined with the same name and
  // different QName objects.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceImpl interfac = (InterfaceImpl)descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceImpl interfac2 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac2.setName(name2);
      InterfaceImpl interfac3 = (InterfaceImpl)descEl.addInterfaceElement();
      interfac3.setName(new NCName("name1"));
         
      Interface[] interfaces = new Interface[]{interfac, interfac2, interfac3};
   
    if(val.testAssertionInterface1010(interfaces, reporter))
View Full Code Here

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

    }
   
    // Test that the method returns true if the message content model is #any and the element declaration is empty.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
    InterfaceMessageReferenceElement interfaceMessageReference = oper.addInterfaceMessageReferenceElement();
    interfaceMessageReference.setElement(QNameTokenUnion.ANY);

      Description descComp = descEl.toComponent(); //initialise Interface's ref to its Description
      InterfaceMessageReference msgRefComp =
        descComp.getInterfaces()[0].getInterfaceOperations()[0].getInterfaceMessageReferences()[0];
     
      if(!val.testAssertionInterfaceMessageReference1028((InterfaceMessageReferenceImpl)msgRefComp, reporter))
    {
      fail("The testAssertionInterfaceMessageReference1028 method returned false for an interface message reference with the message content model #any and an empty element declaration.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
   
    // Test that the method returns true if the message content model is #none and the element declaration is empty.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
      InterfaceMessageReferenceElement interfaceMessageReference = oper.addInterfaceMessageReferenceElement();
      interfaceMessageReference.setElement(QNameTokenUnion.NONE);

      Description descComp = descEl.toComponent(); //initialise Interface's ref to its Description
      InterfaceMessageReference msgRefComp =
        descComp.getInterfaces()[0].getInterfaceOperations()[0].getInterfaceMessageReferences()[0];
         
      if(!val.testAssertionInterfaceMessageReference1028((InterfaceMessageReferenceImpl)msgRefComp, reporter))
    {
View Full Code Here

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

  }
 
  // Test that the assertion returns true for an interface fault reference list with one entry.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
    InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
     
    InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
    faultReference.setRef(name1QN);
    faultReference.setMessageLabel(MessageLabel.IN);

     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for an interface fault reference that is the only interface fault reference defined.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for two interface fault references that have both different
  // faults and different message labels.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceFaultElement fault2 = interfac.addInterfaceFaultElement();
      fault2.setName(name2);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
         
    InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
    faultReference.setRef(name1QN);
    faultReference.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference2 = oper.addInterfaceFaultReferenceElement();
    faultReference2.setRef(name2QN);
    faultReference2.setMessageLabel(MessageLabel.OUT);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference, (InterfaceFaultReferenceImpl)faultReference2}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for two interface fault references that have different faults and message labels.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for two interface fault references that have the same fault
  // but different message labels
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
         
      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setRef(name1QN);
      faultReference.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference2 = oper.addInterfaceFaultReferenceElement();
      faultReference2.setRef(name1QN);
      faultReference2.setMessageLabel(MessageLabel.OUT);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference, (InterfaceFaultReferenceImpl)faultReference2}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for two interface fault references that have the same fault but different message labels.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns true for two interface fault references that have the same
  // message label but different faults.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceFaultElement fault2 = interfac.addInterfaceFaultElement();
      fault2.setName(name2);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
             
      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setRef(name1QN);
      faultReference.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference2 = oper.addInterfaceFaultReferenceElement();
      faultReference2.setRef(name2QN);
      faultReference2.setMessageLabel(MessageLabel.IN);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference, (InterfaceFaultReferenceImpl)faultReference2}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for two interface fault references that have different faults but the same message labels.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the assertion returns false for two interface fault references that have the same
  // fault and message label.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
         
      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setRef(name1QN);
      faultReference.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference2 = oper.addInterfaceFaultReferenceElement();
      faultReference2.setRef(name1QN);
      faultReference2.setMessageLabel(MessageLabel.IN);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference, (InterfaceFaultReferenceImpl)faultReference2}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned true for two interface fault references that have the same fault and message label.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the method returns true for an interface fault reference with a null message label.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();

      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setRef(name1QN);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for an interface fault references with a null message labels.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the method returns true for an interface fault reference with a null fault.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
     
      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setMessageLabel(MessageLabel.IN);
     
      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(!val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned false for ano interface fault reference that has a null fault.");
    }
  }
  catch(WSDLException e)
  {
    fail("There was a problem running the test assertion method " + e);
  }
 
  // Test that the method returns false for two interface fault references that have the same
  // fault/message label and a third interface fault reference that has a null fault and is
  // defined second.
  try
  {
      DescriptionElement descEl = factory.newDescription();
      descEl.setTargetNamespace(namespace1);
      InterfaceElement interfac = descEl.addInterfaceElement();
      interfac.setName(name1);
      InterfaceFaultElement fault = interfac.addInterfaceFaultElement();
      fault.setName(name1);
      InterfaceOperationElement oper = interfac.addInterfaceOperationElement();
         
      InterfaceFaultReferenceElement faultReference = oper.addInterfaceFaultReferenceElement();
      faultReference.setRef(name1QN);
      faultReference.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference2 = oper.addInterfaceFaultReferenceElement();
      faultReference2.setRef(name1QN);
      faultReference2.setMessageLabel(MessageLabel.IN);
      InterfaceFaultReferenceElement faultReference3 = oper.addInterfaceFaultReferenceElement();
      faultReference3.setMessageLabel(MessageLabel.OUT);

      descEl.toComponent().getInterfaces(); //init Interface's ref to its Description
     
    if(val.testAssertionInterfaceFaultReference1039(new InterfaceFaultReference[]{(InterfaceFaultReferenceImpl)faultReference, (InterfaceFaultReferenceImpl)faultReference3, (InterfaceFaultReferenceImpl)faultReference2}, reporter))
    {
      fail("The testAssertionInterfaceFaultReference1039 method returned true for two interface fault references that have the same fault and message label and a third interface fault reference that has a null fault and is defined second.");
    }
View Full Code Here

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

   
    // 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.");
    }
  }
  catch(WSDLException e)
View Full Code Here

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

        } catch (WSDLException e) {
            fail("Can't instantiate the WSDLFactory object.");
        }
       
    // Create the DescriptionElement->InterfaceElement->InterfaceOperationElement->InterfaceFaultReference hierarchy
    DescriptionElement desc = factory.newDescription();
        InterfaceElement interfaceElement = desc.addInterfaceElement();
    InterfaceOperationElement interfaceOperationElement = interfaceElement.addInterfaceOperationElement();

    // Add an InterfaceFault to the InterfaceElement
    InterfaceFaultElement faultElement = interfaceElement.addInterfaceFaultElement();
    faultElement.setName(new NCName("Fault1"));
View Full Code Here

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

            factory = WSDLFactory.newInstance();
        } catch (WSDLException e) {
            fail("Can't instantiate the WSDLFactory object.");
        }
       
    DescriptionElement descriptionElement = factory.newDescription();

    // Create the BindingElement<->InterfaceElement->InterfaceFaultElement hierarchy
    BindingElement bindingElement = descriptionElement.addBindingElement();
    bindingElement.setInterfaceName(new QName("interface1"));
    bindingElement.setName(new NCName("binding1"));
   
    InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
   
    InterfaceFaultElement iffElement = interfaceElement.addInterfaceFaultElement();
    iffElement.setName(new NCName("fault1"));

    // Create the BindingOperationElement->BindingFaultReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fFaultElement = bindingElement.addBindingFaultElement();
    fFaultElement.setRef(new QName("fault1"));
   
    Description descComp = descriptionElement.toComponent();
    descComp.getBindings(); // this triggers setting the link to description in the binding

    BindingFault bf = (BindingFault)fFaultElement;
 
    InterfaceFault retrievedFault = bf.getInterfaceFault();
View Full Code Here

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

            factory = WSDLFactory.newInstance();
        } catch (WSDLException e) {
            fail("Can't instantiate the WSDLFactory object.");
        }
       
    DescriptionElement descriptionElement = factory.newDescription();

    // Create the BindingElement<->InterfaceElement->InterfaceOperationElement->InterfaceFaultReferenceElement hierarchy
    BindingElement bindingElement = descriptionElement.addBindingElement();
    bindingElement.setInterfaceName(new QName("interface1"));
   
    InterfaceElement interfaceElement = descriptionElement.addInterfaceElement();
    interfaceElement.setName(new NCName("interface1"));
    InterfaceFaultElement ife = interfaceElement.addInterfaceFaultElement();
    ife.setName(new NCName("Fault1Ref"));
   
    InterfaceOperationElement ifopElement = interfaceElement.addInterfaceOperationElement();
    ifopElement.setName(new NCName("operation1"));
    InterfaceFaultReferenceElement iffrElement = ifopElement.addInterfaceFaultReferenceElement();
    iffrElement.setMessageLabel(new NCName("Fault1MessageLabel"));
    iffrElement.setRef(new QName("Fault1Ref"));
       
    // Create the BindingOperationElement->BindingFaultReferenceElement hierarchy
    BindingOperationElement bopElement = bindingElement.addBindingOperationElement();
    bopElement.setRef(new QName("operation1"));
    fFaultRefElement = bopElement.addBindingFaultReferenceElement();
    fFaultRefElement.setMessageLabel(new NCName("Fault1MessageLabel"));
    fFaultRefElement.setRef(new QName("Fault1Ref"));

    Description descComp = descriptionElement.toComponent();
    descComp.getBindings(); // this triggers setting the link to description in the binding
   
    fFaultRef = (BindingFaultReference) fFaultRefElement;
    InterfaceFaultReference retrievedFault = fFaultRef.getInterfaceFaultReference();
    assertEquals("The retrieved InterfaceFaultReference is not that which was set",
View Full Code Here

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

  /**
   * Test that the assertion passes for an interface that
   * extends no other interfaces.
   */
  public void testNoInterfaceExtension() {
    DescriptionElement descEl = factory.newDescription();
    Description descComp = descEl.toComponent();
    descEl.setTargetNamespace(URI.create("http://testnamespace"));
   
    InterfaceElement interfac = descEl.addInterfaceElement();
    interfac.setName(new NCName("name"));
   
    // init Interface's ref to its Description, needed for interface extension.
    descComp.getInterfaces();
    try {
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.