Author: ema
Date: Tue Sep 18 03:43:54 2007
New Revision: 576832
URL: http://svn.apache.org/viewvc?rev=576832&view=rev
Log:
[CXF-807]Applied Benson's patch. Now tool can use spring bean configuration to
do customization. Thanks, Benson!
Added:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
incubator/cxf/trunk/tools/javato/ws/src/test/resources/revisedAegisDefaultBeans.xml
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/aegis2ws/Something.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
Modified:
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++
incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Tue Sep 18 03:43:54 2007
@@ -71,7 +71,7 @@
*/
public static final String CFG_FRONTEND = "frontend";
- public static final String CFG_DATABINDING = "db";
+ public static final String CFG_DATABINDING = "databinding";
// WSDL2Java Constants
Modified:
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2ws/java2ws.xml
Tue Sep 18 03:43:54 2007
@@ -152,6 +152,15 @@
<annotation>target-namespace</annotation>
</associatedArgument>
</option>
+
+ <option id="beans" maxOccurs="unbounded">
+ <annotation>Specify the pathname of a file
defining additional Spring beans to customize databinding
+ configuration.</annotation>
+ <switch>beans</switch>
+ <associatedArgument placement="afterSpace">
+ <annotation>pathname of the bean
definition file.</annotation>
+ </associatedArgument>
+ </option>
<option id="servicename" maxOccurs="1">
<annotation>
Modified:
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/main/java/org/apache/cxf/tools/java2wsdl/processor/JavaToWSDLProcessor.java
Tue Sep 18 03:43:54 2007
@@ -49,10 +49,12 @@
import org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilderFactory;
import org.apache.cxf.tools.util.AnnotationUtil;
import org.apache.cxf.wsdl.WSDLConstants;
+import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.FileSystemResource;
public class JavaToWSDLProcessor implements Processor {
private static final Logger LOG =
LogUtils.getL7dLogger(JavaToWSDLProcessor.class);
@@ -86,16 +88,23 @@
* @param bus
* @return
*/
- public static ApplicationContext getApplicationContext(Bus bus) {
+ public static ApplicationContext getApplicationContext(Bus bus,
List<String> additionalFilePathnames) {
BusApplicationContext busApplicationContext =
bus.getExtension(BusApplicationContext.class);
GenericApplicationContext appContext = new
GenericApplicationContext(busApplicationContext);
XmlBeanDefinitionReader reader = new
XmlBeanDefinitionReader(appContext);
reader.loadBeanDefinitions(new
ClassPathResource("META-INF/cxf/java2wsbeans.xml"));
+ for (String pathname : additionalFilePathnames) {
+ try {
+ reader.loadBeanDefinitions(new FileSystemResource(pathname));
+ } catch (BeanDefinitionStoreException bdse) {
+ throw new ToolException("Unable to open bean definition file "
+ pathname, bdse.getCause());
+ }
+ }
+
return appContext;
}
public void process() throws ToolException {
- applicationContext = getApplicationContext(getBus());
String oldClassPath = System.getProperty(JAVA_CLASS_PATH);
LOG.log(Level.INFO, "OLD_CP", oldClassPath);
if (context.get(ToolConstants.CFG_CLASSPATH) != null) {
@@ -163,8 +172,19 @@
}
}
+ @SuppressWarnings("unchecked")
public ServiceBuilder getServiceBuilder() throws ToolException {
- applicationContext = getApplicationContext(getBus());
+ Object beanFilesParameter = context.get(ToolConstants.CFG_BEAN_CONFIG);
+ List<String> beanDefinitions = new ArrayList<String>();
+ if (beanFilesParameter != null) {
+ if (beanFilesParameter instanceof String) {
+ beanDefinitions.add((String)beanFilesParameter);
+ } else if (beanFilesParameter instanceof List) {
+ // is there a better way to avoid the warning?
+ beanDefinitions.addAll((List<String>)beanFilesParameter);
+ }
+ }
+ applicationContext = getApplicationContext(getBus(), beanDefinitions);
ServiceBuilderFactory builderFactory =
ServiceBuilderFactory.getInstance();
Class<?> clz = getServiceClass();
context.put(Class.class, clz);
Modified:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/aegis2ws/Something.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/aegis2ws/Something.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/aegis2ws/Something.java
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/aegis2ws/Something.java
Tue Sep 18 03:43:54 2007
@@ -22,7 +22,9 @@
* Test data type for Aegis in java2ws
*/
public class Something {
+ // the .aegis.xml file sets no special properties on the following.
private String multiple;
+ // the .aegis.xml file sets the following to minOccurs=1.
private String singular;
/**
Added:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java?rev=576832&view=auto
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
(added)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/AegisTest.java
Tue Sep 18 03:43:54 2007
@@ -0,0 +1,124 @@
+/**
+ * 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.java2ws;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.helpers.FileUtils;
+import org.apache.cxf.tools.common.ToolTestBase;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class AegisTest extends ToolTestBase {
+
+ private File output;
+ private String cp;
+ private File inputData;
+
+ private void checkStdErr() {
+ String err = getStdErr();
+ if (err != null) {
+ assertEquals("errors: ", "", err);
+ }
+ }
+
+ @Before
+ public void startUp() throws Exception {
+ cp = System.getProperty("java.class.path");
+ URL url = getClass().getResource(".");
+ output = new File(url.toURI());
+ output = new File(output, "/generated/");
+ url = getClass().getResource("/");
+ inputData = new File(url.toURI());
+ FileUtils.mkDir(output);
+ }
+
+ @After
+ public void tearDown() {
+ super.tearDown();
+ System.setProperty("java.class.path", cp);
+ }
+
+ private File outputFile(String name) {
+ File f = new File(output.getPath() + File.separator + name);
+ f.delete();
+ return f;
+ }
+
+ @Test
+ public void testAegisBasic() throws Exception {
+ final String sei =
"org.apache.cxf.tools.fortest.aegis2ws.TestAegisSEI";
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/aegis.wsdl", "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-databinding", "aegis",
+ "-client", "-server", sei};
+ File wsdlFile = null;
+ wsdlFile = outputFile("aegis.wsdl");
+ JavaToWS.main(args);
+ checkStdErr();
+ assertTrue("wsdl is not generated", wsdlFile.exists());
+
+ WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+ reader.setFeature("javax.wsdl.verbose", false);
+ Definition def = reader.readWSDL(wsdlFile.toURL().toString());
+ Document wsdl =
WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
+ addNamespace("ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/");
+ assertValid("//xsd:[EMAIL PROTECTED]'ns0:Something']", wsdl);
+ assertXPathEquals("//namespace::ns0",
"http://aegis2ws.fortest.tools.cxf.apache.org/", wsdl);
+ }
+
+ @Test
+ public void testAegisReconfigureDatabinding() throws Exception {
+ final String sei =
"org.apache.cxf.tools.fortest.aegis2ws.TestAegisSEI";
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/aegis.wsdl",
+ "-beans",
+ new File(inputData,
"revisedAegisDefaultBeans.xml").
+ getAbsolutePath(),
+ "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-databinding", "aegis",
+ "-client", "-server", sei};
+ File wsdlFile = null;
+ wsdlFile = outputFile("aegis.wsdl");
+ JavaToWS.main(args);
+ checkStdErr();
+ assertTrue("wsdl is not generated", wsdlFile.exists());
+
+ WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+ reader.setFeature("javax.wsdl.verbose", false);
+ Definition def = reader.readWSDL(wsdlFile.toURL().toString());
+ Document wsdl =
WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
+ addNamespace("ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/");
+ assertValid("//xsd:[EMAIL PROTECTED]'ns0:Something']", wsdl);
+ assertXPathEquals("//xsd:[EMAIL PROTECTED]'Something']/"
+ + "xsd:sequence/xsd:[EMAIL
PROTECTED]'multiple']/@minOccurs",
+ "50", wsdl);
+ assertInvalid("//xsd:[EMAIL PROTECTED]'Something']/"
+ + "xsd:sequence/xsd:[EMAIL
PROTECTED]'singular']/@minOccurs",
+ wsdl);
+ assertXPathEquals("//namespace::ns0",
"http://aegis2ws.fortest.tools.cxf.apache.org/", wsdl);
+ }
+
+}
Modified:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/JavaToWSTest.java
Tue Sep 18 03:43:54 2007
@@ -23,17 +23,14 @@
import java.net.URL;
import java.net.URLClassLoader;
-import javax.wsdl.Definition;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
-import org.w3c.dom.Document;
import org.apache.cxf.helpers.FileUtils;
import org.apache.cxf.tools.common.ToolContext;
import org.apache.cxf.tools.common.ToolTestBase;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
public class JavaToWSTest extends ToolTestBase {
@@ -50,12 +47,18 @@
output = new File(output, "/generated/");
FileUtils.mkDir(output);
}
-
+
@After
public void tearDown() {
super.tearDown();
System.setProperty("java.class.path", cp);
}
+
+ private File outputFile(String name) {
+ File f = new File(output.getPath() + File.separator + name);
+ f.delete();
+ return f;
+ }
@Test
public void testVersionOutput() throws Exception {
@@ -66,143 +69,122 @@
@Test
public void testFlagWSDL() throws Exception {
- String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl",
- "-d", output.getPath(), "-client",
"-server",
-
"org.apache.hello_world_soap12_http.Greeter"};
+ File wsdlFile = outputFile("tmp.wsdl");
+ String[] args = new String[] {"-wsdl", "-o",
wsdlFile.getAbsolutePath(), "-d", output.getPath(),
+ "-client", "-server",
"org.apache.hello_world_soap12_http.Greeter"};
JavaToWS.main(args);
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
+ checkStdErr();
assertTrue("wsdl is not generated", wsdlFile.exists());
}
+ private void checkStdErr() {
+ String err = getStdErr();
+ if (err != null) {
+ assertEquals("errors: ", "", err);
+ }
+ }
+
@Test
public void testSimple() throws Exception {
- String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose",
- "-d", output.getPath(),
- "-frontend", "jaxws",
- "-client", "-server",
+ File wsdlFile = outputFile("tmp.wsdl");
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-client", "-server",
"org.apache.hello_world_doc_lit.Greeter"};
JavaToWS.main(args);
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
- // TODO: validate the file.
+ checkStdErr();
assertTrue("wsdl is not generated", wsdlFile.exists());
}
@Test
- public void testAegis() throws Exception {
- final String sei =
"org.apache.cxf.tools.fortest.aegis2ws.TestAegisSEI";
- String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/aegis.wsdl", "-verbose", "-d",
- output.getPath(), "-frontend", "jaxws",
"-databinding", "aegis",
- "-client", "-server", sei};
+ public void testMissingBeans() {
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-client", "-server",
+ "-beans", "nobodyHome.xml",
+ "-beans", "nothing.xml",
+
"org.apache.hello_world_doc_lit.Greeter"};
JavaToWS.main(args);
- File wsdlFile = new File(output.getPath() + "/aegis.wsdl");
- assertTrue("wsdl is not generated", wsdlFile.exists());
-
- WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
- reader.setFeature("javax.wsdl.verbose", false);
- Definition def = reader.readWSDL(wsdlFile.toURL().toString());
- Document wsdl =
WSDLFactory.newInstance().newWSDLWriter().getDocument(def);
- addNamespace("ns0", "http://aegis2ws.fortest.tools.cxf.apache.org/");
- assertValid("//xsd:[EMAIL PROTECTED]'something']", wsdl);
- assertXPathEquals("//namespace::ns0",
"http://aegis2ws.fortest.tools.cxf.apache.org/", wsdl);
+ String err = getStdErr();
+ assertTrue("Missing file error message",
+ err.indexOf("Unable to open bean definition file
nobodyHome.xml") >= 0);
}
-
@Test
public void testClassNoWebServiceAnno() throws Exception {
- String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose",
- "-d", output.getPath(),
- "-frontend", "jaxws",
- "-client", "-server",
+ File wsdlFile = outputFile("tmp.wsdl");
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-client", "-server",
"org.apache.cxf.tools.fortest.HelloWithNoAnno"};
JavaToWS.main(args);
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
assertTrue("wsdl is not generated", wsdlFile.exists());
- assertTrue("Class does not carry WebService error should be detected"
- , getStdErr().indexOf("does not carry a WebService
annotation") > -1);
+ assertTrue("Class does not carry WebService error should be detected",
getStdErr()
+ .indexOf("does not carry a WebService annotation") > -1);
}
@Test
public void testClassWithRMI() throws Exception {
- String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose",
- "-d", output.getPath(),
- "-frontend", "jaxws",
- "-client", "-server",
+ File wsdlFile = outputFile("tmp.wsdl");
+ String[] args = new String[] {"-wsdl", "-o", output.getPath() +
"/tmp.wsdl", "-verbose", "-d",
+ output.getPath(), "-frontend", "jaxws",
"-client", "-server",
"org.apache.cxf.tools.fortest.HelloRMI"};
JavaToWS.main(args);
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
assertTrue("wsdl is not generated", wsdlFile.exists());
assertTrue("Parameter or return type implemented java.rmi.Remote
interface error should be detected",
getStdErr().indexOf("implemented the java.rmi.Remote
interface") > -1);
}
@Test
+ @Ignore // CXF-1024
public void testGenServerAndClient() throws Exception {
+ File client =
outputFile("org/apache/hello_world_soap12_http/GreeterClient.java");
+ File server =
outputFile("org/apache/hello_world_soap12_http/GreeterServer.java");
+
String[] args = new String[] {"-d", output.getPath(), "-client",
"-server",
"org.apache.hello_world_soap12_http.Greeter"};
JavaToWS.main(args);
- File client = new File(output.getPath()
- +
"/org/apache/hello_world_soap12_http/GreeterClient.java");
-
+ checkStdErr();
assertTrue("Client is not generated", client.exists());
-
- File server = new File(output.getPath()
- +
"/org/apache/hello_world_soap12_http/GreeterServer.java");
assertTrue("Greeter_GreeterPort_Server.java is not generated",
server.exists());
}
-
-
@Test
public void testGenServerAndImpl() throws Exception {
+ File server =
outputFile("org/apache/hello_world_soap12_http/GreeterServer.java");
+ File impl =
outputFile("org/apache/hello_world_soap12_http/GreeterImpl.java");
+
String[] args = new String[] {"-d", output.getPath(), "-server",
"org.apache.hello_world_soap12_http.Greeter"};
JavaToWS.main(args);
-
- File server = new File(output.getPath()
- +
"/org/apache/hello_world_soap12_http/GreeterServer.java");
+ checkStdErr();
assertTrue("GreeterServer.java is not generated", server.exists());
-
-
- File impl = new File(output.getPath()
- +
"/org/apache/hello_world_soap12_http/GreeterImpl.java");
assertTrue("GreeterImpl.java is not generated", impl.exists());
}
@Test
public void testGenWrapperBean() throws Exception {
- String[] args = new String[] {"-d", output.getPath(),
- "-wrapperbean",
- "-impl", "-server",
+ String[] args = new String[] {"-d", output.getPath(), "-wrapperbean",
"-server",
"org.apache.cxf.tools.java2ws.fortest.Calculator"};
JavaToWS.main(args);
+ checkStdErr();
}
-
@Test
public void testInvalidFlag() throws Exception {
String[] args = new String[] {"-frontend", "tmp", "-wsdl", "-o",
output.getPath() + "/tmp.wsdl",
"org.apache.hello_world_soap12_http.Greeter"};
JavaToWS.main(args);
- assertTrue("invalid frontend flag should be detected",
- getStdErr().indexOf("is not a valid frontend,") > -1);
-
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
- assertTrue("wsdl is not generated", wsdlFile.exists());
+ assertTrue("invalid frontend flag should be detected", getStdErr()
+ .indexOf("is not a valid frontend,") > -1);
}
@Test
public void testInvalidFlag2() throws Exception {
- String[] args = new String[] {"-frontend", "simple", "-wrapperbean",
"-wsdl",
- "-o", output.getPath() + "/tmp.wsdl",
+ String[] args = new String[] {"-frontend", "simple", "-wrapperbean",
"-wsdl", "-o",
+ output.getPath() + "/tmp.wsdl",
"org.apache.hello_world_soap12_http.Greeter"};
JavaToWS.main(args);
- assertTrue("wrapperbean flag error should be detected",
- getStdErr().indexOf("-wrapperbean is only valid for the
jaxws front end.") > -1);
- File wsdlFile = new File(output.getPath() + "/tmp.wsdl");
- assertTrue("wsdl is not generated", wsdlFile.exists());
+ assertTrue("wrapperbean flag error should be detected", getStdErr()
+ .indexOf("-wrapperbean is only valid for the jaxws front end.") >
-1);
}
-
-
protected String getClassPath() throws URISyntaxException {
ClassLoader loader = getClass().getClassLoader();
Modified:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2ws/fortest/Calculator.java
Tue Sep 18 03:43:54 2007
@@ -18,6 +18,9 @@
*/
package org.apache.cxf.tools.java2ws.fortest;
+import javax.jws.WebService;
+
[EMAIL PROTECTED]
public class Calculator {
public int add(int a, int b) throws AddException {
if (a < 0 || b < 0) {
Modified:
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java?rev=576832&r1=576831&r2=576832&view=diff
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
(original)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/internal/ServiceBuilderFactoryTest.java
Tue Sep 18 03:43:54 2007
@@ -19,6 +19,8 @@
package org.apache.cxf.tools.java2wsdl.processor.internal;
+import java.util.ArrayList;
+
import org.apache.cxf.BusFactory;
import org.apache.cxf.jaxws.JaxwsServiceBuilder;
import org.apache.cxf.service.ServiceBuilder;
@@ -38,7 +40,8 @@
@Before
public void setUp() {
- applicationContext =
JavaToWSDLProcessor.getApplicationContext(BusFactory.getDefaultBus());
+ applicationContext =
JavaToWSDLProcessor.getApplicationContext(BusFactory.getDefaultBus(),
+ new
ArrayList<String>());
}
@Test
Added:
incubator/cxf/trunk/tools/javato/ws/src/test/resources/revisedAegisDefaultBeans.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/javato/ws/src/test/resources/revisedAegisDefaultBeans.xml?rev=576832&view=auto
==============================================================================
---
incubator/cxf/trunk/tools/javato/ws/src/test/resources/revisedAegisDefaultBeans.xml
(added)
+++
incubator/cxf/trunk/tools/javato/ws/src/test/resources/revisedAegisDefaultBeans.xml
Tue Sep 18 03:43:54 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+<bean id="AegisDatabindingBean"
class="org.apache.cxf.aegis.databinding.AegisDatabinding" >
+ <property name="typeMappingRegistry">
+ <bean
class="org.apache.cxf.aegis.type.DefaultTypeMappingRegistry">
+ <constructor-arg index="0" value="true"/>
+ <property name="configuration">
+ <bean
class="org.apache.cxf.aegis.type.Configuration">
+ <property name="defaultMinOccurs"
value="50"/>
+ </bean>
+ </property>
+ </bean>
+ </property>
+</bean>
+
+</beans>