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 import com.meterware.httpunit.WebResponse; 34 35 40 public class F_WsEarSample extends A_WebServicesEndpoint { 41 42 45 private static final String URL_WSEARSAMPLE = "/axis-ws/"; 46 47 51 public static void main(String [] args) { 52 53 String testtorun = null; 54 for (int argn = 0; argn < args.length; argn++) { 56 String sArg = args[argn]; 57 if (sArg.equals("-n")) { 58 testtorun = args[++argn]; 59 } 60 } 61 62 if (testtorun == null) { 63 junit.textui.TestRunner.run(suite()); 64 } else { 65 junit.textui.TestRunner.run(new F_WsEarSample(testtorun)); 66 } 67 } 68 69 73 public static TestSuite suite() { 74 return new TestSuite(F_WsEarSample.class); 75 } 76 77 82 protected void setUp() throws Exception { 83 super.setUp(); 84 useEar("ws"); 85 } 86 87 91 public F_WsEarSample(String s) { 92 super(s, URL_WSEARSAMPLE); 93 } 94 95 99 public void testDeploymentCompleted() throws Exception { 100 101 WebResponse wr = wc.getResponse(url + "ssbEndpoint"); 102 assertNotNull("no homepage", wr); 103 } 104 105 109 public void testAxisWSDL() throws Exception { 110 111 checkAxisWSDL("ssbEndpoint/WSBeanEndpointLocal?JWSDL"); 113 } 114 115 119 public void testWSDLPublication() throws Exception { 120 121 checkWSDLPublication("My Web Services" + File.separator + "ssbEndpoint.wsdl", 122 "http://ws.beans.wssample.objectweb.org", 123 "WSBeanEndpointLocalService", 124 "WSBeanEndpointLocal", 125 url + "ssbEndpoint/WSBeanEndpointLocal"); 126 } 127 128 129 } 130 | Popular Tags |