|
1 |
| package photospace.service; |
|
2 |
| |
|
3 |
| import javax.servlet.http.*; |
|
4 |
| import org.apache.commons.httpclient.*; |
|
5 |
| import org.apache.commons.httpclient.methods.*; |
|
6 |
| import org.apache.commons.logging.*; |
|
7 |
| import junit.framework.*; |
|
8 |
| |
|
9 |
| public class AxisTest |
|
10 |
| extends TestCase |
|
11 |
| { |
|
12 |
| private static final Log log = LogFactory.getLog(AxisTest.class); |
|
13 |
| |
|
14 |
| String baseUrl = "http://localhost:8080/photospace/services/"; |
|
15 |
| |
|
16 |
0
| public void testEndpoints() throws Exception
|
|
17 |
| { |
|
18 |
0
| String[] services = { "Photospace" };
|
|
19 |
0
| HttpClient client = new HttpClient();
|
|
20 |
0
| for (int i = 0; i < services.length; i++)
|
|
21 |
| { |
|
22 |
0
| GetMethod get = new GetMethod(baseUrl + services[i] + "?wsdl");
|
|
23 |
0
| client.executeMethod(get);
|
|
24 |
0
| assertEquals(get.getURI() + " failed: " + get.getStatusText(), HttpServletResponse.SC_OK, get.getStatusCode());
|
|
25 |
| } |
|
26 |
| } |
|
27 |
| |
|
28 |
| } |