當前位置: 首頁>>代碼示例>>Java>>正文


Java Endpoint.stop方法代碼示例

本文整理匯總了Java中javax.xml.ws.Endpoint.stop方法的典型用法代碼示例。如果您正苦於以下問題:Java Endpoint.stop方法的具體用法?Java Endpoint.stop怎麽用?Java Endpoint.stop使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.xml.ws.Endpoint的用法示例。


在下文中一共展示了Endpoint.stop方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: dispose

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Override
public void dispose ()
{
    super.dispose ();

    List<Endpoint> endpoints;
    synchronized ( this )
    {
        endpoints = new ArrayList<Endpoint> ( this.endpoints.values () );
        this.endpoints.clear ();
    }

    for ( final Endpoint e : endpoints )
    {
        e.stop ();
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:18,代碼來源:EndpointExporter.java

示例2: unexportService

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Override
protected void unexportService ( final ServiceReference<?> serviceReference )
{
    final Endpoint e;
    synchronized ( this )
    {
        e = this.endpoints.remove ( serviceReference );
    }

    if ( e != null )
    {
        if ( e.isPublished () )
        {
            try
            {
                e.stop ();
            }
            catch ( final Exception ex )
            {
                logger.warn ( "Failed to stop export", ex );
            }
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:25,代碼來源:EndpointExporter.java

示例3: testMultiplePublishSameAddress

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
public void testMultiplePublishSameAddress() throws Exception
{
   server.start();
   String contextPath = "/ctxt";
   String path = "/echo";
   for (int i = 0; i < 3; i++)
   {
      HttpContext ctx = UndertowContextFactory.createHttpContext(server, contextPath, path);
      String address = "http://localhost:" + currentPort + contextPath + path;

      Endpoint endpoint = Endpoint.create(new EndpointBean());
      endpoint.publish(ctx); // Use httpserver context for publishing

      invokeEndpoint(address);

      endpoint.stop();
   }
}
 
開發者ID:jbossws,項目名稱:jaxws-undertow-httpspi,代碼行數:20,代碼來源:EndpointAPITest.java

示例4: test

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void test() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port + "/jaxws-endpoint1";
   Endpoint endpoint1 = publishEndpoint(new EndpointBean(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port + "/jaxws-endpoint2";
   Endpoint endpoint2 = publishEndpoint(new EndpointBean(), publishURL2);

   invokeEndpoint(publishURL1);
   invokeEndpoint(publishURL2);

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:17,代碼來源:EndpointTestCase.java

示例5: echo

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
public String echo(String input, String serverHost, int port)
{
   Endpoint ep = Endpoint.create(new EndpointBean());
   String publishUrl = "http://" + serverHost + ":" + port + "/foo/bar";
   ep.publish(publishUrl);

   try
   {
      QName qname = new QName("http://org.jboss.ws/jaxws/endpoint", "EndpointService");
      Service service = Service.create(new URL(publishUrl + "?wsdl"), qname);
      EndpointInterface proxy = (EndpointInterface) service.getPort(EndpointInterface.class);
      return proxy.echo(input);
   }
   catch (Exception e)
   {
      throw new WebServiceException(e);
   }
   finally
   {
      if (ep != null)
      {
         ep.stop();
      }
   }
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:26,代碼來源:WSClientEndpointBean.java

示例6: testDifferentPortsSameContext

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void testDifferentPortsSameContext() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/";
   Endpoint endpoint1 = publishEndpoint1(new Endpoint1Impl(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint";
   Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);

   invokeEndpoint1(publishURL1);
   invokeEndpoint1(publishURL2);

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:17,代碼來源:UsecasesTestCase.java

示例7: testDifferentPortsNoContext

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void testDifferentPortsNoContext() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/";
   Endpoint endpoint1 = publishEndpoint1(new Endpoint1Impl(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port2;
   Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);

   invokeEndpoint1(publishURL1);
   if (isIntegrationCXF())
   {
      //sun.net.www.protocol.http.HttpURLConnection barfs on addresses like http://localhost:8872?wsdl
      invokeEndpoint1(publishURL2.replace(String.valueOf(port2), port2 + "/"));
   }
   else
   {
      invokeEndpoint1(publishURL2);
   }

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:25,代碼來源:UsecasesTestCase.java

示例8: testDifferentPortsAndLongPaths

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void testDifferentPortsAndLongPaths() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/long/path/";
   Endpoint endpoint1 = publishEndpoint3(new Endpoint1Impl(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/long/path";
   Endpoint endpoint2 = publishEndpoint1(new Endpoint1Impl(), publishURL2);

   invokeEndpoint1(publishURL1);
   invokeEndpoint1(publishURL2);

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:17,代碼來源:UsecasesTestCase.java

示例9: testSamePortsAndAlmostIdenticalLongPaths

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void testSamePortsAndAlmostIdenticalLongPaths() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1/";
   Endpoint endpoint1 = publishEndpoint2(new Endpoint1Impl(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number11";
   Endpoint endpoint2 = publishEndpoint3(new Endpoint1Impl(), publishURL2);

   invokeEndpoint2(publishURL1);
   invokeEndpoint2(publishURL2);

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:17,代碼來源:UsecasesTestCase.java

示例10: testDifferentPortsAndIdenticalPaths

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Test
@RunAsClient
public void testDifferentPortsAndIdenticalPaths() throws Exception
{
   String publishURL1 = "http://" + getServerHost() + ":" + port1 + "/jaxws-endpoint/endpoint/number1/";
   Endpoint endpoint1 = publishEndpoint1(new Endpoint1Impl(), publishURL1);

   String publishURL2 = "http://" + getServerHost() + ":" + port2 + "/jaxws-endpoint/endpoint/number1";
   Endpoint endpoint2 = publishEndpoint2(new Endpoint1Impl(), publishURL2);

   invokeEndpoint2(publishURL1);
   invokeEndpoint2(publishURL2);

   endpoint1.stop();
   endpoint2.stop();
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:17,代碼來源:UsecasesTestCase.java

示例11: testMetadata

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
public void testMetadata() throws Exception {
    SampleEndpoint sample = new SampleEndpoint();
    
    Endpoint ep = Endpoint.create(sample);
    assertTrue("The returned Endpoint instance was null", ep != null);
    
    ep.publish("test");
    assertTrue("The endpoint was not published successfully", ep.isPublished());
    
    String wsdlLocation = "http://test.wsdl.com/Test.wsdl"; // Dummy URL
    List<Source> metadata = new ArrayList<Source>();
    Source source = new StreamSource(new ByteArrayInputStream(new byte[0])); // Dummy content  
    source.setSystemId(wsdlLocation);  
    metadata.add(source);
    ep.setMetadata(metadata);
    
    metadata = ep.getMetadata();
    assertNotNull(metadata);
    source = metadata.get(0);
    assertNotNull(source);
    assertEquals(source.getSystemId(), wsdlLocation);
    
    ep.stop();
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:25,代碼來源:BasicEndpointTests.java

示例12: main

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
public static void main(String[] args) throws IOException {
    final Endpoint endpoint = createEndpoint(WS_ADDRESS);
    try {
        final Service service = createWebService();
        final DataAccess serviceDataAccess = service.getPort(DataAccess.class);

        final byte[] data = serviceDataAccess.getQuicklookData(QL_URI_RGB1);
        final BufferedImage image = ImageIO.read(new ByteArrayInputStream(data));

        final JFrame frame = new JFrame();
        frame.add(new JLabel(new ImageIcon(image)));
        frame.pack();
        frame.setVisible(true);
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    } finally {
        endpoint.stop();
    }
}
 
開發者ID:bcdev,項目名稱:esa-pfa,代碼行數:19,代碼來源:DataAccessImplTest.java

示例13: doGet

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
@Override
 protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

     final String param = req.getParameter("abc");
         try{
       String publishURL1 = "http://localhost:" + port + "/jaxws-endpoint1";
       Endpoint endpoint1 = publishEndpoint(new EndpointBean(), publishURL1);

       String publishURL2 = "http://localhost:" + port + "/jaxws-endpoint2";
       Endpoint endpoint2 = publishEndpoint(new EndpointBean(), publishURL2);

       invokeEndpoint(publishURL1, param);
       invokeEndpoint(publishURL2, param);

       endpoint1.stop();
       endpoint2.stop();
     } catch (Exception e){fail("Exception raised: "+ e.getMessage());}
}
 
開發者ID:malaverdiere,項目名稱:securibench-jaxws,代碼行數:19,代碼來源:EndpointTestCase.java

示例14: destroy

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
/**
 * Stops all published endpoints, taking the web services offline.
 */
@Override
public void destroy() {
	for (Endpoint endpoint : this.publishedEndpoints) {
		endpoint.stop();
	}
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:10,代碼來源:AbstractJaxWsServiceExporter.java

示例15: stop

import javax.xml.ws.Endpoint; //導入方法依賴的package包/類
private static void stop(Endpoint endPoint) {
    if (endPoint == null) return;

    try {
        endPoint.stop();
    } catch (Throwable ignored) {
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:9,代碼來源:WSTest.java


注:本文中的javax.xml.ws.Endpoint.stop方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。