JBossWS SVN: r18323 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices: invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2014-02-07 18:14:25 -0500 (Fri, 07 Feb 2014)
New Revision: 18323
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/injection/WSComponent.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
Log:
[JBWS-3670]:Only set referenc for spring integration
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/injection/WSComponent.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/injection/WSComponent.java 2014-02-07 18:00:10 UTC (rev 18322)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/injection/WSComponent.java 2014-02-07 23:14:25 UTC (rev 18323)
@@ -27,6 +27,7 @@
/**
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
public final class WSComponent extends BasicComponent {
@@ -34,7 +35,7 @@
private volatile ManagedReference reference;
/**
- * We can't lock on <code>this</code> because the
+ * We can't lock on <code>this</code> because the
* {@link org.jboss.as.ee.component.BasicComponent#waitForComponentStart()}
* also synchronizes on it, and calls {@link #wait()}.
*/
@@ -46,23 +47,22 @@
public BasicComponentInstance getComponentInstance() {
if (wsComponentInstance == null) {
- synchronized (lock) {
- if (wsComponentInstance == null && reference == null) {
- wsComponentInstance = (BasicComponentInstance) createInstance();
- }
- if (wsComponentInstance == null && reference != null) {
- wsComponentInstance = (BasicComponentInstance) this.createInstance(reference.getInstance());
- }
- }
- }
- return wsComponentInstance;
+ synchronized (lock) {
+ if (wsComponentInstance == null && reference == null) {
+ wsComponentInstance = (BasicComponentInstance) createInstance();
+ }
+ if (wsComponentInstance == null && reference != null) {
+ wsComponentInstance = (BasicComponentInstance) this.createInstance(reference.getInstance());
+ }
+ }
+ }
+ return wsComponentInstance;
}
-
public void setReference(ManagedReference reference) {
this.reference = reference;
}
-
+
@Override
public void stop() {
if (wsComponentInstance == null) return;
@@ -74,3 +74,4 @@
}
}
}
+
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-02-07 18:00:10 UTC (rev 18322)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/invocation/AbstractInvocationHandler.java 2014-02-07 23:14:25 UTC (rev 18323)
@@ -46,6 +46,7 @@
* Invocation abstraction for all endpoint types
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
*/
abstract class AbstractInvocationHandler extends org.jboss.ws.common.invocation.AbstractInvocationHandler {
@@ -102,20 +103,21 @@
// prepare for invocation
onBeforeInvocation(wsInvocation);
//for spring integration we don't need to go into ee's interceptors
- if(wsInvocation.getInvocationContext().getTargetBean() != null) {
+ if(wsInvocation.getInvocationContext().getTargetBean() != null && endpoint.getProperty("SpringBus") != null) {
this.reference = new ManagedReference() {
- public void release() {
+ public void release()
+ {
}
public Object getInstance()
{
return wsInvocation.getInvocationContext().getTargetBean();
- }
+ }
};
}
// prepare invocation data
final ComponentView componentView = getComponentView();
Component component = componentView.getComponent();
- if (reference != null && component instanceof WSComponent) {
+ if (component instanceof WSComponent && endpoint.getProperty("SpringBus") != null) {
((WSComponent)component).setReference(reference);
}
final Method method = getComponentViewMethod(wsInvocation.getJavaMethod(), componentView.getViewMethods());
@@ -123,7 +125,6 @@
prepareForInvocation(context, wsInvocation);
context.setMethod(method);
context.setParameters(wsInvocation.getArgs());
- context.setTarget(reference.getInstance());
context.putPrivateData(Component.class, component);
context.putPrivateData(ComponentView.class, componentView);
// invoke method
@@ -214,3 +215,4 @@
}
}
+
11 years, 2 months
JBossWS SVN: r18322 - projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-07 13:00:10 -0500 (Fri, 07 Feb 2014)
New Revision: 18322
Modified:
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
Log:
Fix doc typos
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 17:59:34 UTC (rev 18321)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 18:00:10 UTC (rev 18322)
@@ -98,7 +98,7 @@
<executions>
<execution>
<!-- Run wsprovide to create the wsdl for the endpoint to be used later -->
- <!-- This also create the request/response wrapper classes that are also included in the deployement (actually optional w/ JBossWS) -->
+ <!-- This also creates the request/response wrapper classes that are also included in the deployement (actually optional w/ JBossWS) -->
<id>wsprovide execution</id>
<goals>
<goal>wsprovide</goal>
@@ -181,7 +181,7 @@
</build>
<profiles>
- <!-- A profile for avoid meaningless Eclipse warnings / errors (see https://issues.jboss.org/browse/JBWS-3666) -->
+ <!-- A profile to avoid meaningless Eclipse warnings / errors (see https://issues.jboss.org/browse/JBWS-3666) -->
<profile>
<id>eclipse-m2e</id>
<activation>
11 years, 2 months
JBossWS SVN: r18319 - projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-07 12:43:21 -0500 (Fri, 07 Feb 2014)
New Revision: 18319
Modified:
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
Log:
[JBWS-3617] Also set pluginRepository to jboss nexus and move to latest jaxws tools plugin
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 17:20:57 UTC (rev 18318)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 17:43:21 UTC (rev 18319)
@@ -45,6 +45,12 @@
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>JBOSS_NEXUS</id>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ </pluginRepository>
+ </pluginRepositories>
<build>
<testResources>
<!-- Copy the Log4J configuration in the test classpath -->
@@ -85,7 +91,7 @@
<plugin>
<groupId>org.jboss.ws.plugins</groupId>
<artifactId>maven-jaxws-tools-plugin</artifactId>
- <version>1.1.1.Final</version>
+ <version>1.1.2.Final</version>
<configuration>
<verbose>true</verbose>
</configuration>
11 years, 2 months
JBossWS SVN: r18318 - projects/plugins/maven/jaxws-tools/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-07 12:20:57 -0500 (Fri, 07 Feb 2014)
New Revision: 18318
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
Log:
Prepare for next dev cycle
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2014-02-07 17:19:54 UTC (rev 18317)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2014-02-07 17:20:57 UTC (rev 18318)
@@ -8,7 +8,7 @@
<artifactId>maven-jaxws-tools-plugin</artifactId>
<packaging>maven-plugin</packaging>
- <version>1.1.2-SNAPSHOT</version>
+ <version>1.1.3-SNAPSHOT</version>
<!-- Parent -->
<parent>
11 years, 2 months
JBossWS SVN: r18315 - in projects/plugins/maven/jaxws-tools/trunk: src/main/java/org/jboss/ws/plugins/tools and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-07 12:07:33 -0500 (Fri, 07 Feb 2014)
New Revision: 18315
Modified:
projects/plugins/maven/jaxws-tools/trunk/pom.xml
projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
Log:
[JBWS-3757] Upgrade jaxws-tools-maven-plugin to JBossWS 4.2
Modified: projects/plugins/maven/jaxws-tools/trunk/pom.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/pom.xml 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/pom.xml 2014-02-07 17:07:33 UTC (rev 18315)
@@ -26,7 +26,7 @@
<!-- Properties -->
<properties>
- <jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
+ <jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
<getopt.version>1.0.13</getopt.version>
<log4j.version>1.2.14</log4j.version>
<maven.project.version>2.2.1</maven.project.version>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/src/main/java/org/jboss/ws/plugins/tools/AbstractToolsMojo.java 2014-02-07 17:07:33 UTC (rev 18315)
@@ -133,6 +133,10 @@
{
result.add(s.getFile().getAbsolutePath());
}
+ else if ("gnu.getopt".equals(s.getGroupId()) && "java-getopt".equals(s.getArtifactId()))
+ {
+ result.add(s.getFile().getAbsolutePath());
+ }
else if ("log4j".equals(s.getGroupId()) && "log4j".equals(s.getArtifactId()))
{
result.add(s.getFile().getAbsolutePath());
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testEndorse/pom-cxf.xml 2014-02-07 17:07:33 UTC (rev 18315)
@@ -120,12 +120,12 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.3.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-factories</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.3.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.xml.ws</groupId>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testProvidedScope/pom-cxf.xml 2014-02-07 17:07:33 UTC (rev 18315)
@@ -88,7 +88,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.3.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsConsume/pom-cxf.xml 2014-02-07 17:07:33 UTC (rev 18315)
@@ -95,7 +95,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.3.Final</version>
</dependency>
</dependencies>
</project>
Modified: projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2014-02-07 15:18:46 UTC (rev 18314)
+++ projects/plugins/maven/jaxws-tools/trunk/src/test/resources/test-embedded/testWsProvide/pom-cxf.xml 2014-02-07 17:07:33 UTC (rev 18315)
@@ -94,7 +94,7 @@
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
- <version>4.1.0.Final</version>
+ <version>4.2.3.Final</version>
</dependency>
</dependencies>
</project>
11 years, 2 months
JBossWS SVN: r18314 - in projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources: archetype-resources and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-02-07 10:18:46 -0500 (Fri, 07 Feb 2014)
New Revision: 18314
Added:
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/Person.java
Modified:
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/META-INF/maven/archetype.xml
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java
projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/test/java/HelloWorldIntegrationTest.java
Log:
[JBWS-3617] Adding jaxws tools plugin invocations to properly decouple client and server in the generated project
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/META-INF/maven/archetype.xml
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/META-INF/maven/archetype.xml 2014-02-07 10:55:20 UTC (rev 18313)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/META-INF/maven/archetype.xml 2014-02-07 15:18:46 UTC (rev 18314)
@@ -1,5 +1,5 @@
<archetype>
- <id>jaxws-codefirst</id>
+ <id>$artifactId</id>
<sources>
<source>src/main/java/HelloWorld.java</source>
<source>src/main/java/HelloWorldImpl.java</source>
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 10:55:20 UTC (rev 18313)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/pom.xml 2014-02-07 15:18:46 UTC (rev 18314)
@@ -47,6 +47,7 @@
</repositories>
<build>
<testResources>
+ <!-- Copy the Log4J configuration in the test classpath -->
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
@@ -55,7 +56,8 @@
</includes>
</testResource>
</testResources>
- <finalName>jaxws-codefirst</finalName>
+ <!-- The name of the WAR deployment -->
+ <finalName>$artifactId</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@@ -66,6 +68,7 @@
<encoding>UTF-8</encoding>
</configuration>
</plugin>
+ <!-- The plugin for WildFly deploy / undeploy -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
@@ -78,7 +81,47 @@
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
+ <!-- JBossWS JAXWS tools plugins -->
<plugin>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <version>1.1.1.Final</version>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ <executions>
+ <execution>
+ <!-- Run wsprovide to create the wsdl for the endpoint to be used later -->
+ <!-- This also create the request/response wrapper classes that are also included in the deployement (actually optional w/ JBossWS) -->
+ <id>wsprovide execution</id>
+ <goals>
+ <goal>wsprovide</goal>
+ </goals>
+ <configuration>
+ <endpointClass>${package}.HelloWorldImpl</endpointClass>
+ <generateWsdl>true</generateWsdl>
+ </configuration>
+ </execution>
+ <execution>
+ <!-- Run wsconsume in generate-test-sources phase to generate the portable artifacts for creating a test client -->
+ <id>wsconsume execution</id>
+ <goals>
+ <goal>wsconsume-test</goal>
+ </goals>
+ <configuration>
+ <fork>true</fork> <!-- Fork mode to specify the log conf sys prop below -->
+ <argLine>-Dlog4j.output.dir=\${project.build.directory}</argLine>
+ <wsdls>
+ <wsdl>\${project.build.directory}/wsprovide/resources/HelloWorldService.wsdl</wsdl>
+ </wsdls>
+ <targetPackage>client</targetPackage>
+ <outputDirectory>\${project.build.directory}/wsconsume</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Surefire (tests) plugin -->
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
@@ -92,6 +135,7 @@
</systemProperties>
</configuration>
<executions>
+ <!-- The integration tests execution, for tests against a running container with the deployment available -->
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
@@ -106,6 +150,7 @@
</includes>
</configuration>
</execution>
+ <!-- The unit tests execution -->
<execution>
<id>tests</id>
<phase>test</phase>
@@ -128,4 +173,50 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <!-- A profile for avoid meaningless Eclipse warnings / errors (see https://issues.jboss.org/browse/JBWS-3666) -->
+ <profile>
+ <id>eclipse-m2e</id>
+ <activation>
+ <property>
+ <name>!eclipse-m2e</name>
+ </property>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.jboss.ws.plugins</groupId>
+ <artifactId>maven-jaxws-tools-plugin</artifactId>
+ <versionRange>[1.1.1.Final,)</versionRange>
+ <goals>
+ <goal>wsconsume</goal>
+ <goal>wsconsume-test</goal>
+ <goal>wsprovide</goal>
+ <goal>wsprovide-test</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
</project>
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorld.java
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2014-02-07 10:55:20 UTC (rev 18313)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorld.java 2014-02-07 15:18:46 UTC (rev 18314)
@@ -5,5 +5,6 @@
@WebService(targetNamespace = "http://hello.world.ns/")
public interface HelloWorld {
String sayHi(String text);
+ String greetings(Person person);
}
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java 2014-02-07 10:55:20 UTC (rev 18313)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/HelloWorldImpl.java 2014-02-07 15:18:46 UTC (rev 18314)
@@ -1,16 +1,26 @@
package ${package};
import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+import javax.jws.soap.SOAPBinding.Style;
+import javax.jws.soap.SOAPBinding.Use;
@WebService(endpointInterface = "${package}.HelloWorld",
targetNamespace = "http://hello.world.ns/",
name = "HelloWorld",
serviceName = "HelloWorldService",
portName = "HelloWorldPort")
+@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL)
public class HelloWorldImpl implements HelloWorld {
public String sayHi(String text) {
+ System.out.println(text);
return "Hello " + text;
}
+
+ public String greetings(Person person) {
+ System.out.println(person);
+ return "Greetings " + person.getName() + " " + person.getSurname();
+ }
}
Added: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/Person.java
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/Person.java (rev 0)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/Person.java 2014-02-07 15:18:46 UTC (rev 18314)
@@ -0,0 +1,23 @@
+package ${package};
+
+public class Person {
+ private String name;
+ private String surname;
+
+ public Person() {
+
+ }
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getSurname() {
+ return surname;
+ }
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+}
\ No newline at end of file
Property changes on: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/main/java/Person.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/test/java/HelloWorldIntegrationTest.java
===================================================================
--- projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/test/java/HelloWorldIntegrationTest.java 2014-02-07 10:55:20 UTC (rev 18313)
+++ projects/plugins/maven/archetypes/jaxws-codefirst/trunk/src/main/resources/archetype-resources/src/test/java/HelloWorldIntegrationTest.java 2014-02-07 15:18:46 UTC (rev 18314)
@@ -2,19 +2,23 @@
import java.net.URL;
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
import org.junit.Assert;
import org.junit.Test;
-import static org.junit.Assert.assertEquals;
+import client.HelloWorld;
+import client.HelloWorldService;
+import client.Person;
+
public class HelloWorldIntegrationTest {
@Test
- public void testSayHi() throws Exception {
- Service service = Service.create(new URL("http://localhost:8080/jaxws-codefirst/HelloWorldService?wsdl"), new QName("http://hello.world.ns/", "HelloWorldService"));
- HelloWorld port = service.getPort(new QName("http://hello.world.ns/", "HelloWorldPort"), HelloWorld.class);
+ public void testHelloWorld() throws Exception {
+ HelloWorldService service = new HelloWorldService(new URL("http://localhost:8080/\${artifactId}/HelloWorldService?wsdl"));
+ HelloWorld port = service.getHelloWorldPort();
Assert.assertEquals("Hello John", port.sayHi("John"));
+ Person p = new Person();
+ p.setName("Anne");
+ p.setSurname("Li");
+ Assert.assertEquals("Greetings Anne Li", port.greetings(p));
}
}
11 years, 2 months