[jbossws-commits] JBossWS SVN: r2436 - in branches/jbossws-1.2.0/jbossws-tests: src/main/java/org/jboss/test/ws/jaxws/complex and 1 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Wed Feb 21 18:55:38 EST 2007


Author: jason.greene at jboss.com
Date: 2007-02-21 18:55:38 -0500 (Wed, 21 Feb 2007)
New Revision: 2436

Modified:
   branches/jbossws-1.2.0/jbossws-tests/build.xml
   branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/JSR181ComplexTestCase.java
   branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/RegistrationServiceImpl.java
   branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/complex/META-INF/wsdl/Registration_PortType.wsdl
Log:
Correct test case which should have had only one return type in the WSDL.
The WSDL must have come from 1.0.4 which has a bug that always inserts "result"


Modified: branches/jbossws-1.2.0/jbossws-tests/build.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/build.xml	2007-02-21 23:54:20 UTC (rev 2435)
+++ branches/jbossws-1.2.0/jbossws-tests/build.xml	2007-02-21 23:55:38 UTC (rev 2436)
@@ -372,7 +372,7 @@
     <javac destdir="${tests.output.dir}/classes" debug="${javac.debug}" encoding="utf-8" verbose="${javac.verbose}" deprecation="${javac.deprecation}"
       failonerror="${javac.fail.onerror}" excludesfile="${excludesfile}">
       <src path="${tests.java.dir}"/>
-      <exclude name="org/jboss/test/ws/jaxws/**"/>
+      <exclude name="org/jboss/test/ws/jaxws/**/*"/>
       <exclude name="org/jboss/test/ws/tools/jaxws/**"/>
       <exclude name="org/jboss/test/ws/tools/jsr181/**"/>
       <classpath refid="javac.classpath"/>

Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/JSR181ComplexTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/JSR181ComplexTestCase.java	2007-02-21 23:54:20 UTC (rev 2435)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/JSR181ComplexTestCase.java	2007-02-21 23:55:38 UTC (rev 2436)
@@ -72,14 +72,12 @@
 
       XMLGregorianCalendar cal = getCalendar();
 
-      Holder<Long> registeredID = new Holder<Long>();
-      Holder<Long> result = new Holder<Long>();
-      port.register(customer, cal, registeredID, result);
+      port.register(customer, cal);
 
       customer = getAlCapone();
       try
       {
-         port.register(customer, cal, registeredID, result);
+         port.register(customer, cal);
          fail("Expected AlreadyRegisteredFault");
       }
       catch (AlreadyRegisteredFault_Exception e)
@@ -93,22 +91,15 @@
       InvoiceCustomer customer = getInvoiceFredJackson();
       customer.getReferredCustomers().add(getJohnDoe());
       customer.getReferredCustomers().add(getAlCapone());
-
-      Holder<Boolean> done = new Holder<Boolean>();
-      Holder<Boolean> result = new Holder<Boolean>();
-      port.registerForInvoice(customer, done, result);
-      assertTrue(result.value);
+      
+      assertTrue(port.registerForInvoice(customer));
    }
 
    public void testOtherPackage() throws Exception
    {
-      Holder<Statistics> statistics = new Holder<Statistics>();
-      Holder<Statistics> result = new Holder<Statistics>();
-      port.getStatistics(getFredJackson(), statistics, result);
-      Statistics stats = statistics.value;
+      Statistics stats = port.getStatistics(getFredJackson());
 
       System.out.println(stats.getActivationTime());
-
       assertEquals(10, stats.getHits());
    }
 
@@ -118,12 +109,10 @@
       customers.add(getFredJackson());
       customers.add(getJohnDoe());
 
-      Holder<List<Long>> registeredIDs = new Holder<List<Long>>();
-      Holder<List<Long>> result = new Holder<List<Long>>();
-      port.bulkRegister(customers, getCalendar(), registeredIDs, result);
+      List<Long> result = port.bulkRegister(customers, getCalendar());
 
-      assertEquals(123, result.value.get(0).longValue());
-      assertEquals(124, result.value.get(1).longValue());
+      assertEquals(123, result.get(0).longValue());
+      assertEquals(124, result.get(1).longValue());
 
       customers.clear();
       customers.add(getFredJackson());
