11package 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
59import java .net .MalformedURLException ;
812import org .jboss .arquillian .container .test .api .Deployment ;
913import org .jboss .arquillian .junit .Arquillian ;
1014import org .jboss .arquillian .test .api .ArquillianResource ;
11- import org .jboss .shrinkwrap .api .ShrinkWrap ;
1215import org .jboss .shrinkwrap .api .spec .WebArchive ;
1316import org .junit .Before ;
1417import org .junit .Test ;
1720@ RunWith (Arquillian .class )
1821public 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