Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions TXFramework/wsat-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.jboss.narayana.quickstart.txframework.wsat-simple</groupId>
<artifactId>wsat-simple-all</artifactId>
<version>5.0.0.M2-SNAPSHOT</version>
<packaging>war</packaging>
<packaging>jar</packaging>
<name>JBoss Narayana Quickstarts: Simple WS-AT Web service using the TXFramework</name>
<description>JBoss Narayana Quickstarts: Simple WS-AT Web service using the TXFramework</description>

Expand Down Expand Up @@ -140,38 +140,20 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<!-- Set the name of the war, used as the context root when the app is
deployed -->
<finalName>wsat-simple</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifestEntries>
<Dependencies>org.jboss.xts</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- JBoss AS plugin to deploy war -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${jboss-as.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- Compiler plugin enforces Java 1.6 compatibility and activates
annotation processors -->
<plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import org.jboss.narayana.txframework.api.annotation.transaction.Transactional;
import org.jboss.narayana.txframework.api.configuration.BridgeType;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
Expand All @@ -51,7 +53,8 @@
@Transactional(bridgeType = BridgeType.NONE)
@WebService(serviceName = "RestaurantServiceATService", portName = "RestaurantServiceAT", name = "RestaurantServiceAT", targetNamespace = "http://www.jboss.org/narayana/quickstarts/wsat/simple/Restaurant")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebServlet("/RestaurantServiceAT")
@Remote(RestaurantServiceAT.class)
@Stateless
public class RestaurantServiceATImpl implements RestaurantServiceAT {

private MockRestaurantManager mockRestaurantManager = MockRestaurantManager.getSingletonInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class Client implements RestaurantServiceAT {
* @throws MalformedURLException if the WSDL url is malformed.
*/
public Client() throws MalformedURLException {
URL wsdlLocation = new URL("http://localhost:8080/wsat-simple/RestaurantServiceAT?wsdl");
URL wsdlLocation = new URL("http://localhost:8080/test/RestaurantServiceATService/RestaurantServiceAT?wsdl");
QName serviceName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/Restaurant",
"RestaurantServiceATService");
QName portName = new QName("http://www.jboss.org/narayana/quickstarts/wsat/simple/Restaurant", "RestaurantServiceAT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
import org.jboss.narayana.quickstarts.wsat.simple.jaxws.RestaurantServiceAT;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -39,12 +40,12 @@ public class ClientTest {
* @return a WebArchive representing the required deployment
*/
@Deployment
public static WebArchive createTestArchive() {
public static JavaArchive createTestArchive() {

return ShrinkWrap.create(WebArchive.class, "wsat-simple.war")
return ShrinkWrap.create(JavaArchive.class, "wsat-simple.jar")
.addPackages(true, RestaurantServiceATImpl.class.getPackage())
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
.setManifest(new StringAsset(ManifestMF));
.addAsManifestResource(new ByteArrayAsset("<interceptors><class>org.jboss.narayana.txframework.impl.ServiceRequestInterceptor</class></interceptors>".getBytes()), ArchivePaths.create("beans.xml"))
.setManifest(new StringAsset(ManifestMF));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion TXFramework/wsat-simple/src/test/resources/arquillian.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<!-- Uncomment to have test archives exported to the file system for inspection -->
<engine>
<property name="deploymentExportPath">target/</property>
<property name="deploymentExportPath">target/arquillian</property>
</engine>

<!-- Force the use of the Servlet 3.0 protocol with all containers, as it is the most mature -->
Expand Down
30 changes: 7 additions & 23 deletions TXFramework/wsba-participant-completion-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>org.jboss.narayana.quickstart.txframework.wsba-participant-completion-simple</groupId>
<artifactId>wsba-participant-completion-simple-all</artifactId>
<version>5.0.0.M2-SNAPSHOT</version>
<packaging>war</packaging>
<packaging>jar</packaging>
<name>JBoss Narayana Quickstarts: Simple WS-BA with participant completion Web service using the TXFramework</name>
<description>JBoss Narayana Quickstarts: Simple WS-BA with participant completion Web service using the TXFramework</description>

Expand Down Expand Up @@ -107,32 +107,16 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifestEntries>
<Dependencies>org.jboss.narayana.txframework</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- JBoss AS deployment disabled, as this is a test-only example! -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${jboss-as.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- Compiler plugin enforces Java 1.6 compatibility and activates
annotation processors -->
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import org.jboss.narayana.txframework.api.configuration.transaction.CompletionType;
import org.jboss.narayana.txframework.api.management.WSBATxControl;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
Expand All @@ -44,7 +46,8 @@
@Compensatable(completionType = CompletionType.PARTICIPANT)
@WebService(serviceName = "OrderServiceBAService", portName = "OrderServiceBA", name = "OrderServiceBA", targetNamespace = "http://www.jboss.org/as/quickstarts/helloworld/wsba/participantcompletion/order")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@WebServlet("/OrderServiceBA")
@Stateless
@Remote(OrderServiceBA.class)
public class OrderServiceBAImpl implements OrderServiceBA {

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Client implements OrderServiceBA {
* @throws MalformedURLException if the WSDL url is malformed.
*/
public Client() throws MalformedURLException {
URL wsdlLocation = new URL("http://localhost:8080/test/OrderServiceBA?wsdl");
URL wsdlLocation = new URL("http://localhost:8080/test/OrderServiceBAService/OrderServiceBA?wsdl");
QName serviceName = new QName("http://www.jboss.org/as/quickstarts/helloworld/wsba/participantcompletion/order",
"OrderServiceBAService");
QName portName = new QName("http://www.jboss.org/as/quickstarts/helloworld/wsba/participantcompletion/order",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import org.jboss.narayana.quickstarts.wsba.participantcompletion.simple.jaxws.OrderServiceBA;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.ByteArrayAsset;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -46,10 +48,10 @@ public class ClientTest {
public OrderServiceBA client;

@Deployment
public static WebArchive createTestArchive() {
return ShrinkWrap.create(WebArchive.class, "test.war")
public static JavaArchive createTestArchive() {
return ShrinkWrap.create(JavaArchive.class, "test.jar")
.addPackages(true, OrderServiceBAImpl.class.getPackage().getName())
.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
.addAsManifestResource(new ByteArrayAsset("<interceptors><class>org.jboss.narayana.txframework.impl.ServiceRequestInterceptor</class></interceptors>".getBytes()), ArchivePaths.create("beans.xml"))
.setManifest(new StringAsset(ManifestMF));
}

Expand Down