Thanks for the pointer.  I also read the "picture " example in
xfire-aegis to see how POJO works in transferring a file.

I did:

1. add a method in my Service Interface:
public DataSource getFile(String name)

2. enable mtom in my service.xml
  <properties>
   <property key="mtom-enabled">true </property>
   </properties>

3. implement getFile in the imple of my service:
public DataSource getLog()
   {
        try {
// did break here when I set a breakpoint
       return new FileDataSource("/home/yinglcs/deviceCode.txt");
        } catch (Exception e) {
         // no exception thrown
                e.printStackTrace();
        }
        
        return null;
   }

4. In my web service client, I call the getLog like this:
           DataSource source = service.getLog();

           InputStream input = source.getInputStream();

5. But I get this exception, Can you please tell me why it can't find
the attachment id?

xception 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)


On 11/21/06, Tomek Sztelak <[EMAIL PROTECTED]> wrote:
Sure, take a look here : http://xfire.codehaus.org/MTOM

On 11/21/06, ying lcs <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can I use xfire  to transfer file using SOAP?
>
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to