コード例 #1
0
ファイル: DTDTest.java プロジェクト: julienfromentc/jaxws
 public void testEntity() throws Exception {
   int port = PortAllocator.getFreePort();
   String address = "http://localhost:" + port + "/entity";
   Endpoint endpoint = Endpoint.create(new MyEndpoint());
   endpoint.publish(address);
   try {
     HTTPResponseInfo rInfo = sendEntity(address);
     String resp = rInfo.getResponseBody();
     if (resp.contains("x1y1")) {
       fail("Entity is getting resolved");
     }
     int code = rInfo.getResponseCode();
     assertEquals(HttpURLConnection.HTTP_INTERNAL_ERROR, code);
   } finally {
     endpoint.stop();
   }
 }