You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2005/04/25 16:51:37 UTC

cvs commit: ws-axis/java/test/wsdl/marshall2 Marshall2ServiceTestCase.java MarshallTestSoapBindingImpl.java

dims        2005/04/25 07:51:37

  Modified:    java/test/wsdl/marshall2 Marshall2ServiceTestCase.java
                        MarshallTestSoapBindingImpl.java
  Log:
  enhancing the tests a bit (sending nulls and throwing exception on nulll array on server-side)
  
  Revision  Changes    Path
  1.4       +26 -7     ws-axis/java/test/wsdl/marshall2/Marshall2ServiceTestCase.java
  
  Index: Marshall2ServiceTestCase.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall2/Marshall2ServiceTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Marshall2ServiceTestCase.java	22 Mar 2005 19:56:42 -0000	1.3
  +++ Marshall2ServiceTestCase.java	25 Apr 2005 14:51:37 -0000	1.4
  @@ -13,6 +13,7 @@
   import java.math.BigDecimal;
   import java.math.BigInteger;
   import java.util.Calendar;
  +import java.util.GregorianCalendar;
   import java.net.URI;
   
   import test.wsdl.marshall2.types.JavaBean;
  @@ -48,8 +49,11 @@
   
           // Test operation
           test.wsdl.marshall2.types.BigDecimalArrayTestResponse value = null;
  -        value = binding.bigDecimalArrayTest(new test.wsdl.marshall2.types.BigDecimalArrayTest(new BigDecimal[]{new BigDecimal("5.0"),new BigDecimal("5.0")}));
  -        // TBD - validate results
  +        value = binding.bigDecimalArrayTest(new test.wsdl.marshall2.types.BigDecimalArrayTest(new BigDecimal[]{new BigDecimal("5.0"),
  +                                                                                                               new BigDecimal("3512359.1456"),
  +                                                                                                               new BigDecimal("3512360.1456"),
  +                                                                                                               null
  +                                                                                                               }));
       }
   
       public void test2Marshall2PortBigDecimalTest() throws Exception {
  @@ -92,7 +96,11 @@
   
           // Test operation
           test.wsdl.marshall2.types.BigIntegerArrayTestResponse value = null;
  -        value = binding.bigIntegerArrayTest(new test.wsdl.marshall2.types.BigIntegerArrayTest(new BigInteger[]{new BigInteger("5"),new BigInteger("6")}));
  +        value = binding.bigIntegerArrayTest(new test.wsdl.marshall2.types.BigIntegerArrayTest(new BigInteger[]{new BigInteger("5"),
  +                                                                                              new BigInteger("3512359"),
  +                                                                                              new BigInteger("3512360"),
  +                                                                                              null
  +                                                                                            }));
           // TBD - validate results
       }
   
  @@ -444,7 +452,12 @@
   
           // Test operation
           test.wsdl.marshall2.types.StringArrayTestResponse value = null;
  -        value = binding.stringArrayTest(new test.wsdl.marshall2.types.StringArrayTest(new String[]{"foo","bar"}));
  +        value = binding.stringArrayTest(new test.wsdl.marshall2.types.StringArrayTest(new String[]{	"foo1",
  +                                                                                                    "foo2",
  +                                                                                                    "foo3",
  +                                                                                                    "",
  +                                                                                                    null
  +                                                                                                }));
           // TBD - validate results
       }
   
  @@ -510,7 +523,10 @@
   
           // Test operation
           test.wsdl.marshall2.types.QNameArrayTestResponse value = null;
  -        value = binding.qnameArrayTest(new test.wsdl.marshall2.types.QNameArrayTest(new QName[]{Constants.QNAME_FAULTDETAIL_HOSTNAME,Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME}));
  +        value = binding.qnameArrayTest(new test.wsdl.marshall2.types.QNameArrayTest(new QName[]{Constants.QNAME_FAULTDETAIL_HOSTNAME,Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME,	new QName("someLocalPart"),
  +                                                                                                new QName("http://someURI.org/", "someLocalPart"),
  +                                                                                                null
  +                                                                                                }));
           // TBD - validate results
       }
   
  @@ -532,8 +548,11 @@
   
           // Test operation
           test.wsdl.marshall2.types.CalendarArrayTestResponse value = null;
  -        value = binding.calendarArrayTest(new test.wsdl.marshall2.types.CalendarArrayTest(new Calendar[]{Calendar.getInstance(),Calendar.getInstance()}));
  -        // TBD - validate results
  +        value = binding.calendarArrayTest(new test.wsdl.marshall2.types.CalendarArrayTest(new Calendar[]{Calendar.getInstance(),
  +                                                                                                         new GregorianCalendar(96,5,1),
  +                                                                                                         new GregorianCalendar(99,10,25),
  +                                                                                                         null
  +                                                                                                         }));
       }
   
       public void test24Marshall2PortCalendarTest() throws Exception {
  
  
  
  1.3       +17 -0     ws-axis/java/test/wsdl/marshall2/MarshallTestSoapBindingImpl.java
  
  Index: MarshallTestSoapBindingImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/marshall2/MarshallTestSoapBindingImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MarshallTestSoapBindingImpl.java	17 Feb 2005 13:52:51 -0000	1.2
  +++ MarshallTestSoapBindingImpl.java	25 Apr 2005 14:51:37 -0000	1.3
  @@ -35,10 +35,15 @@
   import test.wsdl.marshall2.types.StringArrayTestResponse;
   import test.wsdl.marshall2.types.StringTestResponse;
   
  +import java.rmi.RemoteException;
  +
   public class MarshallTestSoapBindingImpl implements test.wsdl.marshall2.
           MarshallTest {
       public test.wsdl.marshall2.types.BigDecimalArrayTestResponse bigDecimalArrayTest(test.wsdl.marshall2.types.BigDecimalArrayTest parameters)
               throws java.rmi.RemoteException {
  +        if(parameters.getBigDecimalArray()==null) {
  +            throw new RemoteException("BigDecimalArray is null");
  +        }
           return new BigDecimalArrayTestResponse(parameters.getBigDecimalArray());
       }
   
  @@ -49,6 +54,9 @@
   
       public test.wsdl.marshall2.types.BigIntegerArrayTestResponse bigIntegerArrayTest(test.wsdl.marshall2.types.BigIntegerArrayTest parameters)
               throws java.rmi.RemoteException {
  +        if(parameters.getBigIntegerArray()==null) {
  +            throw new RemoteException("BigIntegerArray is null");
  +        }
           return new BigIntegerArrayTestResponse(parameters.getBigIntegerArray());
       }
   
  @@ -129,6 +137,9 @@
   
       public test.wsdl.marshall2.types.StringArrayTestResponse stringArrayTest(test.wsdl.marshall2.types.StringArrayTest parameters)
               throws java.rmi.RemoteException {
  +        if(parameters.getStringArray()==null) {
  +            throw new RemoteException("StringArray is null");
  +        }
           return new StringArrayTestResponse(parameters.getStringArray());
       }
   
  @@ -144,11 +155,17 @@
   
       public test.wsdl.marshall2.types.QNameArrayTestResponse qnameArrayTest(test.wsdl.marshall2.types.QNameArrayTest parameters)
               throws java.rmi.RemoteException {
  +        if(parameters.getQnameArray_1()==null) {
  +            throw new RemoteException("QnameArray_1 is null");
  +        }
           return new QNameArrayTestResponse(parameters.getQnameArray_1());
       }
   
       public test.wsdl.marshall2.types.CalendarArrayTestResponse calendarArrayTest(test.wsdl.marshall2.types.CalendarArrayTest parameters)
               throws java.rmi.RemoteException {
  +        if(parameters.getCalendarArray()==null) {
  +            throw new RemoteException("CalendarArray is null");
  +        }
           return new CalendarArrayTestResponse(parameters.getCalendarArray());
       }