Author: alessio.soldano(a)jboss.com
Date: 2010-09-05 19:21:17 -0400 (Sun, 05 Sep 2010)
New Revision: 395
Added:
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java
core/trunk/core-native/src/main/resources/META-INF/services/org.jboss.wise.consumer.WSConsumer
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java
core/trunk/core-native/src/test/resources/hello_world.wsdl
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbossws/
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbossws/DefaultWSImportImpl.java
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
Removed:
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java
Modified:
core/trunk/core-cxf/src/main/java/org/jboss/wise/core/client/jaxrs/impl/CXFRSDynamicClientBuilder.java
core/trunk/core/pom.xml
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSDynamicClientImpl.java
core/trunk/pom.xml
Log:
[WISE-169] Further moving jbossws stack specific stuff into core-native module (consumer
side)
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2010-09-05 21:43:40 UTC (rev 394)
+++ core/trunk/core/pom.xml 2010-09-05 23:21:17 UTC (rev 395)
@@ -51,6 +51,11 @@
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>jboss</groupId>
<artifactId>jboss-container</artifactId>
<exclusions>
Modified:
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSDynamicClientImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSDynamicClientImpl.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/reflection/WSDynamicClientImpl.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -32,9 +32,12 @@
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
+
import javax.xml.ws.WebServiceClient;
+
import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;
+
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
import org.jboss.wise.core.client.SpiLoader;
@@ -88,7 +91,7 @@
*/
private static WSConsumer createConsumer(WSDynamicClientBuilder builder) {
WSConsumer consumer = (WSConsumer) SpiLoader
- .loadService("org.jboss.wise.consumer.WSConsumer",
"org.jboss.wise.core.consumer.impl.jbosswsnative.WSImportImpl");
+ .loadService("org.jboss.wise.consumer.WSConsumer",
"org.jboss.wise.core.consumer.impl.jbossws.DefaultWSImportImpl");
return consumer;
}
@@ -138,7 +141,8 @@
try {
Thread.currentThread().setContextClassLoader(this.getClassLoader());
- JavaUtils.loadJavaType("com.sun.xml.ws.spi.ProviderImpl",
this.getClassLoader());
+ Class<?> clazz = JavaUtils.loadJavaType("javax.xml.ws.spi.Provider",
this.getClassLoader());
+ clazz.getMethod("provider", new Class[]{}).invoke(null, new Object[]{});
} finally {
// restore the original classloader
Thread.currentThread().setContextClassLoader(oldLoader);
Added:
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbossws/DefaultWSImportImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbossws/DefaultWSImportImpl.java
(rev 0)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbossws/DefaultWSImportImpl.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wise.core.consumer.impl.jbossws;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.LinkedList;
+import java.util.List;
+
+import net.jcip.annotations.ThreadSafe;
+
+import org.apache.log4j.Logger;
+import org.jboss.wise.core.consumer.WSConsumer;
+import org.jboss.wise.core.exception.WiseRuntimeException;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+
+/**
+ * @author alessio.soldano(a)jboss.com
+ * @author stefano.maestri(a)javalinux.it
+ *
+ */
+@ThreadSafe
+public class DefaultWSImportImpl extends WSConsumer {
+
+ private final String[] neededClasses = { "javax/jws/WebResult.class",
+ "javax/xml/ws/Action.class",
+ "javax/xml/bind/JAXBElement.class",
+ "com/sun/xml/bind/XmlAccessorFactory.class" };
+
+ public DefaultWSImportImpl() {
+
+ }
+
+ public DefaultWSImportImpl(boolean keepSource, boolean verbose) {
+ super();
+ this.setKeepSource(keepSource);
+ this.setVerbose(verbose);
+ }
+
+ @Override
+ public synchronized List<String> importObjectFromWsdl(String wsdlURL, File
outputDir, File sourceDir, String targetPackage, List<File> bindingFiles,
PrintStream messageStream, File catelog) throws MalformedURLException,
WiseRuntimeException {
+ WSContractConsumer wsImporter =
WSContractConsumer.newInstance(Thread.currentThread().getContextClassLoader());
+
+ if (targetPackage != null && targetPackage.trim().length() > 0) {
+ wsImporter.setTargetPackage(targetPackage);
+ }
+
+ wsImporter.setGenerateSource(this.isKeepSource());
+ wsImporter.setOutputDirectory(outputDir);
+ wsImporter.setSourceDirectory(sourceDir);
+ if (messageStream != null) {
+ wsImporter.setMessageStream(messageStream);
+ }
+
+ if (this.isVerbose()) {
+ wsImporter.setMessageStream(System.out);
+ }
+ wsImporter.setAdditionalCompilerClassPath(defineAdditionalCompilerClassPath());
+
+ if (bindingFiles != null && bindingFiles.size() > 0) {
+ wsImporter.setBindingFiles(bindingFiles);
+ }
+
+ if (catelog != null) {
+ wsImporter.setCatalog(catelog);
+ }
+ runWSConsume(wsImporter, wsdlURL);
+ return this.getClassNames(outputDir, targetPackage);
+ }
+
+ protected void runWSConsume(WSContractConsumer wsImporter, String wsdlURL) throws
MalformedURLException {
+ wsImporter.consume(wsdlURL);
+ }
+
+ /*
+ * This is used load libraries required by tests and usually not available
+ * when running out of container.
+ *
+ * @return A list of paths
+ */
+ protected List<String> defineAdditionalCompilerClassPath() throws
WiseRuntimeException {
+ List<String> cp = new LinkedList<String>();
+ for (String jar : neededClasses) {
+ try {
+ cp.add(Thread.currentThread().getContextClassLoader().getResource(jar).getPath().split("!")[0]);
+ } catch (NullPointerException npe) {
+ Logger.getLogger(this.getClass()).debug("Didnt't find jar needed by wsImport
API:" + jar);
+ }
+
+ }
+ return cp;
+ }
+}
Deleted:
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
- * individual contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site:
http://www.fsf.org.
- */
-
-package org.jboss.wise.core.consumer.impl.jbosswsnative;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-import net.jcip.annotations.ThreadSafe;
-import org.apache.log4j.Logger;
-import org.jboss.wise.core.consumer.WSConsumer;
-import org.jboss.wise.core.exception.WiseRuntimeException;
-import org.jboss.wsf.spi.tools.WSContractConsumer;
-
-/**
- * @author stefano.maestri(a)javalinux.it
- */
-@ThreadSafe
-public class WSImportImpl extends WSConsumer {
-
- private final ProviderChanger providerChanger;
-
- private final String[] neededClasses = { "javax/jws/WebResult.class",
- "javax/xml/ws/Action.class",
- "javax/xml/bind/JAXBElement.class",
- "com/sun/xml/bind/XmlAccessorFactory.class" };
-
- public WSImportImpl() {
- providerChanger = new ProviderChanger();
- }
-
- // for test purpose
- WSImportImpl(ProviderChanger changer) {
- providerChanger = changer;
- }
-
- public WSImportImpl(boolean keepSource, boolean verbose) {
- super();
- providerChanger = new ProviderChanger();
- this.setKeepSource(keepSource);
- this.setVerbose(verbose);
- }
-
- @Override
- public synchronized List<String> importObjectFromWsdl(String wsdlURL, File
outputDir, File sourceDir, String targetPackage, List<File> bindingFiles,
PrintStream messageStream, File catelog) throws MalformedURLException,
WiseRuntimeException {
- try {
- WSContractConsumer wsImporter =
WSContractConsumer.newInstance(Thread.currentThread().getContextClassLoader());
-
- if (targetPackage != null && targetPackage.trim().length() > 0) {
- wsImporter.setTargetPackage(targetPackage);
- }
-
- wsImporter.setGenerateSource(this.isKeepSource());
- wsImporter.setOutputDirectory(outputDir);
- wsImporter.setSourceDirectory(sourceDir);
- if (messageStream != null) {
- wsImporter.setMessageStream(messageStream);
- }
-
- if (this.isVerbose()) {
- wsImporter.setMessageStream(System.out);
- }
- wsImporter.setAdditionalCompilerClassPath(defineAdditionalCompilerClassPath());
-
- if (bindingFiles != null && bindingFiles.size() > 0) {
- wsImporter.setBindingFiles(bindingFiles);
- }
-
- if (catelog != null) {
- wsImporter.setCatalog(catelog);
- }
- // NEEDED for WISE-36 issue
-
- providerChanger.changeProvider();
- wsImporter.consume(wsdlURL);
- } finally {
- // NEEDED for WISE-36 issue
- providerChanger.restoreDefaultProvider();
-
- }
- return this.getClassNames(outputDir, targetPackage);
-
- }
-
- /*
- * This is used load libraries required by tests and usually not available
- * when running out of container.
- *
- * @return A list of paths
- */
- /* package */List<String> defineAdditionalCompilerClassPath() throws
WiseRuntimeException {
- List<String> cp = new LinkedList<String>();
- for (String jar : neededClasses) {
- try {
- cp.add(Thread.currentThread().getContextClassLoader().getResource(jar).getPath().split("!")[0]);
- } catch (NullPointerException npe) {
- Logger.getLogger(this.getClass()).debug("Didnt't find jar needed by wsImport
API:" + jar);
- }
-
- }
- return cp;
- }
-
- public class ProviderChanger {
-
- private final ClassLoader defaultCl = Thread.currentThread().getContextClassLoader();
-
- public void changeProvider() {
- URL[] urls = {};
- Thread.currentThread().setContextClassLoader(new
WiseForceToolsProviderClassLoader(urls, defaultCl));
- }
-
- public void restoreDefaultProvider() {
- Thread.currentThread().setContextClassLoader(defaultCl);
- }
- }
-}
Deleted:
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
- * individual contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site:
http://www.fsf.org.
- */
-
-package org.jboss.wise.core.consumer.impl.jbosswsnative;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringReader;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Enumeration;
-
-public class WiseForceToolsProviderClassLoader extends URLClassLoader {
-
- public WiseForceToolsProviderClassLoader(URL[] urls, ClassLoader parent) {
- super(urls, parent);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String)
- */
- @Override
- public InputStream getResourceAsStream(String name) {
- if (name != "META-INF/services/javax.xml.ws.spi.Provider") {
- return super.getResourceAsStream(name);
- }
- String returnString = "com.sun.xml.ws.spi.ProviderImpl";
-
- final StringReader reader = new StringReader(returnString);
- return new InputStream() {
-
- @Override
- public int read() throws IOException {
- return reader.read();
- }
- };
-
- }
-
-}
Added:
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
===================================================================
--- core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
(rev 0)
+++
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wise.core.consumer.impl;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.matchers.JUnitMatchers.hasItem;
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.wise.core.client.SpiLoader;
+import org.jboss.wise.core.consumer.WSConsumer;
+import org.jboss.wise.core.exception.WiseRuntimeException;
+import org.junit.Test;
+
+/**
+ * @author stefano.maestri(a)javalinux.it
+ * @author alessio.soldano(a)jboss.com
+ */
+public class WSConsumerTest {
+
+ @Test
+ public void parseHelloGreetingWSDLShouldWorkWithoutPackage() throws Exception {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(".");
+ File outputDir = new File(url.getFile());
+ URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
+ WSConsumer importer = newConsumer();
+ importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
+ }
+
+ @Test()
+ public void parseHelloWSDLWithBindingFile() throws Exception {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(".");
+ File outputDir = new File(url.getFile());
+ URL bindingURL =
Thread.currentThread().getContextClassLoader().getResource("./jaxws-binding.xml");
+ URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
+ File bindFile = new File(bindingURL.getFile());
+ List<File> bindings = new java.util.ArrayList<File>();
+ bindings.add(bindFile);
+ WSConsumer importer = newConsumer();
+ importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null,
bindings, System.out, null);
+ File generatedClass = new File(url.getFile(), "org/mytest");
+ assertTrue(generatedClass.exists());
+ }
+
+ @Test(expected = WiseRuntimeException.class)
+ public void
parseHelloGreetingWSDLShouldFailWithPackageAndNoBindingsForNameDuplication() throws
Exception {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(".");
+ File outputDir = new File(url.getFile());
+ URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
+ WSConsumer importer = newConsumer();
+ importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir,
"org.jboss.wise", null, System.out, null);
+ }
+
+ @Test()
+ public void getClassNamesShouldFindFooClassPlaceHolder() throws Exception {
+ WSConsumer importer = newConsumer();
+ URL url =
Thread.currentThread().getContextClassLoader().getResource("./placeHolderClasses/");
+ File file = new File(url.getFile());
+ List<String> list = importer.getClassNames(file);
+ assertThat(list.size(), is(1));
+ assertThat(list, hasItem("org.jboss.foo.Foo"));
+
+ }
+
+ private WSConsumer newConsumer() {
+ return (WSConsumer)
SpiLoader.loadService("org.jboss.wise.consumer.WSConsumer",
"org.jboss.wise.core.consumer.impl.jbossws.DefaultWSImportImpl");
+ }
+}
Deleted:
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java
===================================================================
---
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -1,127 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
- * individual contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site:
http://www.fsf.org.
- */
-
-package org.jboss.wise.core.consumer.impl.jbosswsnative;
-
-import static org.junit.matchers.JUnitMatchers.containsString;
-
-import static org.mockito.Matchers.contains;
-
-import static org.junit.matchers.JUnitMatchers.hasItems;
-
-import static org.hamcrest.core.Is.is;
-import static org.hamcrest.core.IsEqual.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-import static org.junit.matchers.JUnitMatchers.hasItem;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import java.io.File;
-import java.net.URL;
-import java.util.List;
-
-import org.hamcrest.Matcher;
-import org.jboss.wise.core.exception.WiseRuntimeException;
-import org.junit.Test;
-
-/**
- * @author stefano.maestri(a)javalinux.it
- */
-public class WSImportImplTest {
-
- @Test
- public void parseHelloGreetingWSDLShouldWorkWithoutPackage() throws Exception {
- URL url = Thread.currentThread().getContextClassLoader().getResource(".");
- File outputDir = new File(url.getFile());
- URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
- WSImportImpl importer = new WSImportImpl();
- importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
- }
-
- @Test
- public void importObjectFromWsdlShouldSetProviderProperties() throws Exception {
- URL url = Thread.currentThread().getContextClassLoader().getResource(".");
- File outputDir = new File(url.getFile());
- URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
- WSImportImpl.ProviderChanger providerChanger =
mock(WSImportImpl.ProviderChanger.class);
- WSImportImpl importer = new WSImportImpl(providerChanger);
- importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
- verify(providerChanger).changeProvider();
- verify(providerChanger).restoreDefaultProvider();
-
- }
-
- @Test
- public void importObjectFromWsdlShouldRestoreDefaultProviderProperties() throws
Exception {
- URL url = Thread.currentThread().getContextClassLoader().getResource(".");
- File outputDir = new File(url.getFile());
- URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
- WSImportImpl importer = new WSImportImpl();
- String defaultProvider = System.getProperty("javax.xml.ws.spi.Provider");
- importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
- assertThat(System.getProperty("javax.xml.ws.spi.Provider"),
equalTo(defaultProvider));
-
- }
-
- @Test()
- public void parseHelloWSDLWithBindingFile() throws Exception {
- URL url = Thread.currentThread().getContextClassLoader().getResource(".");
- File outputDir = new File(url.getFile());
- URL bindingURL =
Thread.currentThread().getContextClassLoader().getResource("./jaxws-binding.xml");
- URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
- File bindFile = new File(bindingURL.getFile());
- List<File> bindings = new java.util.ArrayList<File>();
- bindings.add(bindFile);
- WSImportImpl importer = new WSImportImpl();
- importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null,
bindings, System.out, null);
- File generatedClass = new File(url.getFile(), "org/mytest");
- assertTrue(generatedClass.exists());
- }
-
- @Test(expected = WiseRuntimeException.class)
- public void
parseHelloGreetingWSDLShouldFailWithPackageAndNoBindingsForNameDuplication() throws
Exception {
- URL url = Thread.currentThread().getContextClassLoader().getResource(".");
- File outputDir = new File(url.getFile());
- URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
- WSImportImpl importer = new WSImportImpl();
- importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir,
"org.jboss.wise", null, System.out, null);
- }
-
- @Test()
- public void getClassNamesShouldFindFooClassPlaceHolder() throws Exception {
- WSImportImpl importer = new WSImportImpl();
- URL url =
Thread.currentThread().getContextClassLoader().getResource("./placeHolderClasses/");
- File file = new File(url.getFile());
- List<String> list = importer.getClassNames(file);
- assertThat(list.size(), is(1));
- assertThat(list, hasItem("org.jboss.foo.Foo"));
-
- }
-
- @Test()
- public void defineAdditionalCompilerClassPathShouldReturnRightJars() {
-
- WSImportImpl importer = new WSImportImpl();
- List<String> jars = importer.defineAdditionalCompilerClassPath();
- assertThat(jars, hasItems(containsString("jbossws-native-jaxws"),
containsString("jbossws-native-jaxws-ext"),
containsString("jaxb-api"), containsString("jaxb-impl")));
- }
-}
Deleted:
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java
===================================================================
---
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wise.core.consumer.impl.jbosswsnative;
-
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URL;
-
-import org.junit.Test;
-
-/**
- * @author oracle
- *
- */
-public class WiseForceToolsProviderClassLoaderTest {
-
- /**
- * Test method for
- * {@link
org.jboss.wise.core.consumer.impl.jbosswsnative.WiseForceToolsProviderClassLoader#getResourceAsStream(java.lang.String)}
- * .
- *
- * @throws Exception
- */
- @Test
- public void getResourceAsStreamShouldGetToolsProvider() throws Exception {
- URL[] urls = {};
- WiseForceToolsProviderClassLoader cl = new WiseForceToolsProviderClassLoader(urls,
Thread.currentThread()
- .getContextClassLoader());
-
- InputStream inStream =
cl.getResourceAsStream("META-INF/services/javax.xml.ws.spi.Provider");
- String factoryName = null;
- if (inStream != null) {
- BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
- factoryName = br.readLine();
- br.close();
- }
- assertThat(factoryName, is("com.sun.xml.ws.spi.ProviderImpl"));
-
- }
-}
Modified:
core/trunk/core-cxf/src/main/java/org/jboss/wise/core/client/jaxrs/impl/CXFRSDynamicClientBuilder.java
===================================================================
---
core/trunk/core-cxf/src/main/java/org/jboss/wise/core/client/jaxrs/impl/CXFRSDynamicClientBuilder.java 2010-09-05
21:43:40 UTC (rev 394)
+++
core/trunk/core-cxf/src/main/java/org/jboss/wise/core/client/jaxrs/impl/CXFRSDynamicClientBuilder.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -21,8 +21,6 @@
*/
package org.jboss.wise.core.client.jaxrs.impl;
-import java.net.ConnectException;
-
import net.jcip.annotations.GuardedBy;
import net.jcip.annotations.ThreadSafe;
Added:
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java
===================================================================
---
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java
(rev 0)
+++
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImpl.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site:
http://www.fsf.org.
+ */
+
+package org.jboss.wise.core.consumer.impl.jbosswsnative;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import net.jcip.annotations.ThreadSafe;
+
+import org.jboss.wise.core.consumer.impl.jbossws.DefaultWSImportImpl;
+import org.jboss.wise.core.exception.WiseRuntimeException;
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+
+/**
+ * @author stefano.maestri(a)javalinux.it
+ * @author alessio.soldano(a)jboss.com
+ */
+@ThreadSafe
+public class WSImportImpl extends DefaultWSImportImpl {
+
+ private final ProviderChanger providerChanger;
+
+ public WSImportImpl() {
+ super();
+ providerChanger = new ProviderChanger();
+ }
+
+ // for test purpose
+ WSImportImpl(ProviderChanger changer) {
+ super();
+ providerChanger = changer;
+ }
+
+ public WSImportImpl(boolean keepSource, boolean verbose) {
+ super();
+ providerChanger = new ProviderChanger();
+ this.setKeepSource(keepSource);
+ this.setVerbose(verbose);
+ }
+
+ @Override
+ protected void runWSConsume(WSContractConsumer wsImporter, String wsdlURL) throws
MalformedURLException {
+ try {
+ // NEEDED for WISE-36 issue
+ providerChanger.changeProvider();
+ wsImporter.consume(wsdlURL);
+ } finally {
+ // NEEDED for WISE-36 issue
+ providerChanger.restoreDefaultProvider();
+ }
+ }
+
+ @Override
+ protected List<String> defineAdditionalCompilerClassPath() throws
WiseRuntimeException {
+ return super.defineAdditionalCompilerClassPath();
+ }
+
+ public class ProviderChanger {
+
+ private final ClassLoader defaultCl = Thread.currentThread().getContextClassLoader();
+
+ public void changeProvider() {
+ URL[] urls = {};
+ Thread.currentThread().setContextClassLoader(new
WiseForceToolsProviderClassLoader(urls, defaultCl));
+ }
+
+ public void restoreDefaultProvider() {
+ Thread.currentThread().setContextClassLoader(defaultCl);
+ }
+ }
+}
Added:
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java
===================================================================
---
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java
(rev 0)
+++
core/trunk/core-native/src/main/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoader.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site:
http://www.fsf.org.
+ */
+
+package org.jboss.wise.core.consumer.impl.jbosswsnative;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+public class WiseForceToolsProviderClassLoader extends URLClassLoader {
+
+ public WiseForceToolsProviderClassLoader(URL[] urls, ClassLoader parent) {
+ super(urls, parent);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String)
+ */
+ @Override
+ public InputStream getResourceAsStream(String name) {
+ if (name != "META-INF/services/javax.xml.ws.spi.Provider") {
+ return super.getResourceAsStream(name);
+ }
+ String returnString = "com.sun.xml.ws.spi.ProviderImpl";
+
+ final StringReader reader = new StringReader(returnString);
+ return new InputStream() {
+
+ @Override
+ public int read() throws IOException {
+ return reader.read();
+ }
+ };
+
+ }
+
+}
Added:
core/trunk/core-native/src/main/resources/META-INF/services/org.jboss.wise.consumer.WSConsumer
===================================================================
---
core/trunk/core-native/src/main/resources/META-INF/services/org.jboss.wise.consumer.WSConsumer
(rev 0)
+++
core/trunk/core-native/src/main/resources/META-INF/services/org.jboss.wise.consumer.WSConsumer 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1 @@
+org.jboss.wise.core.consumer.impl.jbosswsnative.WSImportImpl
\ No newline at end of file
Added:
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java
===================================================================
---
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java
(rev 0)
+++
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WSImportImplTest.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source Copyright 2006, JBoss Inc., and
+ * individual contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of individual
+ * contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This software is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this software; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
+ * site:
http://www.fsf.org.
+ */
+
+package org.jboss.wise.core.consumer.impl.jbosswsnative;
+
+import static org.hamcrest.core.IsEqual.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.matchers.JUnitMatchers.containsString;
+import static org.junit.matchers.JUnitMatchers.hasItems;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.io.File;
+import java.net.URL;
+import java.util.List;
+
+import org.junit.Test;
+
+/**
+ * @author stefano.maestri(a)javalinux.it
+ */
+public class WSImportImplTest {
+
+ @Test
+ public void importObjectFromWsdlShouldSetProviderProperties() throws Exception {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(".");
+ File outputDir = new File(url.getFile());
+ URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
+ WSImportImpl.ProviderChanger providerChanger =
mock(WSImportImpl.ProviderChanger.class);
+ WSImportImpl importer = new WSImportImpl(providerChanger);
+ importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
+ verify(providerChanger).changeProvider();
+ verify(providerChanger).restoreDefaultProvider();
+
+ }
+
+ @Test
+ public void importObjectFromWsdlShouldRestoreDefaultProviderProperties() throws
Exception {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(".");
+ File outputDir = new File(url.getFile());
+ URL wsdURL =
Thread.currentThread().getContextClassLoader().getResource("./hello_world.wsdl");
+ WSImportImpl importer = new WSImportImpl();
+ String defaultProvider = System.getProperty("javax.xml.ws.spi.Provider");
+ importer.importObjectFromWsdl(wsdURL.toExternalForm(), outputDir, outputDir, null, null,
System.out, null);
+ assertThat(System.getProperty("javax.xml.ws.spi.Provider"),
equalTo(defaultProvider));
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test()
+ public void defineAdditionalCompilerClassPathShouldReturnRightJars() {
+
+ WSImportImpl importer = new WSImportImpl();
+ List<String> jars = importer.defineAdditionalCompilerClassPath();
+ assertThat(jars, hasItems(containsString("jaxb-impl")));
+ }
+}
Added:
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java
===================================================================
---
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java
(rev 0)
+++
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/jbosswsnative/WiseForceToolsProviderClassLoaderTest.java 2010-09-05
23:21:17 UTC (rev 395)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wise.core.consumer.impl.jbosswsnative;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.junit.Test;
+
+/**
+ * @author oracle
+ *
+ */
+public class WiseForceToolsProviderClassLoaderTest {
+
+ /**
+ * Test method for
+ * {@link
org.jboss.wise.core.consumer.impl.jbosswsnative.WiseForceToolsProviderClassLoader#getResourceAsStream(java.lang.String)}
+ * .
+ *
+ * @throws Exception
+ */
+ @Test
+ public void getResourceAsStreamShouldGetToolsProvider() throws Exception {
+ URL[] urls = {};
+ WiseForceToolsProviderClassLoader cl = new WiseForceToolsProviderClassLoader(urls,
Thread.currentThread()
+ .getContextClassLoader());
+
+ InputStream inStream =
cl.getResourceAsStream("META-INF/services/javax.xml.ws.spi.Provider");
+ String factoryName = null;
+ if (inStream != null) {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ }
+ assertThat(factoryName, is("com.sun.xml.ws.spi.ProviderImpl"));
+
+ }
+}
Added: core/trunk/core-native/src/test/resources/hello_world.wsdl
===================================================================
--- core/trunk/core-native/src/test/resources/hello_world.wsdl
(rev 0)
+++ core/trunk/core-native/src/test/resources/hello_world.wsdl 2010-09-05 23:21:17 UTC
(rev 395)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions name="HelloWorld"
targetNamespace="http://www.jboss.org/hello_world_soap_http"
+
xmlns="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+
xmlns:tns="http://www.jboss.org/hello_world_soap_http"
+
xmlns:x1="http://www.jboss.org/hello_world_soap_http/types"
+
xmlns:x2="http://www.jboss.org/mytypes"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <wsdl:types>
+ <schema
targetNamespace="http://www.jboss.org/hello_world_soap_http/types"
+
xmlns="http://www.w3.org/2001/XMLSchema"
+
xmlns:tns="http://www.jboss.org/hello_world_soap_http/types"
+ elementFormDefault="qualified">
+ <simpleType name="MyStringType">
+ <restriction base="string">
+ <maxLength value="30" />
+ </restriction>
+ </simpleType>
+
+ <element name="greetMe">
+ <complexType>
+ <sequence>
+ <element name="myStringType"
type="tns:MyStringType"/>
+ <element name="requestType"
type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="requestType"
type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ <schema
targetNamespace="http://www.jboss.org/mytypes"
+
xmlns="http://www.w3.org/2001/XMLSchema"
+
xmlns:tns="http://www.jboss.org/mytypes"
+ elementFormDefault="qualified">
+ <element name="greetMeResponse">
+ <complexType>
+ <sequence>
+ <element name="requestType"
type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+
+
+ </wsdl:types>
+ <wsdl:message name="greetMeRequest">
+ <wsdl:part element="x1:greetMe" name="in"/>
+ </wsdl:message>
+ <wsdl:message name="greetMeResponse">
+ <wsdl:part element="x2:greetMeResponse" name="out"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Greeter">
+
+ <wsdl:operation name="greetMe">
+ <wsdl:input message="tns:greetMeRequest"
name="greetMeRequest"/>
+ <wsdl:output message="tns:greetMeResponse"
name="greetMeResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="Greeter_SOAPBinding"
type="tns:Greeter">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="greetMe">
+ <soap:operation soapAction="" style="document"/>
+ <wsdl:input name="greetMeRequest">
+ <soap:body use="literal"/>
+ </wsdl:input>
+ <wsdl:output name="greetMeResponse">
+ <soap:body use="literal"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ </wsdl:binding>
+ <wsdl:service name="SOAPService">
+ <wsdl:port binding="tns:Greeter_SOAPBinding"
name="SoapPort">
+ <soap:address
location="http://localhost:9000/SoapContext/SoapPort"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2010-09-05 21:43:40 UTC (rev 394)
+++ core/trunk/pom.xml 2010-09-05 23:21:17 UTC (rev 395)
@@ -159,6 +159,12 @@
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ </dependency>
+
+ <dependency>
<groupId>jboss</groupId>
<artifactId>jboss-container</artifactId>
<version>2.0.0.Beta</version>
@@ -553,6 +559,12 @@
<modules>
<module>core-cxf</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-client</artifactId>
+ </dependency>
+ </dependencies>
</profile>
</profiles>