@@ -134,7 +123,7 @@
 
       try
       {
-         port.bulkRegister(customers, getCalendar(), registeredIDs, result);
+         port.bulkRegister(customers, getCalendar());
       }
       catch (ValidationFault_Exception e)
       {

Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/RegistrationServiceImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/RegistrationServiceImpl.java	2007-02-21 23:54:20 UTC (rev 2435)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/complex/RegistrationServiceImpl.java	2007-02-21 23:55:38 UTC (rev 2436)
@@ -47,7 +47,7 @@
    // Provide logging
    private static Logger log = Logger.getLogger(RegistrationServiceImpl.class);
 
-   public void register(Customer customer, Object when, Holder<Long> registeredID, Holder<Long> result) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+   public long register(Customer customer, Object when) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
    {
       Name name = customer.getName();
       if (name == null)
@@ -70,10 +70,10 @@
       }
 
       log.info("registering customer: " + customer);
-      result.value = customer.getId();
+      return customer.getId();
    }
 
-   public void bulkRegister(List<Customer> customers, Object when, Holder<List<Long>> registeredIDs, Holder<List<Long>> result) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+   public List<Long> bulkRegister(List<Customer> customers, Object when) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
    {
       List<Long> registered = new ArrayList<Long>(customers.size());
       List<Long> failed = new ArrayList<Long>(customers.size());
@@ -82,10 +82,7 @@
       {
          try
          {
-            Holder<Long> id = new Holder<Long>();
-            Holder<Long> res = new Holder<Long>();
-            register(c, when, id, res);
-            registered.add(res.value);
+            registered.add(register(c, when));
          }
          catch (ValidationFault_Exception e)
          {
@@ -100,21 +97,21 @@
          throw new ValidationFault_Exception("Validation errors on bulk registering customers", fault);
       }
 
-      result.value = registered;
+      return registered;
    }
 
-   public void registerForInvoice(InvoiceCustomer invoiceCustomer, Holder<Boolean> done, Holder<Boolean> result) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
+   public boolean registerForInvoice(InvoiceCustomer invoiceCustomer) throws AlreadyRegisteredFault_Exception, ValidationFault_Exception
    {
       log.info("registerForInvoice: " + invoiceCustomer.getCycleDay());
-      result.value = true;
+      return true;
    }
 
-   public void getStatistics(Customer customer, Holder<Statistics> statistics, Holder<Statistics> result)
+   public Statistics getStatistics(Customer customer)
    {
       Statistics stats = new Statistics();
       stats.setHits(10);
       stats.setActivationTime(getCalendar());
-      result.value = stats;
+      return stats;
    }
    
    private XMLGregorianCalendar getCalendar() 

Modified: branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/complex/META-INF/wsdl/Registration_PortType.wsdl
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/complex/META-INF/wsdl/Registration_PortType.wsdl	2007-02-21 23:54:20 UTC (rev 2435)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/resources/jaxws/complex/META-INF/wsdl/Registration_PortType.wsdl	2007-02-21 23:55:38 UTC (rev 2436)
@@ -23,7 +23,6 @@
    <xs:complexType name="RegisterResponse">
     <xs:sequence>
      <xs:element name="RegisteredID" type="xs:long"/>
-     <xs:element name="result" type="xs:long"/>
     </xs:sequence>
    </xs:complexType>
    <xs:complexType name="AlreadyRegisteredFault">
@@ -52,7 +51,6 @@
    <xs:complexType name="GetStatisticsResponse">
     <xs:sequence>
      <xs:element name="Statistics" nillable="true" type="ns2:Statistics"/>
-     <xs:element name="result" nillable="true" type="ns2:Statistics"/>
     </xs:sequence>
    </xs:complexType>
    <xs:complexType name="BulkRegister">
@@ -64,7 +62,6 @@
    <xs:complexType name="BulkRegisterResponse">
     <xs:sequence>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="RegisteredIDs" type="xs:long"/>
-     <xs:element maxOccurs="unbounded" minOccurs="0" name="result" type="xs:long"/>
     </xs:sequence>
    </xs:complexType>
    <xs:complexType name="RegisterForInvoice">
@@ -75,7 +72,6 @@
    <xs:complexType name="RegisterForInvoiceResponse">
     <xs:sequence>
      <xs:element name="done" type="xs:boolean"/>
-     <xs:element name="result" type="xs:boolean"/>
     </xs:sequence>
    </xs:complexType>
   </xs:schema>




More information about the jbossws-commits mailing list