解决方案 »
- Struts2项目书写规则
- 视频教学下载--分享一下
- HashSet问题
- struts+hibernate 开发遇到的问题,高手们救命啊!!!!!在线急等!!!
- dom4j解析xml的怪问题
- WebService 如何进行初始化???
- 想学习一个开源的weblog项目-Roller,安装就遇上了问题,求助。
- 安装配置j2ee的奇怪问题!有谁遇到过同样情形?
- 关于eclipse的一点问题,求教!
- mybatis 报错Result Maps collection does not contain value for java.lang.String
- EJB3.0客户端找不到接口的问题
- Ext在外面企业受不受欢迎呢?你们告诉用到吗?
我在服务器端实现一个API,客户端进行远程调用。
这个一般用什么方式来实现呢
查一下,资料很多的
webservice可以实现我需要的客户端调用服务器端的API的功能么?
十分感谢
能简单描述一下流程,并且给介绍下如何入手么,多谢
我依据两位建议也查了一下,
XML-RPC架构的也可以实现,RMI貌似也可以
两者有什么区别么,如何入手呢,多谢。
两边都是Java,RMI也可以用了。
Java 下若用Web Service,可以看看http://cxf.apache.org/
It's an exciting time to be in open source web services development. Two new next-generation web services frameworks have been released in the last year and a half, both under the umbrella of the Apache Software Foundation. These frameworks are Apache Axis2, which hit 1.0 at the end of April, 2006 and is currently in the release candidate stage for version 1.3, and Apache CXF, which released version 2.0 (the first version released under that name) in early July 2007.Both frameworks also evolved from existing projects. Axis2 came from the well-known Axis 1.x series. CXF is literally the offspring of the XFire and Celtix projects, as those two projects have pooled their codebases and development teams to give rise to CXF. The delta between the old projects and their new versions is significant in each case. Axis2 is a total rewrite of Axis from the ground up, using a new modular architecture that allows its functionality to be more easily extended. CXF has also been extensively retooled from its XFire and Celtix origins.This leads to a few questions. Should existing applications using Axis 1.x, XFire or Celtix move to the new versions of those projects? If a developer does decide to migrate his or her application to one of the new frameworks, which one should they use? Conversely, if one is writing a new web service from the ground up and no migration is required, which one should they use? Is one framework inherently better than the other?Let's tackle these questions in order. Firstly, should existing applications migrate? The answer to that question depends largely on the point in its lifecycle your application has reached. A project which is very static and mature, with few or no changes expected in the foreseeable future, probably doesn't need to migrate as the current framework is serving its needs well enough. If the application's performance or functionality is impacted by bugs, it might be worth migrating, particularly for users of Axis 1.x, as most of the developer community around Axis has refocused its resources around Axis2. An Axis 1.5 release is in the works, but it may not happen for many months down the road.As for which project to migrate to, it might be easiest to move to to the next generation of your current framework. Both Axis2 and CXF provide migration guides that give developers tips on how to migrate from their previous versions, but as of this writing neither project has provided migration tools or guides for porting web services from one framework to another. In such a migration, though, it's always worth looking at all the options available. Axis2 and CXF each take different approaches to web service development, and these approaches will appeal more to some developers than others.This brings us to a good point to compare Axis2 and CXF on their own merits. They are of course in many ways comparable; of necessity web services frameworks must fill in all the same blanks, but since both projects are very young, each has certain areas that are more well-developed than others. The chief differences are as follows:CXF has support for WS-Addressing, WS-Policy, WS-RM, WS-Security, and WS-I BasicProfile. Axis2 supports each of these except for WS-Policy, which will be supported in an upcoming version.
CXF was written with Spring in mind; Axis2 is not.
Axis2 supports a wider range of data bindings, including XMLBeans, JiBX, JaxMe and JaxBRI as well as its own native data binding, ADB. Note that support for JaxME and JaxBRI are still considered experimental in Axis2 1.2. CXF currently supports only JAXB and Aegis; support for XMLBeans, JiBX and Castor will come in CXF 2.1.
Axis2 supports multiple languages--there is a C/C++ version available in addition to the Java version.
In comparing these frameworks, though, it's just as important to look at their approach to developing web services as it is to compare features. From a developer perspective, both frameworks behave very differently from one another. Axis2 has taken an approach that makes it in many ways resemble an application server in miniature. Axis2 comes packaged with a WAR that can be deployed on a servlet container such as Tomcat that is designed to make web services easier to manage and deploy on the fly. The Axis2 Web Administration module allows Axis2 to be configured dynamically while applications are running--new services can be uploaded, activated or deactivated and their parameters may be changed. The administration UI also allows modules to be enabled on one or more running services. The only downside to using the UI for these purposes is the fact that configuration changes made through it are not persistent--they go away when the servlet container is restarted.Axis2 lends itself towards web services that stand alone, independent of other applications, and offers a wide variety of functionality, and a good model for adding more functionality as time goes on through its modular architecture. Some developers may find that a little too cumbersome or heavy-duty for their needs. These developers might prefer to look at Apache CXF.CXF concentrates on developer ergonomics and embeddability. Most configuration is done via the API instead of cumbersome XML files, Spring integration is heavily emphasized, including support for Spring 2.0, and CXF's APIs and Spring configuration mirror one another fairly closely. CXF emphasizes code-first design, using simple APIs to make development of services from existing applications easier (and its embeddability helps too).Whichever framework you choose, you'll have the benefit of an active and stable open source community. Each of these frameworks has corporate backing: Axis2 is backed by WSO2, and CXF by Iona. Both have lively developer communities. Axis2 has been around longer but CXF is catching up quickly. My recommendation is this: If multilanguage support is important, Axis2 is the clear choice. If you care about an implementation focused on Java with tight integration into projects like Spring, CXF is a better choice, particularly for embedding web services inside of other programs. If the new features in these projects are not important, and you're relatively happy with Axis1, you should consider staying on this and keep up with the latest maintenance releases until you have a business reason to migrate.