}
@Test
public void testRemoteDeployer() throws Exception {
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
Deployer deployer = spiProvider.getSPI(Deployer.class);
assertTrue(deployer instanceof RemoteDeployer);
final String basedir = System.getProperty("basedir");
final String testdir = basedir + File.separatorChar + "target" + File.separatorChar ;
final WebArchive archive = ShrinkWrap.create(WebArchive.class, "jbws3207.war" );
archive.addAsWebInfResource(new StringAsset(WEB_XML), "web.xml");
archive.addPackage(EndpointImpl.class.getPackage());
File archiveFile = new File( testdir, "jbws3207.war");
//remove it if it already exists
archiveFile.delete();
archive.as(ZipExporter.class).exportTo(archiveFile);
URL archiveURL = archiveFile.toURI().toURL();
try {
deployer.deploy(archiveURL);
testWSDL();
testSOAPCall();
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
deployer.undeploy(archiveURL);
}
}