当前位置: 首页>>代码示例>>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;未经允许,请勿转载。