Author: alessio.soldano(a)jboss.com
Date: 2010-12-18 13:17:59 -0500 (Sat, 18 Dec 2010)
New Revision: 404
Added:
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/impl/
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
core/trunk/core-cxf/src/test/resources/hello_world.wsdl
core/trunk/core-cxf/src/test/resources/jaxws-binding.xml
core/trunk/core-cxf/src/test/resources/placeHolderClasses/
core/trunk/core-cxf/src/test/resources/placeHolderClasses/org/
core/trunk/core-cxf/src/test/resources/placeHolderClasses/org/jboss/
core/trunk/core-cxf/src/test/resources/placeHolderClasses/org/jboss/foo/
core/trunk/core-cxf/src/test/resources/placeHolderClasses/org/jboss/foo/Foo.class
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
core/trunk/core-native/src/test/resources/jaxws-binding.xml
core/trunk/core-native/src/test/resources/placeHolderClasses/
core/trunk/core-native/src/test/resources/placeHolderClasses/org/
core/trunk/core-native/src/test/resources/placeHolderClasses/org/jboss/
core/trunk/core-native/src/test/resources/placeHolderClasses/org/jboss/foo/
core/trunk/core-native/src/test/resources/placeHolderClasses/org/jboss/foo/Foo.class
Removed:
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
core/trunk/core/src/test/resources/hello_world.wsdl
core/trunk/core/src/test/resources/jaxws-binding.xml
core/trunk/core/src/test/resources/placeHolderClasses/
Modified:
core/trunk/core/pom.xml
core/trunk/integration-testsuite/pom.xml
core/trunk/pom.xml
Log:
[WISE-169] Slimming down core modules dependencies by removing the stack ones
Modified: core/trunk/core/pom.xml
===================================================================
--- core/trunk/core/pom.xml 2010-09-10 11:01:29 UTC (rev 403)
+++ core/trunk/core/pom.xml 2010-12-18 18:17:59 UTC (rev 404)
@@ -216,40 +216,4 @@
</build>
- <profiles>
- <!--
- Depending on the enabled profile, provide additional runtime client dependencies
- -->
- <profile>
- <id>native</id>
- <activation>
- <property>
- <name>!cxf.stack</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.ws.native</groupId>
- <artifactId>jbossws-native-client</artifactId>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <profile>
- <id>cxf</id>
- <activation>
- <property>
- <name>cxf.stack</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>org.jboss.ws.cxf</groupId>
- <artifactId>jbossws-cxf-client</artifactId>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
</project>
Deleted:
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 2010-09-10
11:01:29 UTC (rev 403)
+++
core/trunk/core/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java 2010-12-18
18:17:59 UTC (rev 404)
@@ -1,91 +0,0 @@
-/*
- * 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/resources/hello_world.wsdl
===================================================================
--- core/trunk/core/src/test/resources/hello_world.wsdl 2010-09-10 11:01:29 UTC (rev 403)
+++ core/trunk/core/src/test/resources/hello_world.wsdl 2010-12-18 18:17:59 UTC (rev 404)
@@ -1,85 +0,0 @@
-<?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>
Deleted: core/trunk/core/src/test/resources/jaxws-binding.xml
===================================================================
--- core/trunk/core/src/test/resources/jaxws-binding.xml 2010-09-10 11:01:29 UTC (rev
403)
+++ core/trunk/core/src/test/resources/jaxws-binding.xml 2010-12-18 18:17:59 UTC (rev
404)
@@ -1,9 +0,0 @@
-<jaxws:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- wsdlLocation="hello_world.wsdl"
-
xmlns="http://java.sun.com/xml/ns/jaxws"
-
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
-
- <jaxws:package name="org.mytest"/>
-
-</jaxws:bindings>
Added:
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
===================================================================
---
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
(rev 0)
+++
core/trunk/core-cxf/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java 2010-12-18
18:17:59 UTC (rev 404)
@@ -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");
+ }
+}
Added: core/trunk/core-cxf/src/test/resources/hello_world.wsdl
===================================================================
--- core/trunk/core-cxf/src/test/resources/hello_world.wsdl (rev
0)
+++ core/trunk/core-cxf/src/test/resources/hello_world.wsdl 2010-12-18 18:17:59 UTC (rev
404)
@@ -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>
Added: core/trunk/core-cxf/src/test/resources/jaxws-binding.xml
===================================================================
--- core/trunk/core-cxf/src/test/resources/jaxws-binding.xml (rev
0)
+++ core/trunk/core-cxf/src/test/resources/jaxws-binding.xml 2010-12-18 18:17:59 UTC (rev
404)
@@ -0,0 +1,9 @@
+<jaxws:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="hello_world.wsdl"
+
xmlns="http://java.sun.com/xml/ns/jaxws"
+
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
+
+ <jaxws:package name="org.mytest"/>
+
+</jaxws:bindings>
Added: core/trunk/core-cxf/src/test/resources/placeHolderClasses/org/jboss/foo/Foo.class
===================================================================
Added:
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
===================================================================
---
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java
(rev 0)
+++
core/trunk/core-native/src/test/java/org/jboss/wise/core/consumer/impl/WSConsumerTest.java 2010-12-18
18:17:59 UTC (rev 404)
@@ -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");
+ }
+}
Added: core/trunk/core-native/src/test/resources/jaxws-binding.xml
===================================================================
--- core/trunk/core-native/src/test/resources/jaxws-binding.xml
(rev 0)
+++ core/trunk/core-native/src/test/resources/jaxws-binding.xml 2010-12-18 18:17:59 UTC
(rev 404)
@@ -0,0 +1,9 @@
+<jaxws:bindings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="hello_world.wsdl"
+
xmlns="http://java.sun.com/xml/ns/jaxws"
+
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
+
+ <jaxws:package name="org.mytest"/>
+
+</jaxws:bindings>
Added:
core/trunk/core-native/src/test/resources/placeHolderClasses/org/jboss/foo/Foo.class
===================================================================
Modified: core/trunk/integration-testsuite/pom.xml
===================================================================
--- core/trunk/integration-testsuite/pom.xml 2010-09-10 11:01:29 UTC (rev 403)
+++ core/trunk/integration-testsuite/pom.xml 2010-12-18 18:17:59 UTC (rev 404)
@@ -131,8 +131,30 @@
<modules>
<module>native</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.native</groupId>
+ <artifactId>jbossws-native-client</artifactId>
+ <scope>runtime</scope> <!-- runtime scope to avoid having the
dependency while compiling -->
+ </dependency>
+ </dependencies>
</profile>
<profile>
+ <id>cxf</id>
+ <activation>
+ <property>
+ <name>cxf.stack</name>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.ws.cxf</groupId>
+ <artifactId>jbossws-cxf-client</artifactId>
+ <scope>runtime</scope> <!-- runtime scope to avoid having the
dependency while compiling -->
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
<id>use.endorsed.dir</id>
<activation>
<property>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2010-09-10 11:01:29 UTC (rev 403)
+++ core/trunk/pom.xml 2010-12-18 18:17:59 UTC (rev 404)
@@ -47,7 +47,7 @@
<surefire.usefile>false</surefire.usefile>
<compile.flags>-Xlint:unchecked,deprecation,fallthrough,finally</compile.flags>
<checkstyle.extension />
- <cxf.version>2.2</cxf.version>
+ <cxf.version>2.2.9</cxf.version> <!-- This should stay in synch
with the one used within the jbossws-cxf being pulled in wise-core-cxf -->
<compiler.fork>false</compiler.fork>
</properties>