大版,调试过apache soap里面的例子吗?
发表于:2007-07-01来源:作者:点击数:
标签:
我在运行addressbook这个简单例子出问题了 我可以加载这个服务: D:\ tomcat \webapps\soap\WEB-INF\classes\samples\addressbook java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy DeploymentDescrip
我在运行addressbook这个简单例子出问题了
我可以加载这个服务:
D:\
tomcat\webapps\soap\WEB-INF\classes\samples\addressbook>
java org.apache.soap.server.ServiceManagerClient
http://localhost:8080/soap/servlet/rpcrouter deploy DeploymentDescriptor.xml
确认服务存在:
D:\tomcat\webapps\soap\WEB-INF\classes\samples\addressbook>java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter list
Deployed Services:
urn:AddressFetcher
但我想调用服务时
比如我想添加一个 "John Doe"
D:\tomcat\webapps\soap\WEB-INF\classes\samples\addressbook>java samples.addressbook.PutAddress http://localhost:8080/soap/servlet/rpcrouter "John Doe" 123 "Main Street" AnyTown SS 12345 800 555 1212
Generated fault:
Fault Code =
SOAP-ENV:Client
Fault String = Deployment error in SOAP service @#urn:AddressFetcher@#: class name @#samples.addressbook.Address@# could not be resolved: samples.addressbook.Address
出现了:
****************************************************
@#samples.addressbook.Address@# could not be resolved:
*****************************************************
实际上我在@#samples.addressbook.Address@# 里面加了一个main()方法并调用toString(),在客户端是可以调用的:
D:\tomcat\webapps\soap\WEB-INF\classes\samples\addressbook>java samples.addressbook.Address
**************I am in main method!******************
toString:-1
, -1
null
*******************************************************
soap的邮件例表说可能是xerces.jar要放到最前面,但我放到最前面也不行:
D:\tomcat\webapps\soap\WEB-INF\classes\samples\addressbook>set classpath
classpath=;d:\tomcat\lib\xerces_1_4_0.jar;d:\tomcat\lib\mail.jar;d:\tomcat\lib\activation.jar;d:\tomcat\lib\xml4j_1_1_16.jar;d:\tomcat\webapps\soap\WEB-INF\classes
还是同样的错误?
有什么解决办法吗?
原文转自:http://www.ltesting.net