1 25 26 package org.objectweb.jonas.examples.clients.webservices; 27 28 29 import java.io.File ; 30 31 import junit.framework.TestSuite; 32 33 34 39 public class F_WsWarSample extends A_WebServicesEndpoint { 40 41 44 private static final String URL_WSWARSAMPLE = "/wswarsample/"; 45 46 50 public static void main(String [] args) { 51 52 String testtorun = null; 53 for (int argn = 0; argn < args.length; argn++) { 55 String sArg = args[argn]; 56 if (sArg.equals("-n")) { 57 testtorun = args[++argn]; 58 } 59 } 60 61 if (testtorun == null) { 62 junit.textui.TestRunner.run(suite()); 63 } else { 64 junit.textui.TestRunner.run(new F_WsWarSample(testtorun)); 65 } 66 } 67 68 72 public static TestSuite suite() { 73 return new TestSuite(F_WsWarSample.class); 74 } 75 76 81 protected void setUp() throws Exception { 82 super.setUp(); 83 useWar("wswarsample"); 84 } 85 86 90 public F_WsWarSample(String s) { 91 super(s, URL_WSWARSAMPLE); 92 } 93 94 98 public void testDeploymentCompleted() throws Exception { 99 checkDeploymentCompleted(3+3); 101 } 102 103 107 public void testAxisServicesAccessible() throws Exception { 108 109 checkAxisServicesAccessible(3, "jaxrpcEndpoint1", "JaxRpcEndpoint1"); 111 } 112 113 117 public void testAxisWSDL() throws Exception { 118 119 checkAxisWSDL("jaxrpcEndpoint1/JaxRpcEndpoint1?JWSDL"); 121 } 122 123 127 public void testDeployedWebService() throws Exception { 128 129 checkDeployedWebService("jaxrpcTest.html", 130 url + "jaxrpcEndpoint1/JaxRpcEndpoint1", 131 "JOnAS", 132 "JOnAS JaxRpc WebService Test Page"); 133 } 134 135 139 public void testWSDLPublication() throws Exception { 140 141 checkWSDLPublication("MyWebService" + File.separator + "jaxrpcEndpoint.wsdl", 142 "http://ws.servlets.wssample.objectweb.org", 143 "JaxRpcEndpointInterfaceService", 144 "JaxRpcEndpoint1", 145 url + "jaxrpcEndpoint1/JaxRpcEndpoint1"); 146 147 } 148 149 150 } 151 | Popular Tags |