You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2006/05/16 03:03:49 UTC

svn commit: r406788 - in /incubator/woden/java: src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java

Author: jkaputin
Date: Mon May 15 18:03:48 2006
New Revision: 406788

URL: http://svn.apache.org/viewcvs?rev=406788&view=rev
Log:
Modified WSDLComponentValidatorTest testcases for 
assertions Binding0054 and Binding0055 to reflect 
recent changes to the implementation that broke those 
tests. Also modified WSDLComponentValidator to check 
for null qnames and avoid NPEs.

Modified:
    incubator/woden/java/src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java
    incubator/woden/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java

Modified: incubator/woden/java/src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java?rev=406788&r1=406787&r2=406788&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java (original)
+++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidator.java Mon May 15 18:03:48 2006
@@ -498,7 +498,7 @@
    */
   protected boolean testAssertionInterfaceOperation0029(InterfaceOperation interfaceOperation, Interface interfac, ErrorReporter errorReporter) throws WSDLException
   {
-	if(!interfaceOperation.getName().getNamespaceURI().equals(interfac.getName().getNamespaceURI()))
+	if(!interfaceOperation.getName().getNamespaceURI().equals(interfac.getName().getNamespaceURI())) //TODO null checks
 	{
 	  errorReporter.reportError(new ErrorLocatorImpl(), "InterfaceOperation-0029", new Object[]{}, ErrorReporter.SEVERITY_ERROR);
 	  return false;
@@ -576,7 +576,7 @@
    */
   protected boolean testAssertionInterfaceFault0028(InterfaceFault interfaceFault, Interface interfac, ErrorReporter errorReporter) throws WSDLException
   {
-	if(!interfaceFault.getName().getNamespaceURI().equals(interfac.getName().getNamespaceURI()))
+	if(!interfaceFault.getName().getNamespaceURI().equals(interfac.getName().getNamespaceURI())) //TODO null checks
 	{
 	  errorReporter.reportError(new ErrorLocatorImpl(), "InterfaceFault-0028", new Object[]{}, ErrorReporter.SEVERITY_ERROR);
 	  return false;
@@ -876,7 +876,8 @@
   protected boolean testAssertionBinding0055(Binding binding, ErrorReporter errorReporter) throws WSDLException
   {
 	boolean allInterfaceOperationsHaveBinding = true;
-	String bindingName = binding.getName().getLocalPart();
+    QName bindingQN = binding.getName();
+	String bindingName = bindingQN != null ? bindingQN.getLocalPart() : null;
 	
 	Interface interfac = binding.getInterface();
 	if(interfac == null)
@@ -935,7 +936,7 @@
 	{
 	  if(!usedInterfaceOperations.contains(interfaceOperations[i]))
 	  {
-	    errorReporter.reportError(new ErrorLocatorImpl(), "Binding-0055", new Object[]{bindingName, "{" + interfaceOperations[i].getName().getNamespaceURI() + "}" + interfaceOperations[i].getName().getLocalPart()}, ErrorReporter.SEVERITY_ERROR);
+	    errorReporter.reportError(new ErrorLocatorImpl(), "Binding-0055", new Object[]{bindingName, interfaceOperations[i].getName()}, ErrorReporter.SEVERITY_ERROR);
 		allInterfaceOperationsHaveBinding = false;
 	  }
     }
@@ -1043,7 +1044,7 @@
 	  InterfaceOperation interfaceOperation = bindingOperations[i].getInterfaceOperation();
 	  if(specifiedInterfaceOperations.contains(interfaceOperation))
 	  {
-		errorReporter.reportError(new ErrorLocatorImpl(), "BindingOperation-0059", new Object[]{"{" + interfaceOperation.getName().getNamespaceURI() + "}" + interfaceOperation.getName().getLocalPart()}, ErrorReporter.SEVERITY_ERROR);
+		errorReporter.reportError(new ErrorLocatorImpl(), "BindingOperation-0059", new Object[]{interfaceOperation.getName()}, ErrorReporter.SEVERITY_ERROR);
 		duplicateFound = true;
 	  }
 	  else

Modified: incubator/woden/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java?rev=406788&r1=406787&r2=406788&view=diff
==============================================================================
--- incubator/woden/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java (original)
+++ incubator/woden/java/test/org/apache/woden/internal/wsdl20/validation/WSDLComponentValidatorTest.java Mon May 15 18:03:48 2006
@@ -1668,12 +1668,17 @@
    */
   public void testTestAssertionBinding0054()
   {
+    QName name1 = new QName("http://www.sample.org", "name1");
+    QName name2 = new QName("http://www.sample.org", "name2");
+    
     // Test that the assertion returns true when no operation or fault is specified
 	// and an interface is not specified.
 	try
 	{
+      DescriptionImpl desc = new DescriptionImpl();
 	  BindingImpl binding = new BindingImpl();
-	  if(!val.testAssertionBinding0054(binding, reporter))
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned false for a binding with no interface, operation, or faults specified.");
 	  }
@@ -1687,11 +1692,14 @@
 	// and an interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  if(!val.testAssertionBinding0054(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+	  BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned false for a binding with an interface and no operation or faults specified.");
 	  }
@@ -1705,13 +1713,16 @@
 	// and an interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  BindingOperationElement bindingOperation = new BindingOperationImpl();
-	  binding.addBindingOperationElement(bindingOperation);
-	  if(!val.testAssertionBinding0054(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      BindingOperationElement bindingOperation = new BindingOperationImpl();
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned false for a binding with an interface and an operation specified.");
 	  }
@@ -1725,13 +1736,16 @@
 	// and an interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  BindingFaultElement bindingFault = new BindingFaultImpl();
-	  binding.addBindingFaultElement(bindingFault);
-	  if(!val.testAssertionBinding0054(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      BindingFaultElement bindingFault = new BindingFaultImpl();
+      binding.addBindingFaultElement(bindingFault);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned false for a binding with an interface and a fault specified.");
 	  }
@@ -1745,15 +1759,18 @@
 	// and an interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  BindingOperationElement bindingOperation = new BindingOperationImpl();
-	  binding.addBindingOperationElement(bindingOperation);
-	  BindingFaultElement bindingFault = new BindingFaultImpl();
-	  binding.addBindingFaultElement(bindingFault);
-	  if(!val.testAssertionBinding0054(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      BindingFaultElement bindingFault = new BindingFaultImpl();
+      BindingOperationElement bindingOperation = new BindingOperationImpl();
+      binding.addBindingFaultElement(bindingFault);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned false for a binding with an interface and an operation and a fault specified.");
 	  }
@@ -1767,10 +1784,12 @@
 	// and no interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  BindingOperationElement bindingOperation = new BindingOperationImpl();
-	  binding.addBindingOperationElement(bindingOperation);
-	  if(val.testAssertionBinding0054(binding, reporter))
+      DescriptionImpl desc = new DescriptionImpl();
+      BindingImpl binding = new BindingImpl();
+      BindingOperationElement bindingOperation = new BindingOperationImpl();
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned true for a binding with an operation and no interface.");
 	  }
@@ -1784,10 +1803,12 @@
 	// and no interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
+      DescriptionImpl desc = new DescriptionImpl();
+      BindingImpl binding = new BindingImpl();
 	  BindingFaultElement bindingFault = new BindingFaultImpl();
-	  binding.addBindingFaultElement(bindingFault);
-	  if(val.testAssertionBinding0054(binding, reporter))
+      binding.addBindingFaultElement(bindingFault);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned true for a binding with a fault and no interface.");
 	  }
@@ -1801,12 +1822,14 @@
 	// and no interface is specified.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  BindingOperationElement bindingOperation = new BindingOperationImpl();
-	  binding.addBindingOperationElement(bindingOperation);
-	  BindingFaultElement bindingFault = new BindingFaultImpl();
-	  binding.addBindingFaultElement(bindingFault);
-	  if(val.testAssertionBinding0054(binding, reporter))
+      DescriptionImpl desc = new DescriptionImpl();
+      BindingImpl binding = new BindingImpl();
+      BindingFaultElement bindingFault = new BindingFaultImpl();
+      BindingOperationElement bindingOperation = new BindingOperationImpl();
+      binding.addBindingFaultElement(bindingFault);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0054(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0054 method returned true for a binding with an operation and a fault and no interface.");
 	  }
@@ -2000,9 +2023,10 @@
     // Test that the assertion returns true when the binding does not specify an interface.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  binding.setName(name1);
-	  if(!val.testAssertionBinding0055(binding, reporter))
+      DescriptionImpl desc = new DescriptionImpl();
+      BindingImpl binding = new BindingImpl();
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned false for a binding with no defined interface.");
 	  }
@@ -2016,12 +2040,14 @@
     // the binding has no operations defined.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  binding.setName(name1);
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  if(!val.testAssertionBinding0055(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned false for a binding with an interface with no operations.");
 	  }
@@ -2035,13 +2061,15 @@
 	// the binding has an operation defined.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  binding.setName(name1);
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  binding.setInterfaceElement(interfac);
-	  binding.addBindingOperationElement(new BindingOperationImpl());
-	  if(!val.testAssertionBinding0055(binding, reporter))
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
+      binding.addBindingOperationElement(new BindingOperationImpl());
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned false for a binding with an interface with no operations and one binding operation defined.");
 	  }
@@ -2055,17 +2083,21 @@
 	// the binding defines a binding operation for the interface operation.
 	try
 	{
-	  BindingImpl binding = new BindingImpl();
-	  binding.setName(name1);
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
 	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfac.addInterfaceOperationElement(interfaceOperation);
-	  binding.setInterfaceElement(interfac);
+      interfaceOperation.setName(name2);
+      BindingImpl binding = new BindingImpl();
+      binding.setInterfaceName(name1);
 	  BindingOperationImpl bindingOperation = new BindingOperationImpl();
-	  bindingOperation.setInterfaceOperationElement(interfaceOperation);
-	  binding.addBindingOperationElement(bindingOperation);
-	  if(!val.testAssertionBinding0055(binding, reporter))
+	  bindingOperation.setRef(name2);
+      
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned false for a binding with an interface with one operation and one binding operation defined.");
 	  }
@@ -2080,16 +2112,17 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
-	  interfac.setName(name1);
-	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfaceOperation.setName(name2);
-	  interfac.addInterfaceOperationElement(interfaceOperation);
-      
+      InterfaceImpl interfac = new InterfaceImpl();
+      interfac.setName(name1);
+      InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
+      interfaceOperation.setName(name2);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
-	  if(val.testAssertionBinding0055(binding, reporter))
+      binding.setInterfaceName(name1);
+      
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned true for a binding with an interface with one operation and no binding operation defined.");
 	  }
@@ -2104,26 +2137,24 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
-	  InterfaceElement interfac2 = desc.createInterfaceElement();
+      interfac.addExtendedInterfaceName(name2);
+      InterfaceImpl interfac2 = new InterfaceImpl();
       interfac2.setName(name2);
-      desc.addInterfaceElement(interfac2);
-      interfac.addExtendedInterfaceName(interfac2.getName());
       InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfac2.addInterfaceOperationElement(interfaceOperation);
-      
+      interfaceOperation.setName(name3);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
+	  binding.setInterfaceName(name1);
 	  BindingOperationImpl bindingOperation = new BindingOperationImpl();
-	  bindingOperation.setInterfaceOperationElement(interfaceOperation);
-	  binding.addBindingOperationElement(bindingOperation);
-      
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
+	  bindingOperation.setRef(name3);
       
-	  if(!val.testAssertionBinding0055(binding, reporter))
+      interfac2.addInterfaceOperationElement(interfaceOperation);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned false for a binding with an interface with one extended operation and one binding operation defined.");
 	  }
@@ -2138,24 +2169,21 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
-	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfaceOperation.setName(name2);
-      InterfaceElement interfac2 = desc.createInterfaceElement();
+      interfac.addExtendedInterfaceName(name2);
+      InterfaceImpl interfac2 = new InterfaceImpl();
       interfac2.setName(name2);
-      desc.addInterfaceElement(interfac2);
-	  interfac2.addInterfaceOperationElement(interfaceOperation);
-	  interfac.addExtendedInterfaceName(interfac2.getName());
-      
+      InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
+      interfaceOperation.setName(name3);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
-      
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
+      binding.setInterfaceName(name1);
       
-	  if(val.testAssertionBinding0055(binding, reporter))
+      interfac2.addInterfaceOperationElement(interfaceOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned true for a binding with an interface with one extended operation and no binding operation defined.");
 	  }
@@ -2170,33 +2198,32 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
-	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfac.addInterfaceOperationElement(interfaceOperation);
-      InterfaceElement interfac2 = desc.createInterfaceElement();
+      interfac.addExtendedInterfaceName(name2);
+      InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
+      interfaceOperation.setName(name3);
+      InterfaceImpl interfac2 = new InterfaceImpl();
       interfac2.setName(name2);
-      desc.addInterfaceElement(interfac2);
-	  InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
-	  interfac2.addInterfaceOperationElement(interfaceOperation2);
-	  interfac.addExtendedInterfaceName(interfac2.getName());
-      
+      InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
+      interfaceOperation2.setName(name4);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
-	  BindingOperationImpl bindingOperation = new BindingOperationImpl();
-	  bindingOperation.setInterfaceOperationElement(interfaceOperation);
-	  binding.addBindingOperationElement(bindingOperation);
-	  BindingOperationImpl bindingOperation2 = new BindingOperationImpl();
-	  bindingOperation2.setInterfaceOperationElement(interfaceOperation2);
-	  binding.addBindingOperationElement(bindingOperation2);
+      binding.setInterfaceName(name1);
+      BindingOperationImpl bindingOperation = new BindingOperationImpl();
+      bindingOperation.setRef(name3);
+      BindingOperationImpl bindingOperation2 = new BindingOperationImpl();
+      bindingOperation2.setRef(name4);
       
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
-      
-	  if(!val.testAssertionBinding0055(binding, reporter))
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      interfac2.addInterfaceOperationElement(interfaceOperation2);
+      binding.addBindingOperationElement(bindingOperation);
+      binding.addBindingOperationElement(bindingOperation2);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(!val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
-	    fail("The testAssertionBinding0055 method returned false for a binding with an interface with one defined operation and one extended operation and two binding operation defined.");
+	    fail("The testAssertionBinding0055 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)
@@ -2209,30 +2236,27 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
-	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfaceOperation.setName(name1);
-	  interfac.addInterfaceOperationElement(interfaceOperation);
-      InterfaceElement interfac2 = desc.createInterfaceElement();
-      interfac2.setName(name3);
-      desc.addInterfaceElement(interfac2);
-	  InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
-	  interfaceOperation2.setName(name4);
-	  interfac2.addInterfaceOperationElement(interfaceOperation2);
-	  interfac.addExtendedInterfaceName(interfac2.getName());
-      
+      interfac.addExtendedInterfaceName(name2);
+      InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
+      interfaceOperation.setName(name3);
+      InterfaceImpl interfac2 = new InterfaceImpl();
+      interfac2.setName(name2);
+      InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
+      interfaceOperation2.setName(name4);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
-	  BindingOperationImpl bindingOperation = new BindingOperationImpl();
-	  bindingOperation.setInterfaceOperationElement(interfaceOperation);
-	  binding.addBindingOperationElement(bindingOperation);
+      binding.setInterfaceName(name1);
+      BindingOperationImpl bindingOperation = new BindingOperationImpl();
+      bindingOperation.setRef(name3);
       
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
-      
-	  if(val.testAssertionBinding0055(binding, reporter))
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      interfac2.addInterfaceOperationElement(interfaceOperation2);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 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.");
 	  }
@@ -2247,30 +2271,27 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
-	  InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-	  interfaceOperation.setName(name2);
-	  interfac.addInterfaceOperationElement(interfaceOperation);
-      InterfaceElement interfac2 = desc.createInterfaceElement();
-      interfac2.setName(name3);
-      desc.addInterfaceElement(interfac2);
-	  InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
-	  interfaceOperation2.setName(name4);
-	  interfac2.addInterfaceOperationElement(interfaceOperation2);
-	  interfac.addExtendedInterfaceName(interfac2.getName());
-      
+      interfac.addExtendedInterfaceName(name2);
+      InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
+      interfaceOperation.setName(name3);
+      InterfaceImpl interfac2 = new InterfaceImpl();
+      interfac2.setName(name2);
+      InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
+      interfaceOperation2.setName(name4);
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
-	  BindingOperationImpl bindingOperation = new BindingOperationImpl();
-	  bindingOperation.setInterfaceOperationElement(interfaceOperation2);
-	  binding.addBindingOperationElement(bindingOperation);
+      binding.setInterfaceName(name1);
+      BindingOperationImpl bindingOperation = new BindingOperationImpl();
+      bindingOperation.setRef(name4);
       
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
-      
-	  if(val.testAssertionBinding0055(binding, reporter))
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      interfac2.addInterfaceOperationElement(interfaceOperation2);
+      binding.addBindingOperationElement(bindingOperation);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 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.");
 	  }
@@ -2287,27 +2308,24 @@
 	try
 	{
       DescriptionImpl desc = new DescriptionImpl();
-      InterfaceElement interfac = desc.createInterfaceElement();
+      InterfaceImpl interfac = new InterfaceImpl();
       interfac.setName(name1);
-      desc.addInterfaceElement(interfac);
+      interfac.addExtendedInterfaceName(name2);
       InterfaceOperationImpl interfaceOperation = new InterfaceOperationImpl();
-      interfaceOperation.setName(name2);
-      interfac.addInterfaceOperationElement(interfaceOperation);
-      InterfaceElement interfac2 = desc.createInterfaceElement();
-      interfac2.setName(name3);
-      desc.addInterfaceElement(interfac2);
+      interfaceOperation.setName(name3);
+      InterfaceImpl interfac2 = new InterfaceImpl();
+      interfac2.setName(name2);
       InterfaceOperationImpl interfaceOperation2 = new InterfaceOperationImpl();
       interfaceOperation2.setName(name4);
-      interfac2.addInterfaceOperationElement(interfaceOperation2);
-      interfac.addExtendedInterfaceName(interfac2.getName());
-      
       BindingImpl binding = new BindingImpl();
-      binding.setName(name1);
-	  binding.setInterfaceElement(interfac);
+      binding.setInterfaceName(name1);
       
-      desc.getInterfaces(); //init Interface's ref to its Description, needed for interface extension
-      
-	  if(val.testAssertionBinding0055(binding, reporter))
+      interfac.addInterfaceOperationElement(interfaceOperation);
+      interfac2.addInterfaceOperationElement(interfaceOperation2);
+      desc.addInterfaceElement(interfac);
+      desc.addInterfaceElement(interfac2);
+      desc.addBindingElement(binding);
+	  if(val.testAssertionBinding0055(desc.getBindings()[0], reporter))
 	  {
 	    fail("The testAssertionBinding0055 method returned true for a binding with an interface with one defined operation and one inherited operation and no binding operations defined.");
 	  }



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org