xfire 生成webservice客户端,调用时的问题
在myeclipse中使用xfire生成webservice客户端,传入参数、返回的结果参数都是类对象,可是在执行的时候却报以下错误:
Invoking handler org.codehaus.xfire.client.ClientReceiveHandler in phase service
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not unmarshall type : com.xxx.xxx.xxx.xxxResponse is not known to this context
org.codehaus.xfire.fault.XFireFault: Could not unmarshall type : com.xxx.xxx.xxx.xxxResponse is not known to this context
at org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java:219)
at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:169)
at org.codehaus.xfire.service.binding.RPCBinding.readMessage(RPCBinding.java:91)
at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
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 $Proxy12.buyBatchProduct(Unknown Source)
at com.xxx.xxx.xxx.impl.CBuyClubHandler.buyProduct(CBuyClubHandler.java:220)
at com.xxx.xxx.xxx.impl.CBuyClubHandler.main(CBuyClubHandler.java:235)
Caused by: javax.xml.bind.JAXBException: com.cnfol.webservice.product.BuyProductResponse is not known to this context
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:510)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getBeanInfo(UnmarshallerImpl.java:502)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:316)
at org.codehaus.xfire.jaxb2.JaxbType.readObject(JaxbType.java:201)
... 17 more
哪位兄弟知道怎么解决这个问题的?谢谢!