Xfire发布webservice无配置demo
2011-11-28 23:09
323 查看
步骤:
一、Create an ObjectServiceFactory
二、Register the bean
三、Expose xfire
一、Create an ObjectServiceFactory
二、Register the bean
三、Expose xfire
public void init(ServletConfig config) throws ServletException { System.out.println("init service"); /** •Create an ObjectServiceFactory •Register the bean •Expose xfire * */ //first we create a XFire instance, using the default implementation //you can register your own implementation via XFireFactory.registerFactory() XFire xfire = XFireFactory.newInstance().getXFire(); //the default transport manager handles a number of transport mechanisms, //which is good enough for our needs ServiceFactory factory = new ObjectServiceFactory(xfire.getTransportManager()); //note that we'd like to specify our own service name, so we use the overloaded //create method instead of the simpler one that just takes in a class name Service service = factory.create(serviceimpl.class, "hi", null, null); //if Hello.class is an interface, then we need to specify the implementation class service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, serviceimpl.class); ServiceInfo sinfo = service.getServiceInfo(); sinfo.removeOperation("setTest"); Service ss = sinfo.getService(); controller = new XFireServletController(xfire, config.getServletContext()); controller.getServiceRegistry().register(ss); }
相关文章推荐
- PB-PowerBuilder125开发Webservice的DEMO_从配置IIS到发布接口到调用webservice
- java里使用xfire发布webservice
- 利用myeclipse8.5 将使用spring配置的原工程用JAX-WS发布为webservice
- Axis2发布webservice(1)--0配置发布
- 用xfire快速发布WebService接口
- WebService的发布及调用demo
- Tomcat6 配置HTTPS SSL 发布Axis2 webservice(一)配置【windows中操作,linux中类似此操作】
- CXF配置的方式发布WebService并运行于Tomcat容器
- 使用xfire发布WebService
- xfire发布webservice
- Axis2 WebService(配置、发布、调用)
- 在eclipse中发布webservice遇到的两个问题:1.servers资源没有打开 2.配置文件找不到
- Axis2 WebService(配置、发布、调用)
- .net C# 调用 XFire发布的Webservice 安全访问控制
- 使用spring集成xfire开发webservice接口时的namespace和参数名称等配置
- Axis2 WebService(配置、发布、调用)
- java程序调用xfire发布的webService服务(二)
- WebService的发布流程和配置
- weblogic8.1下配置xfire开发webservice环境
- xfire发布webservice