use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class SchemaLocationsRewriteTestCase method createDeployment.
@Deployment
public static WebArchive createDeployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "schema-location-rewrite.war");
war.addPackage(SimpleService.class.getPackage()).addAsWebInfResource(SchemaLocationsRewriteTestCase.class.getPackage(), "SimpleService.wsdl", "wsdl/SimpleService.wsdl").addAsWebInfResource(SchemaLocationsRewriteTestCase.class.getPackage(), "imported/AnotherService.wsdl", "wsdl/imported/AnotherService.wsdl").addAsWebInfResource(SchemaLocationsRewriteTestCase.class.getPackage(), "imported/SimpleService.xsd", "wsdl/imported/SimpleService.xsd").addAsWebInfResource(SchemaLocationsRewriteTestCase.class.getPackage(), "imported/importedschema.xsd", "wsdl/imported/importedschema.xsd");
war.addClass(SimpleService.class);
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class SimpleWebserviceEndpointTestCase method createDeployment.
@Deployment
public static WebArchive createDeployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "ws-endpoint-example.war");
war.addPackage(SimpleWebserviceEndpointImpl.class.getPackage());
war.addClass(SimpleWebserviceEndpointImpl.class);
war.addAsWebInfResource(SimpleWebserviceEndpointTestCase.class.getPackage(), "web.xml", "web.xml");
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive in project wildfly by wildfly.
the class Usecase2TestCase method createDeployment.
@Deployment
public static WebArchive createDeployment() {
final WebArchive war = ShrinkWrap.create(WebArchive.class, "anonymous-pojo-usecase2.war");
war.addPackage(AnonymousPOJO.class.getPackage());
war.addClass(AnonymousPOJO.class);
return war;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive 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;
}
use of org.jboss.shrinkwrap.api.spec.WebArchive 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;
}
Aggregations