| Author |
Using Xfire to transfer a file
|
ying lam
Ranch Hand
Joined: May 17, 2004
Posts: 85
|
|
Hi, I am trying to use xfire to transfer a file. I have a WebService client which calls a method call 'getLog' to get a file from the WebService server. My service.xml On my Web Service server, i have printfs statement on my server on before and after return the datasource, it works (I see the printfs at the console). My Server code: [code] public DataSource getLog() { System.out.println (" getLog is getting called"); try { DataSource ds = new FileDataSource ("/hibernate_db.properties" ) ; System.out.println ("done created!"); return ds; } catch (Throwable t) { t.printStackTrace(); } return null; } [\code] My client code: [code] DataSource source = service.getLog(); I set breakpoint at the client, it fails when it is calling that method. [code] I get this exception: [code] Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not find the attachment cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema org.codehaus.xfire.fault.XFireFault: Could not find the attachment cid:116422501819961235202990@http://www.w3.org/2001/XMLSchema at org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readInclude(AbstractXOPType.java:62) at org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readObject(AbstractXOPType.java:45) at org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingProvider.java:154) at org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.java:206) at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:50) 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:382) 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:75) at org.codehaus.xfire.client.Client.invoke(Client.java:335) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) at $Proxy0.getLog(Unknown Source) at org.codehaus.xfire.demo.BookClient.main(BookClient.java:78) [code]
|
 |
 |
|
|
subject: Using Xfire to transfer a file
|
|
|