我用的是xfire1.2.5, 写了一个非常简单的方法:接口:
public interface Ws_Test{
public String test();
}
实现:
public class Ws_TestImpl implements Ws_Test{
public String test(){
return "This is a test!";
}
}使用xfire的配置:<service>
<name>WsTest</name>
<serviceClass>com.Ws_Test</serviceClass>
<implementationClass>com.Ws_TestImpl</implementationClass>
<style>document</style>
<use>literal</use>
</service>
发布服务正常,通过axis自动生成的客户端调用这个服务,报以下错误:[org.codehaus.xfire.handler.DefaultFaultHandler] Fault occurred!
org.codehaus.xfire.fault.XFireFault: Parameter test does not exist!
at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:201)
at org.codehaus.xfire.service.binding.DocumentBinding.readMessage(DocumentBinding.java:35)
at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
但是我使用soapUI等工具直接调用这个服务,可以正常调用。有谁遇到过类似问题,还请指教,谢谢!
public interface Ws_Test{
public String test();
}
实现:
public class Ws_TestImpl implements Ws_Test{
public String test(){
return "This is a test!";
}
}使用xfire的配置:<service>
<name>WsTest</name>
<serviceClass>com.Ws_Test</serviceClass>
<implementationClass>com.Ws_TestImpl</implementationClass>
<style>document</style>
<use>literal</use>
</service>
发布服务正常,通过axis自动生成的客户端调用这个服务,报以下错误:[org.codehaus.xfire.handler.DefaultFaultHandler] Fault occurred!
org.codehaus.xfire.fault.XFireFault: Parameter test does not exist!
at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:201)
at org.codehaus.xfire.service.binding.DocumentBinding.readMessage(DocumentBinding.java:35)
at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
但是我使用soapUI等工具直接调用这个服务,可以正常调用。有谁遇到过类似问题,还请指教,谢谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货