"org.apache.axis2.deployment.DeploymentException: services.xml not found for service "问一下services.xml 这个文件你有么?我也写过简单的Axis2webservice 用eclipse + axis2-eclipse-codegen-wizard.zip+axis2-eclipse-service-archiver-wizard.zip 就是一般的java 方法发布为webserviceaxis1.x 没用过,不清楚
还想问一下,服务端代码的编写都要用 OMElement 对象吗?简单的方法如下可以吗?只是想测试一下功能。
public int getAdd(int a ,int b){
return a+b;
}
还有呢,Axis2写服务器端代码不一定要用AXIOM。可供选择的有:POJO,AXIOM,ADB,XMLBeans,JiBX。直接写Java代码那种,可以通过浏览器来访问Web Service。
像下面这种:
http://localhost:8080/axis2/rest/HelloService/getDate
Web Service名字/方法
http://localhost:8080/axis2/rest/HelloService/hello?param0=Ben
方法的参数名和参数值具体可以参考Axis2的文档。
然后跟class打包一起
就可以了