问题描述
用XFire写的WebService,部署到WebLogic,客户端访问抛的异常org.codehaus.xfire.XFireRuntimeException:Couldnotinvokeservice..Nestedexceptionisorg.codehaus.xfire.fault.XFireFault:Index:2,Size:2具体代码如下:ServicesrvcModel=newObjectServiceFactory().create(ISmsService.class);XFireProxyFactoryfactory=newXFireProxyFactory(XFireFactory.newInstance().getXFire());StringserviceURL="http://localhost:7001/sxtservice/services/SmsService";ISmsServicesrvc=(ISmsService)factory.create(srvcModel,serviceURL);String[]temp=srvc.smsSend("hm",newString[]{"053166961082","18653125659","18755324640"},"WebService测试短信内容");System.out.println("发送状态:"+temp[0]+"n原因:"+temp[1]);
解决方案
解决方案二:
这是全部的异常:log4j:WARNNoappenderscouldbefoundforlogger(org.codehaus.xfire.transport.DefaultTransportManager).log4j:WARNPleaseinitializethelog4jsystemproperly.org.codehaus.xfire.XFireRuntimeException:Couldnotinvokeservice..Nestedexceptionisorg.codehaus.xfire.fault.XFireFault:Index:2,Size:2org.codehaus.xfire.fault.XFireFault:Index:2,Size:2atorg.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Lorg.codehaus.xfire.exchange.InMessage;Lorg.codehaus.xfire.MessageContext;)V(Soap11FaultSerializer.java:31)atorg.codehaus.xfire.fault.SoapFaultSerializer.readMessage(Lorg.codehaus.xfire.exchange.InMessage;Lorg.codehaus.xfire.MessageContext;)V(SoapFaultSerializer.java:28)atorg.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(Lorg.codehaus.xfire.MessageContext;Lorg.codehaus.xfire.exchange.InMessage;Ljavax.xml.stream.XMLStreamReader;)V(ReadHeadersHandler.java:111)atorg.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(Lorg.codehaus.xfire.MessageContext;)V(ReadHeadersHandler.java:67)atorg.codehaus.xfire.handler.HandlerPipeline.invoke(Lorg.codehaus.xfire.MessageContext;)V(HandlerPipeline.java:131)atorg.codehaus.xfire.client.Client.onReceive(Lorg.codehaus.xfire.MessageContext;Lorg.codehaus.xfire.exchange.InMessage;)V(Client.java:406)atorg.codehaus.xfire.transport.http.HttpChannel.sendViaClient(Lorg.codehaus.xfire.MessageContext;Lorg.codehaus.xfire.exchange.OutMessage;)V(HttpChannel.java:139)atorg.codehaus.xfire.transport.http.HttpChannel.send(Lorg.codehaus.xfire.MessageContext;Lorg.codehaus.xfire.exchange.OutMessage;)V(HttpChannel.java:48)atorg.codehaus.xfire.handler.OutMessageSender.invoke(Lorg.codehaus.xfire.MessageContext;)V(OutMessageSender.java:26)atorg.codehaus.xfire.handler.HandlerPipeline.invoke(Lorg.codehaus.xfire.MessageContext;)V(HandlerPipeline.java:131)atorg.codehaus.xfire.client.Invocation.invoke(Lorg.codehaus.xfire.service.OperationInfo;Lorg.codehaus.xfire.exchange.OutMessage;)[Ljava.lang.Object;(Invocation.java:79)atorg.codehaus.xfire.client.Invocation.invoke(Lorg.codehaus.xfire.service.OperationInfo;[Ljava.lang.Object;)[Ljava.lang.Object;(Invocation.java:114)atorg.codehaus.xfire.client.Client.invoke(Lorg.codehaus.xfire.service.OperationInfo;[Ljava.lang.Object;)[Ljava.lang.Object;(Client.java:336)atorg.codehaus.xfire.client.XFireProxy.handleRequest(Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(XFireProxy.java:77)atorg.codehaus.xfire.client.XFireProxy.invoke(Ljava.lang.Object;Ljava.lang.reflect.Method;[Ljava.lang.Object;)Ljava.lang.Object;(XFireProxy.java:57)at$Proxy0.smsSend(Ljava.lang.String;[Ljava.lang.String;Ljava.lang.String;)[Ljava.lang.String;(UnknownSource)atcom.sytax.webservice.SmsServiceClient.main([Ljava.lang.String;)V(SmsServiceClient.java:23)
解决方案三:
我是部署到tomcat上的,也出过这种现象。最后还是包的问题,LZ注意检查
解决方案四:
请问2楼是缺少那个包啊,小弟很急!!
解决方案五:
该回复于2010-10-20 10:26:33被版主删除