Skip to content

Commit 16a7382

Browse files
committed
Created actual test archive in test for JAX-RPC
1 parent 32f8b54 commit 16a7382

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

  • jaxrpc/jaxrpc-endpoint/src/test/java/org/javaee7/jaxrpc/endpoint
Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package org.javaee7.jaxrpc.endpoint;
22

3+
import static org.jboss.shrinkwrap.api.ShrinkWrap.create;
4+
5+
import java.io.File;
6+
37
//import static org.junit.Assert.assertEquals;
48

59
import java.net.MalformedURLException;
@@ -8,7 +12,6 @@
812
import org.jboss.arquillian.container.test.api.Deployment;
913
import org.jboss.arquillian.junit.Arquillian;
1014
import org.jboss.arquillian.test.api.ArquillianResource;
11-
import org.jboss.shrinkwrap.api.ShrinkWrap;
1215
import org.jboss.shrinkwrap.api.spec.WebArchive;
1316
import org.junit.Before;
1417
import org.junit.Test;
@@ -17,13 +20,27 @@
1720
@RunWith(Arquillian.class)
1821
public class HelloTest {
1922

23+
private static final String WEBAPP_SRC = "src/main/webapp";
24+
2025
@ArquillianResource
2126
private URL url;
22-
27+
2328
@Deployment(testable = false)
2429
public static WebArchive createDeployment() {
25-
return ShrinkWrap.create(WebArchive.class).
26-
addPackage("org.javaee7.jaxrpc.endpoint");
30+
System.out.println("************************************************************");
31+
32+
WebArchive war =
33+
create(WebArchive.class)
34+
.addClasses(HelloService.class, HelloServiceImpl.class)
35+
.addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "mapping.xml"))
36+
.addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "web.xml"))
37+
.addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "webservices.xml"))
38+
.addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF/wsdl", "MyHelloService.wsdl"), "wsdl/MyHelloService.wsdl");
39+
40+
System.out.println(war.toString(true));
41+
System.out.println("************************************************************");
42+
43+
return war;
2744
}
2845

2946
@Before
@@ -34,5 +51,5 @@ public void setupClass() throws MalformedURLException {
3451
public void testHello() throws MalformedURLException {
3552
}
3653

37-
54+
3855
}

0 commit comments

Comments
 (0)