日期:2014-05-17  浏览次数:20868 次

org.codehaus.xfire.XFireRuntimeException: Could not invoke service..
错误:
org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception 

is org.codehaus.xfire.fault.XFireFault: Index: 7, Size: 7
org.codehaus.xfire.fault.XFireFault: Index: 7, Size: 7
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 $Proxy6.UpLoadReport(Unknown Source)
at webService.test.WebServiceTest.main(WebServiceTest.java:78)
\n客户端代码:
  wsdl:可以访问生成xml文件
  Service srModel = new ObjectServiceFactory().create(IsyXfire.class);
XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance().getXFire());
String endPoint = "http://localhost:8080/xfire/services/MathService";
IsyXfire service = (IsyXfire) factory.create(srModel,endPoint);
i = service.UpLoadReport("aaa","aaaa",999,DataStream,"jpg","testUser","remark",errorMsg);
System.out.print("提交返回:" + i);
\n服务器端方法:
  参数说明
  @param token
 * token是用户的令牌,是一个字符串,由用户的身份信息和调用时间等通过加密、解密后组成,暂时不开发,留作备用
 * @param DataIndex
 * 数据关键字,每个报告有唯一的关键字
 * @param iDataIndex
 * xml文件或图片文件的序号,一个报告(DataIndex),可能会包括多份图片,上传xml时
 * @param DataStream
 * 文件流
 * @param fileType
 * xml,jpg,bmp等实际文件扩展名
 * @param userRun
 * 操作人
 * @param otherEXT
 * 备用参数,可选
 * @param errorMsg
 * 操作返回信息提示,如出错的具体原因,或操作过程描述


  @WebService(serviceName = "MathService", name = "MathService", endpointInterface= "com.wizrole.webService.xfire.IsyXfire")
public class SyXfireImpl implements IsyXfire {
public int UpLoadReport(String token, String DataIndex, int iDataIndex,
byte[] DataStream, String fileType, String userRun,
String otherEXT, Holder<String> errorMsg)
 

------解决方案--------------------
http://hi.baidu.com/xcl119xcl/blog/item/68fef49b166411bcc8eaf457.html
------解决方案--------------------
帮顶下。