日期:2014-05-20  浏览次数:20834 次

xfire客户端调用服务器端方法(参数和返回值是数组)
各位大侠本人做一个项目用到xfire创建webservice
服务器端方法:public   byte[]   least(byte[]   a);
使用数组从数据库中取值,值赋给数组并且要从客户端得到服务器传来值。
但是到客户端使用   b=service.least1(a);这里a和b都是数组。编译可以通过运行到b=service.least1(a)这里客户端报错:Exception   in   thread   "main "   java.lang.NoClassDefFoundError:   org/apache/commons/httpclient/methods/RequestEntity
请各位大侠帮小弟解决一下,或者提出好的方法解决取值和赋值(因为以后客户端是pb所以使用数组),小弟在这里万分感谢!

------解决方案--------------------
环境设置问题:
java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity
找不到这个类
------解决方案--------------------
我一般都用axis2
------解决方案--------------------
如果服务端与客户都用Spring + XFire就行了,省去中间的环节。

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.