Examples of DescriptionElement


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

 
  /**
   * Test that the assertion fails for two interfaces that are defined with the same name.
   */
  public void testDuplicateInterfaceNames() {
    DescriptionElement descEl = factory.newDescription();
    Description descComp = descEl.toComponent();
       
    try {
      descEl.setTargetNamespace(new URI("http://testnamespace"));
    } catch(URISyntaxException e) {
      // Do nothing.
    }
   
    InterfaceElement interfac = descEl.addInterfaceElement();
    interfac.setName(new NCName("name"));
    InterfaceElement interfac2 = descEl.addInterfaceElement();
    interfac2.setName(new NCName("name"));
    // Need to create an extended interface otherwise the component model treats the
    // two interfaces as equal and only adds one to the set.
    InterfaceElement interfac3 = descEl.addInterfaceElement();
    interfac3.setName(new NCName("name3"));
    interfac2.addExtendedInterfaceName(interfac3.getName());
     
    try {
      assertion.validate(descComp, wodenContext);
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.