use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class AnnotatedDeployTestCase method createDeployment.
@Deployment
public static EnterpriseArchive createDeployment() {
final WebArchive war = createWAR(SampleBeanWebService.class, "ws-annotated-XXX.war");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-annotated-XXX.ear");
ear.addAsManifestResource(AnnotatedDeployTestCase.class.getPackage(), "application.xml", "application.xml");
ear.addAsModule(war);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class NotAnnotatedDeployTestCase method createDeployment.
@Deployment
public static EnterpriseArchive createDeployment() {
final WebArchive war = createWAR(SampleBean.class, "ws-notannotated-XXX.war");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "ws-notannotated-XXX.ear");
ear.addAsManifestResource(NotAnnotatedDeployTestCase.class.getPackage(), "application-notannotated.xml", "application.xml");
ear.addAsModule(war);
return ear;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class BothPojoAndEjbInWarTestCase method createDeployment.
@Deployment
public static WebArchive createDeployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "as1605-usecase1.war");
war.addClass(EndpointIface.class);
war.addClass(POJOEndpoint.class);
war.addClass(EJB3Endpoint.class);
war.addAsWebInfResource(new StringAsset("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<web-app version=\"3.0\"\n" + " xmlns=\"http://java.sun.com/xml/ns/javaee\"\n" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" + " xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\"\n" + " metadata-complete=\"false\">\n" + " <servlet>\n" + " <servlet-name>POJOService</servlet-name>\n" + " <servlet-class>org.jboss.as.test.integration.ws.context.as1605.POJOEndpoint</servlet-class>\n" + " </servlet>\n" + " <servlet-mapping>\n" + " <servlet-name>POJOService</servlet-name>\n" + " <url-pattern>/POJOEndpoint</url-pattern>\n" + " </servlet-mapping>\n" + "</web-app>\n"), "web.xml");
war.addAsWebInfResource(new StringAsset("<?xml version='1.0' encoding='UTF-8'?>\n" + "<!DOCTYPE jboss-web PUBLIC \"-//JBoss//DTD Web Application 2.4//EN\" \"http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd\">\n" + "<jboss-web>\n" + "<context-root>/as1605-customized</context-root>\n" + "</jboss-web>\n"), "jboss-web.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class DeploymentHelper method getWebArchiveWithPermissions.
public WebArchive getWebArchiveWithPermissions(final String archiveName) {
final String javaHome = TestSuiteEnvironment.getSystemProperty("java.home");
final String serverHostPort = TestSuiteEnvironment.getServerAddress() + ":" + TestSuiteEnvironment.getHttpPort();
final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, archiveName + ".war").addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml")).addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new ReflectPermission("suppressAccessChecks"), new ReflectPermission("accessDeclaredMembers"), // Permissions for port access
new PropertyPermission("management.address", "read"), new PropertyPermission("node0", "read"), new PropertyPermission("jboss.http.port", "read"), new SocketPermission(serverHostPort, "connect,resolve"), // Permissions for the new client creation
new RuntimePermission("accessDeclaredMembers"), new RuntimePermission("createClassLoader"), new RuntimePermission("getClassLoader"), new RuntimePermission("org.apache.cxf.permission"), new FilePermission(javaHome + File.separator + "lib" + File.separator + "wsdl.properties", "read"), new PropertyPermission("user.dir", "read"), new PropertyPermission("arquillian.debug", "read"), new FilePermission(System.getProperty("basedir") + File.separator + "target" + File.separator + "workdir" + File.separator + "xcatalog", "read")), "permissions.xml");
return webArchive;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class WSTrustTestCase method createBearerSTSDeployment.
@Deployment(name = BEARER_STS_DEP, testable = false)
public static WebArchive createBearerSTSDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, BEARER_STS_DEP + ".war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n" + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client,org.jboss.ws.cxf.sts annotations\n")).addClass(org.jboss.as.test.integration.ws.wsse.trust.stsbearer.STSBearerCallbackHandler.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.stsbearer.SampleSTSBearer.class).addClass(org.jboss.as.test.integration.ws.wsse.trust.shared.WSTrustAppUtils.class).addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/jboss-web.xml", "jboss-web.xml").addAsWebInfResource(createFilteredAsset("WEB-INF/wsdl/bearer-ws-trust-1.4-service.wsdl"), "wsdl/bearer-ws-trust-1.4-service.wsdl").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/stsstore.jks", "classes/stsstore.jks").addAsWebInfResource(WSTrustTestCase.class.getPackage(), "WEB-INF/stsKeystore.properties", "classes/stsKeystore.properties").addAsManifestResource(WSTrustTestCase.class.getPackage(), "META-INF/permissions.xml", "permissions.xml").setWebXML(WSTrustTestCase.class.getPackage(), "WEB-INF/bearer/web.xml");
return archive;
}
Aggregations