今天找了个SOAP "hello world "例子调试
xml 如下:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:HelloWorldService">
<isd:provider type="java" scope="Application" methods="getMessage">
<isd:java class="HelloWorldService" />
</isd:provider>
</isd:service>
把HelloWorldService 放在%tomcat_home%/commen/classes 下
最后运行Client 报错:
The Following Error Occured:
Fault Code = SOAP-ENV:Server
Fault String = Exception while handling service request: HelloWorldService.getMessage([none]) not found.请问是为什么啊? 各位大虾都是怎么部署这些文件的?
xml 如下:
<?xml version="1.0"?>
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment"
id="urn:HelloWorldService">
<isd:provider type="java" scope="Application" methods="getMessage">
<isd:java class="HelloWorldService" />
</isd:provider>
</isd:service>
把HelloWorldService 放在%tomcat_home%/commen/classes 下
最后运行Client 报错:
The Following Error Occured:
Fault Code = SOAP-ENV:Server
Fault String = Exception while handling service request: HelloWorldService.getMessage([none]) not found.请问是为什么啊? 各位大虾都是怎么部署这些文件的?
这个需要一个参数,你调用的时候没有传参数过去
我的HelloWorldService.getMessage 是不需要参数的,
这样的方法也需要在Client程序里添加parames 么?,如果是,请问您是怎么写的?
服务我确定有了,没有服务会报一个找不到服务的错
还有什么可能的么?
%TOMCAT_HOME%\common\lib\soap.jar
%TOMCAT_HOME%\common\lib\mail.jar
%TOMCAT_HOME%\common\lib\xml-apis.jar
%TOMCAT_HOME%\common\lib\activation.jar
%TOMCAT_HOME%\common\lib\xercesImpl.jar我确实少包,起初是按照异常补上的,soap.jar mail.jar \activation.jar 只加了这三个
你的包全么,帮忙发一分好不好
我的EMAIL: [email protected]
看三楼至于是否缺少什么包,我一向都是,我手里有什么,统统复制过去。正式发布前,再考虑是否删除无用的包。 其实那些包一共也就几十M, 没必要管他
这个错误真正的原因是HelloWorldService类中的getMessage方法没有定义为public类型,不定义,默认的是友好类型,是不可以被外部访问到了。