⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 servicestartertest.java

📁 Xfire文件 用于开发web service 的一个开源工具 很好用的
💻 JAVA
字号:
package org.codehaus.xfire.example;import junit.framework.TestCase;import org.codehaus.xfire.client.XFireProxyFactory;import org.codehaus.xfire.service.Service;import org.codehaus.xfire.service.binding.ObjectServiceFactory;import org.codehaus.xfire.test.Echo;public class ServiceStarterTest extends TestCase{      public void testService() throws Exception    {        // START SNIPPET: service        ServiceStarter starter = new ServiceStarter();        starter.start();                // Create a service model for the client        ObjectServiceFactory serviceFactory = new ObjectServiceFactory();        Service serviceModel = serviceFactory.create(Echo.class);        // Create a client proxy        XFireProxyFactory proxyFactory = new XFireProxyFactory();        Echo echo = (Echo) proxyFactory.create(serviceModel, "http://localhost:8191/Echo");                System.out.println(echo.echo("Hello World"));                starter.stop();        // END SNIPPET: service    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -