Search in sources :

Example 71 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class ServiceRefSevletTestCase method clientDeployment.

@Deployment(name = "servletClient", testable = false)
public static WebArchive clientDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, "ws-serviceref-example-servlet-client.war").addClasses(EndpointInterface.class, EndpointService.class, ServletClient.class).addAsWebInfResource(ServiceRefSevletTestCase.class.getPackage(), "web.xml", "web.xml").addAsWebInfResource(ServiceRefSevletTestCase.class.getPackage(), "jboss-web.xml", "jboss-web.xml");
    String wsdl = FileUtils.readFile(ServiceRefSevletTestCase.class, "TestService.wsdl");
    final Properties properties = new Properties();
    properties.putAll(System.getProperties());
    final String node0 = NetworkUtils.formatPossibleIpv6Address((String) properties.get("node0"));
    if (properties.containsKey("node0")) {
        properties.put("node0", node0);
    }
    war.addAsWebInfResource(new StringAsset(PropertiesValueResolver.replaceProperties(wsdl, properties)), "wsdl/TestService.wsdl");
    // all the following permissions are needed because EndpointService directly extends javax.xml.ws.Service class
    // and CXF guys are not willing to add more privileged blocks into their code, thus deployments need to have
    // the following permissions (note that the wsdl.properties permission is needed by wsdl4j)
    war.addAsManifestResource(createPermissionsXmlAsset(new FilePermission(System.getProperty("java.home") + File.separator + "lib" + File.separator + "wsdl.properties", "read"), new PropertyPermission("user.dir", "read"), new RuntimePermission("getClassLoader"), new RuntimePermission("org.apache.cxf.permission", "resolveUri"), new RuntimePermission("createClassLoader"), new RuntimePermission("accessDeclaredMembers"), new SocketPermission(node0 + ":8080", "connect,resolve")), "jboss-permissions.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) SocketPermission(java.net.SocketPermission) Properties(java.util.Properties) FilePermission(java.io.FilePermission) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 72 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class ContextHandlerEndpointTestCase method createDeployment.

@Deployment(testable = false)
public static JavaArchive createDeployment() {
    JavaArchive ejb3Jar = ShrinkWrap.create(JavaArchive.class, "context-handler-endpoint.jar");
    ejb3Jar.addClass(ContextHandler.class);
    ejb3Jar.addClass(ContextHandlerEndpointIface.class);
    ejb3Jar.addClass(ContextHandlerEndpointImpl.class);
    ejb3Jar.addAsResource(ContextHandler.class.getPackage(), "handler.xml", "org/jboss/as/test/integration/ws/ejb/handler.xml");
    return ejb3Jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 73 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment in project wildfly by wildfly.

the class CdiJsfWebServicesTestCase method archive.

@Deployment
public static Archive<?> archive() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, ARCHIVE_NAME + ".war");
    war.addPackage(CdiJsfWebServicesTestCase.class.getPackage());
    war.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    war.add(new StringAsset("<html><body>#{myBean.message}</body></html>"), "index.xhtml");
    war.addAsWebInfResource(new StringAsset(FACES_CONFIG), "faces-config.xml");
    return war;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 74 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment 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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 75 with Deployment

use of org.jboss.arquillian.container.test.api.Deployment 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;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)869 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)530 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)423 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)299 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)146 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)139 ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)48 Asset (org.jboss.shrinkwrap.api.asset.Asset)45 HttpRequest (org.jboss.as.test.integration.common.HttpRequest)28 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)27 PropertyPermission (java.util.PropertyPermission)26 CommonCriteria (org.jboss.as.test.categories.CommonCriteria)23 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)23 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)22 File (java.io.File)17 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)16 SocketPermission (java.net.SocketPermission)13 BatchTestHelper (org.javaee7.util.BatchTestHelper)13 Util (org.jboss.as.test.shared.integration.ejb.security.Util)11 Properties (java.util.Properties)10