wood burning stoves 2.0*
The moose likes Web Services and the fly likes Using Xfire to transfer a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using Xfire to transfer a file" Watch "Using Xfire to transfer a file" New topic

Using Xfire to transfer a file

ying lam
Ranch Hand

Joined: May 17, 2004
Posts: 85

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:
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) {
return null;

My client code:
DataSource source = service.getLog();

I set breakpoint at the client, it fails when it is calling that method.


I get this exception:

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
org.codehaus.xfire.fault.XFireFault: Could not find the attachment
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)
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Using Xfire to transfer a file