axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r510367 - in /webservices/axis2/trunk/java/modules/jaxws: test-resources/xsd/ test/org/apache/axis2/jaxws/sample/ test/org/apache/axis2/jaxws/sample/dlwmin/ test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/ test/org/apache/axis2/jaxws/sam...
Date Thu, 22 Feb 2007 03:24:49 GMT
Author: scheu
Date: Wed Feb 21 19:24:48 2007
New Revision: 510367

URL: http://svn.apache.org/viewvc?view=rev&rev=510367
Log:
AXIS2-2155 patch5
Contributor: Rich Scheuerle

Added:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException3.java
Modified:
    webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java

Modified: webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd (original)
+++ webservices/axis2/trunk/java/modules/jaxws/test-resources/xsd/greeterTypes.xsd Wed Feb
21 19:24:48 2007
@@ -15,4 +15,11 @@
                     </sequence>
         </complexType>
      </element>
+     <element name="processFault3">
+        <complexType>
+                    <sequence>
+                        <element name="flag"    form="unqualified" type="xsd:int"/>
+                    </sequence>
+        </complexType>
+     </element>
 </schema>

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/DLWMinTests.java
Wed Feb 21 19:24:48 2007
@@ -26,6 +26,7 @@
 import org.apache.axis2.jaxws.sample.dlwmin.sei.Greeter;
 import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException;
 import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException2;
+import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException3;
 import org.apache.axis2.jaxws.sample.dlwmin.types.TestBean;
 
 import junit.framework.TestCase;
@@ -195,6 +196,27 @@
             assertTrue(te.getFlag() == 456);
         } catch (Exception e) {
             fail("Expected TestException2 thrown but found " + e.getClass());
+        }
+    }
+    
+    /**
+     * Test throwing checked exception that is a compliant JAXWS exception
+     */
+    public void testProcess_CheckException3()  throws Exception {
+        
+        Greeter proxy = getProxy("process");
+        
+        TestBean request = new TestBean();
+        request.setData1("hello world");
+        request.setData2(10);
+        try {
+            TestBean response = proxy.process(5, request);
+            fail("Expected TestException3 thrown");
+        } catch (TestException3 te) {
+            assertTrue(te.getMessage().equals("TestException3 thrown"));
+            assertTrue(te.getFaultInfo().getFlag() == 789);
+        } catch (Exception e) {
+            fail("Expected TestException3 thrown but found " + e.getClass());
         }
     }
     

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/GreeterImpl.java
Wed Feb 21 19:24:48 2007
@@ -21,6 +21,8 @@
 import org.apache.axis2.jaxws.sample.dlwmin.sei.Greeter;
 import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException;
 import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException2;
+import org.apache.axis2.jaxws.sample.dlwmin.sei.TestException3;
+import org.apache.axis2.jaxws.sample.dlwmin.types.ProcessFault3;
 import org.apache.axis2.jaxws.sample.dlwmin.types.TestBean;
 
 import javax.jws.WebService;
@@ -38,7 +40,7 @@
         return in;
     }
 
-    public TestBean process(int inAction, TestBean in) throws TestException, TestException2
{
+    public TestBean process(int inAction, TestBean in) throws TestException, TestException2,
TestException3 {
         if (inAction == 0) {
             // echo
             return in;
@@ -52,6 +54,11 @@
         } else if (inAction == 4) {
            // throw checked exception that does have a fault bean
             throw new TestException2("TestException2 thrown", 456);
+        } else if (inAction == 5) {
+           // throw checked exception that does have a fault bean
+            ProcessFault3 faultInfo = new ProcessFault3();
+            faultInfo.setFlag(789);
+            throw new TestException3("TestException3 thrown", faultInfo);
         }
         return null;
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeter.wsdl
Wed Feb 21 19:24:48 2007
@@ -115,7 +115,10 @@
         <wsdl:part element="tns:processFault" name="fault"/>
     </wsdl:message>
     <wsdl:message name="testProcessFault2">
-        <wsdl:part element="types:processFault" name="fault2"/>
+        <wsdl:part element="types:processFault2" name="fault2"/>
+    </wsdl:message>
+    <wsdl:message name="testProcessFault3">
+        <wsdl:part element="types:processFault3" name="fault3"/>
     </wsdl:message>
     
 
@@ -137,6 +140,7 @@
             <wsdl:output message="tns:processResponse" name="processResponse"/>
             <wsdl:fault message="tns:processFault" name="processFault"/>
             <wsdl:fault message="tns:processFault2" name="processFault2"/>
+            <wsdl:fault message="tns:processFault3" name="processFault3"/>
         </wsdl:operation>
      
     </wsdl:portType>
@@ -179,6 +183,9 @@
 			</fault>
 			<fault name="processFault2">
 				<soap:fault name="processFault2" use="literal" />
+			</fault>
+			<fault name="processFault3">
+				<soap:fault name="processFault3" use="literal" />
 			</fault>
         </wsdl:operation>
         

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/META-INF/greeterTypes.xsd
Wed Feb 21 19:24:48 2007
@@ -15,4 +15,11 @@
                     </sequence>
         </complexType>
      </element>
+     <element name="processFault3">
+        <complexType>
+                    <sequence>
+                        <element name="flag"    form="unqualified" type="xsd:int"/>
+                    </sequence>
+        </complexType>
+     </element>
 </schema>

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java?view=diff&rev=510367&r1=510366&r2=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/Greeter.java
Wed Feb 21 19:24:48 2007
@@ -49,5 +49,5 @@
         int inAction,
         @WebParam(targetNamespace = "", partName = "in")
         TestBean in
-    ) throws TestException, TestException2;
+    ) throws TestException, TestException2, TestException3;
 }

Added: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException3.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException3.java?view=auto&rev=510367
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException3.java
(added)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/sample/dlwmin/sei/TestException3.java
Wed Feb 21 19:24:48 2007
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axis2.jaxws.sample.dlwmin.sei;
+
+import javax.xml.ws.WebFault;
+
+import org.apache.axis2.jaxws.sample.dlwmin.types.ProcessFault3;
+
+/**
+ * Checked Exception with a WebFault that locates an existing JAXB Bean
+ *
+ */
+@WebFault(name="processFault3", targetNamespace="http://apache.org/axis2/jaxws/sample/dlwmin/types")
+public class TestException3 extends Exception {
+
+    public ProcessFault3 faultInfo;
+    
+
+    public TestException3(String message, ProcessFault3 faultInfo) {
+        super(message);
+        this.faultInfo = faultInfo;
+    }
+    
+    public ProcessFault3 getFaultInfo() {
+        return faultInfo;
+    }
+
+}



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


Mime
View raw message