File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using Xfire to transfer a file" Watch "Using Xfire to transfer a file" New topic
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using Xfire to transfer a file
 
Similar Threads
XFireFault: Could not find appropriate operation for request
A problem apear on weblogic 10.3,but tomcat is worked
Error deploying WAR with XFire in WAS 6.1
Error while calling the webservice using XFire
Error on Websphere 6.1 while deploying WAR with XFire