XFire容易配置出现的几个异常信息
2010-02-24 11:19
417 查看
今天做一个Flex调用Web服务的程序创建一个WS,由于一段时间没有使用配置忘记,导致发生一个错误,经过研究发现时配置错误:所以修改配置发现常出现错误!!如下希望可以给各个编程爱好者一个帮助!^_^
发生以下错误的原因:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
Illegal argument invoking 'com.unutrip.remoting.ws.FlexWebService.helloWord(java.lang.String, java.lang.String)': object is not an instance of declaring
class
org.codehaus.xfire.fault.XFireFault: Illegal argument invoking 'com.unutrip.remoting.ws.FlexWebService.helloWord(java.lang.String, java.lang.String)': object
is not an instance of declaring class
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.helloWord(Unknown Source)
at com.unutrip.xfire.ws.XFireWSClient.main(XFireWSClient.java:30)
经过一番分析和检得到是xfire.xml的配置文件错误!!
错误配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>
com.unutrip.remoting.ws.FlexWebService
</serviceClass>
<serviceBean>com.unutrip.remoting.ws.FlexWebServiceImpl</serviceBean>
</service>
</beans>
正确配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
发生以下错误:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
Invalid operation: {http://ws.remoting.unutrip.com}helloWord
org.codehaus.xfire.fault.XFireFault: Invalid operation: {http://ws.remoting.unutrip.com}helloWord
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.helloWord(Unknown Source)
at com.unutrip.xfire.ws.XFireWSClient.main(XFireWSClient.java:30)
错误配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceBean>com.unutrip.remoting.ws.FlexWebService</serviceBean>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
正确配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
发生以下错误的原因:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
Illegal argument invoking 'com.unutrip.remoting.ws.FlexWebService.helloWord(java.lang.String, java.lang.String)': object is not an instance of declaring
class
org.codehaus.xfire.fault.XFireFault: Illegal argument invoking 'com.unutrip.remoting.ws.FlexWebService.helloWord(java.lang.String, java.lang.String)': object
is not an instance of declaring class
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.helloWord(Unknown Source)
at com.unutrip.xfire.ws.XFireWSClient.main(XFireWSClient.java:30)
经过一番分析和检得到是xfire.xml的配置文件错误!!
错误配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>
com.unutrip.remoting.ws.FlexWebService
</serviceClass>
<serviceBean>com.unutrip.remoting.ws.FlexWebServiceImpl</serviceBean>
</service>
</beans>
正确配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
发生以下错误:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
Invalid operation: {http://ws.remoting.unutrip.com}helloWord
org.codehaus.xfire.fault.XFireFault: Invalid operation: {http://ws.remoting.unutrip.com}helloWord
at org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.helloWord(Unknown Source)
at com.unutrip.xfire.ws.XFireWSClient.main(XFireWSClient.java:30)
错误配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceBean>com.unutrip.remoting.ws.FlexWebService</serviceBean>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
正确配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<service>
<name>FlexWebService</name>
<namespace>com.unutrip.remoting.ws</namespace>
<serviceClass>com.unutrip.remoting.ws.FlexWebService</serviceClass>
<implementationClass>com.unutrip.remoting.ws.FlexWebServiceImpl</implementationClass>
</service>
</beans>
相关文章推荐
- 出现错误,提示:各个节在每个配置文件中只能出现一次。有关异常的信息,请参阅帮助主题 <location>。请问
- 报表服务器上出现内部错误。有关详细信息,请参阅错误日志。 (rsInternalError) 获取联机帮助 用户的配置文件是临时配置文件。 (异常来自 HRESULT:0x80090024)
- 如何解决“不允许有匹配 "[xX][mM][lL]" 的处理指令目标。”的异常信息。同时提供几个spring xml配置文件标头!(干货)
- fragment的onResume方法中加载数据配置低的机型容易出现APP异常
- C# B/S程序中出现“异常详细信息: System.Data.SqlClient.SqlException: 用户 'XXX/ASPNET' 登录失败。”的处理方法
- CXF安装和配置时出现Exception in thread "main" java.lang.UnsupportedClassVersionError:异常?
- SpringMVC配置国际化出现的异常
- Tomcat6.0配置JNDI数据源出现的常见异常
- C程序访问hadoop出现的各种编译错误和运行时各种类DefFound异常的解决方法(makefile的书写和环境变量的配置)
- Reporting Service 配置SMTP和设置订阅出现的异常
- 请问能否把程序运行时出现的异常堆栈信息也保存进log4j指定的日志文件中
- 关于微信公众平台修改接口配置信息一直出现配置失败
- eclipse搭建Springmvc工程中容易出现的几个错误
- 在运行配置文件中指定的扩展时出现异常。 System.Web.HttpException: 超过了最大请求长度。
- Maven 在pom.xml中配置Jetty出现'org.eclipse.jetty.server.nio.SelectChannelConnector' cannot be loaded异常
- cascade="all-delete-orphan"时容易出现的一个异常
- Tomcat配置虚拟路径容易出现的问题
- git 配置中几个容易忽视的问题
- 在全新安装的IIS7下搭建网站,访问页面时出现错误信息,配置错误: 不能在此路径中使用此配置节。
- 花了几个小时JDBC连接sql server 2012出现的异常com.microsoft.sqlserver.jdbc.SQLServerException: 通过端口 1433 ...解决了!