cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r515944 - in /incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools: fortest/classnoanno/docwrapped/AddException.java fortest/classnoanno/docwrapped/Calculator.java java2wsdl/processor/JavaToProcessorTest.java
Date Thu, 08 Mar 2007 06:47:20 GMT
Author: mmao
Date: Wed Mar  7 22:47:19 2007
New Revision: 515944

URL: http://svn.apache.org/viewvc?view=rev&rev=515944
Log:
CXF-337
Tools2 java2wsdl do support POJO now, but the runtime has a bug when deal with exception class.
Test added in tools, but the fix should go into the rt.

Added:
    incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/AddException.java
    incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
Modified:
    incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java

Added: incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/AddException.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/AddException.java?view=auto&rev=515944
==============================================================================
--- incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/AddException.java
(added)
+++ incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/AddException.java
Wed Mar  7 22:47:19 2007
@@ -0,0 +1,26 @@
+/**
+ * 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.cxf.tools.fortest.classnoanno.docwrapped;
+
+public class AddException extends Exception {
+    public AddException(String message) {
+        super(message);
+    }
+}

Added: incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java?view=auto&rev=515944
==============================================================================
--- incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
(added)
+++ incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/fortest/classnoanno/docwrapped/Calculator.java
Wed Mar  7 22:47:19 2007
@@ -0,0 +1,32 @@
+/**
+ * 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.cxf.tools.fortest.classnoanno.docwrapped;
+
+import javax.jws.WebService;
+
+@WebService
+public class Calculator {
+    public int add(int a, int b) throws AddException {
+        if (a < 0 || b < 0) {
+            throw new AddException("No negetive please");
+        }
+        return a + b;
+    }
+} 

Modified: incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?view=diff&rev=515944&r1=515943&r2=515944
==============================================================================
--- incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools2/javato/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Wed Mar  7 22:47:19 2007
@@ -46,8 +46,6 @@
         ToolContext context = new ToolContext();
         context.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/doc_wrapped_bare.wsdl");
         context.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.simple.Hello");
-        //context.put(ToolConstants.CFG_TNS, tns);
-        //context.put(ToolConstants.CFG_SERVICENAME, serviceName);
         processor.setEnvironment(context);
         processor.process();
 
@@ -59,5 +57,20 @@
         assertNotNull(def);
         Service wsdlService = def.getService(new QName(tns, "Hello"));
         assertNotNull("Generate WSDL Service Error", wsdlService);
+    }
+    
+    public void testCalculator() throws Exception {
+        ToolContext context = new ToolContext();
+        context.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/calculator_rpc.wsdl");
+        context.put(ToolConstants.CFG_CLASSNAME,
+                    "org.apache.cxf.tools.fortest.classnoanno.docwrapped.Calculator");
+        processor.setEnvironment(context);
+        try {
+            processor.process();
+            fail("FIXME:CXF-337, remove this line if we fixed the runtime");
+        } catch (Exception e) {
+            // Test for CXF-337
+            // FIXME
+        }
     }
 }



Mime
View raw message