コード例 #1
0
  @Override
  public void destroy() {
    endpoint1.stop();
    endpoint2.stop();

    super.destroy();
  }
コード例 #2
0
 @AfterClass
 public static void teardown() {
   if (endpoint != null) {
     endpoint.stop();
   }
   if (ddlDrop) {
     runDdl(conn, DROP_OPTLOCK_TABLE, ddlDebug);
   }
 }
コード例 #3
0
  public static void main(final String[] args) {

    String url = (args.length > 0) ? args[0] : "http://localhost:4434/buecherservice";
    System.out.println("url: " + url);
    Endpoint ep = Endpoint.publish(url, new BuecherServiceImpl());
    System.out.println("published");
    JOptionPane.showMessageDialog(null, "TestWsServer beenden");
    ep.stop();
  }
コード例 #4
0
 protected void tearDown() throws Exception {
   super.tearDown();
   // Sleep to give endpoint some time to process the non-anonymous request
   // this is needed in case the object is exchanged between client and non-anonymous response
   // endpoint,
   // which leads to test tearDown(), yet the ack to non-anonymous response is not sent back to
   // server yet.
   Thread.sleep(5000);
   if (responseProcessor != null) responseProcessor.stop();
 }
コード例 #5
0
ファイル: OASISCatalogTest.java プロジェクト: CzarnyPeter/cxf
  @Test
  public void testWSDLPublishWithCatalogs() throws Exception {
    Endpoint ep =
        Endpoint.publish("http://localhost:" + PORT + "/SoapContext/SoapPort", new GreeterImpl());

    try {
      String result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=hello_world_schema2.xsd");
      assertTrue(result, result.contains("xsd=hello_world_schema.xsd"));
      assertTrue(result, result.contains("xsd=hello_world_schema3.xsd"));
      assertTrue(result, result.contains("xsd=d/hello_world_schema4.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=hello_world_schema3.xsd");
      assertTrue(result.length() > 0);

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=d/hello_world_schema4.xsd");
      assertTrue(result, result.contains("xsd=d/d/hello_world_schema4.xsd"));

      result =
          readUrl(
              "http://localhost:" + PORT + "/SoapContext/SoapPort" + "?xsd=hello_world_schema.xsd");
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/hello_world_schema2.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort"
                  + "?wsdl=hello_world_messages_catalog.wsdl");
      assertTrue(result, result.contains("xsd=hello_world_schema.xsd"));
    } finally {
      ep.stop();
    }
  }
コード例 #6
0
 @After
 public void done() throws Exception {
   if (mep == NO_RUN) {
     return;
   }
   if (callbackEndpoint != null) {
     callbackEndpoint.stop();
   }
   if (server != null) {
     server.stop();
     server.destroy();
   }
   checkError(true);
 }
コード例 #7
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();
   }
 }
コード例 #8
0
 @After
 public void tearDown() throws Exception {
   if (endpoint != null) {
     endpoint.stop();
   }
 }
コード例 #9
0
 public void tearDown() {
   ep.stop();
   ep = null;
 }
コード例 #10
0
 public void stop() {
   if (endpoint != null) {
     endpoint.stop();
   }
 }
コード例 #11
0
ファイル: OASISCatalogTest.java プロジェクト: CzarnyPeter/cxf
  /**
   * This is test case for https://issues.apache.org/jira/browse/CXF-6234
   *
   * <p>It's using paths that will be rewritten by following catalog rule:
   *
   * <p>&lt;rewriteSystem systemIdStartString="http://apache.org/hello_world/types2/"
   * rewritePrefix="/wsdl/others/"/&gt;
   */
  @Test
  public void testWSDLPublishWithCatalogsRewritePaths() {
    Endpoint ep =
        Endpoint.publish("http://localhost:" + PORT + "/SoapContext/SoapPort", new GreeterImpl());
    try {
      // schemas in the same directory as WSDL

      String result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/types2/hello_world_schema2.xsd");
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/hello_world_schema.xsd"));
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/hello_world_schema3.xsd"));
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/d/hello_world_schema4.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/types2/hello_world_schema.xsd");
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/hello_world_schema2.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/types2/hello_world_schema3.xsd");
      assertTrue(result.length() > 0);

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/types2/d/hello_world_schema4.xsd");
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/types2/d/d/hello_world_schema4.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/types2/d/d/hello_world_schema4.xsd");
      assertFalse(result.contains("schemaLocation"));

      // schemas in separate directory which is not subdirectory of WSDL dir

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "wsdl=http://apache.org/hello_world/types2/hello_world_messages_catalog.wsdl");
      assertTrue(
          result,
          result.contains("xsd=http://apache.org/hello_world/schemas-in-separate-dir/schema.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/schemas-in-separate-dir/schema.xsd");
      assertTrue(
          result,
          result.contains(
              "xsd=http://apache.org/hello_world/schemas-in-separate-dir/d/included.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/schemas-in-separate-dir/d/included.xsd");
      assertTrue(
          result,
          result.contains(
              "xsd=http://apache.org/hello_world/schemas-in-separate-dir/d/d/included.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/schemas-in-separate-dir/d/d/included.xsd");
      assertFalse(result, result.contains("schemaLocation"));

      // rewrite rule that doesn't begin with 'classpath:' but contains only the path

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/schemas-in-separate-dir-non-cp/another-schema.xsd");
      assertTrue(
          result,
          result.contains(
              "xsd=http://apache.org/hello_world/schemas-in-separate-dir-non-cp/d/"
                  + "another-included.xsd"));

      result =
          readUrl(
              "http://localhost:"
                  + PORT
                  + "/SoapContext/SoapPort?"
                  + "xsd=http://apache.org/hello_world/schemas-in-separate-dir-non-cp/d/another-included.xsd");
      assertTrue(
          result,
          result.contains(
              "xsd=http://apache.org/hello_world/schemas-in-separate-dir-non-cp/d/d/"
                  + "another-included.xsd"));
    } finally {
      ep.stop();
    }
  }
コード例 #12
0
 @After
 public void tearDown() {
   endpoint.stop();
 }
コード例 #13
0
 @After
 public void tearDown() throws Exception {
   endpoint.stop();
 }
コード例 #14
0
ファイル: ServerXMLBinding.java プロジェクト: CzarnyPeter/cxf
 public void tearDown() {
   while (!eps.isEmpty()) {
     Endpoint ep = eps.remove(0);
     ep.stop();
   }
 }
コード例 #15
0
ファイル: ActivatorWS.java プロジェクト: gblan/FootWS
 @Override
 public void stop(BundleContext context) throws Exception {
   endpoint.stop();
 }