ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r154967 - in webservices/axis/trunk/java/modules/samples/src: java/interop/doclit/InteropStub.java test/interop/doclit/InteropStubTest.java
Date Wed, 23 Feb 2005 06:15:55 GMT
Author: ajith
Date: Tue Feb 22 22:15:53 2005
New Revision: 154967

URL: http://svn.apache.org/viewcvs?view=rev&rev=154967
Log:
Changed the interop test classes to push exceptions upwards rather than catching them. 

Modified:
    webservices/axis/trunk/java/modules/samples/src/java/interop/doclit/InteropStub.java
    webservices/axis/trunk/java/modules/samples/src/test/interop/doclit/InteropStubTest.java

Modified: webservices/axis/trunk/java/modules/samples/src/java/interop/doclit/InteropStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/interop/doclit/InteropStub.java?view=diff&r1=154966&r2=154967
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/interop/doclit/InteropStub.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/java/interop/doclit/InteropStub.java Tue
Feb 22 22:15:53 2005
@@ -78,8 +78,8 @@
         return factory.getDefaultEnvelope();
     }
 
-    public SOAPStruct echoStruct(SOAPStruct inputEchoStruct){
-        try{
+    public SOAPStruct echoStruct(SOAPStruct inputEchoStruct) throws Exception{
+
 
             OMElement echoStructElementNode = factory.createOMElement("echoStructParam",interopNS);
 
@@ -119,20 +119,12 @@
 
             return soapStructure;
 
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-
-        return null;
-
 
     }
 
 
-    public String[] echoStringArray(String[] input){
-        try {
+    public String[] echoStringArray(String[] input) throws Exception{
+
 
             OMElement echoStringArrayParamElementNode = factory.createOMElement("echoStringArrayParam",interopNS);
             OMElement echoStringArrayElement;
@@ -163,16 +155,10 @@
             return SimpleTypeEncodingUtils.deserializeStringArray(elt.getPullParser(false));
 
 
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return null;
+
     }
 
-    public String echoString(String input){
-        try {
+    public String echoString(String input) throws Exception{
 
             OMElement echoStringParamElementNode = factory.createOMElement("echoStringParam",interopNS);
             OMText echoStringTextNode = factory.createText(echoStringParamElementNode,input);
@@ -197,13 +183,7 @@
 
             return elt.getFirstChild().getValue();
 
-        } catch (AxisFault axisFault) {
-            axisFault.printStackTrace();
-        }catch (Exception e){
-            e.printStackTrace();
-        }
 
-        return null;
     }
 
 

Modified: webservices/axis/trunk/java/modules/samples/src/test/interop/doclit/InteropStubTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/test/interop/doclit/InteropStubTest.java?view=diff&r1=154966&r2=154967
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/test/interop/doclit/InteropStubTest.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/test/interop/doclit/InteropStubTest.java
Tue Feb 22 22:15:53 2005
@@ -25,13 +25,13 @@
     private static String OPENLINK_ENDPOINT = "http://demo.openlinksw.com/r3/DocLit";
 
 
-    private void testEchoString(String endpoint,String soapAction){
+    private void testEchoString(String endpoint,String soapAction) throws Exception{
         InteropStub stub = new InteropStub(endpoint);
         stub.setSOAPAction(soapAction==null?"":soapAction);
         String echoValue = "Hello World";
         assertEquals(stub.echoString(echoValue),echoValue);
     }
-    private void testEchoStringArray(String endpoint,String soapAction){
+    private void testEchoStringArray(String endpoint,String soapAction) throws Exception{
         InteropStub stub = new InteropStub(endpoint);
         stub.setSOAPAction(soapAction==null?"":soapAction);
         String[] echoValueArray = new String[20];
@@ -48,7 +48,7 @@
         }
     }
 
-    private void testEchoStruct(String endpoint,String soapAction){
+    private void testEchoStruct(String endpoint,String soapAction) throws Exception{
         InteropStub stub = new InteropStub(endpoint);
         stub.setSOAPAction(soapAction==null?"":soapAction);
 
@@ -63,13 +63,13 @@
 
     }
 
-    public void testASPEndPoint(){
+    public void testASPEndPoint() throws Exception{
         testEchoString(ASP_NET_ENDPOINT,"\"http://soapinterop.org/\"");
         testEchoStringArray(ASP_NET_ENDPOINT,"\"http://soapinterop.org/\"");
         testEchoStruct(ASP_NET_ENDPOINT,"\"http://soapinterop.org/\"");
 
     }
-    public void testOpenlinkEndPoint(){
+    public void testOpenlinkEndPoint()throws Exception{
         testEchoString(OPENLINK_ENDPOINT,null);
         testEchoStringArray(OPENLINK_ENDPOINT,null);
         testEchoStruct(OPENLINK_ENDPOINT,null);



Mime
View raw message