You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "lauri.siltanen" <la...@gmail.com> on 2008/12/19 10:24:06 UTC

Using MTOM to relay attachments

I have a server and two external systems. The server needs to be able to grab
a file (size ~1GB) from external system A and relay it to external system B.
Is it possible to achieve this by the server opening an input stream from A
and an output stream to B without storing the file on the server?
-- 
View this message in context: http://www.nabble.com/Using-MTOM-to-relay-attachments-tp21088174p21088174.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Using MTOM to relay attachments

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

I think use jaxws dispatch-provider mode with StreamSource object you 
may archieve it.
Take a look at [1] &[2]
[1]http://cwiki.apache.org/CXF20DOC/dispatch-clients.html
[2]http://cwiki.apache.org/CXF20DOC/provider-services.html

Freeman

lauri.siltanen wrote:
> I have a server and two external systems. The server needs to be able to grab
> a file (size ~1GB) from external system A and relay it to external system B.
> Is it possible to achieve this by the server opening an input stream from A
> and an output stream to B without storing the file on the server?
>   


Re: Using MTOM to relay attachments

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Actually the provider server doesn't care the counterpart is dispatch 
client or a "normal" client.
What the server face is soap message on the wire, I think you can 
transform it to StreamSource and do your relay.
The client and server mode are decoupled.
Freeman

lauri.siltanen wrote:
> Hi and thanks for the quick reply.
>
> Using the dispatch-provider approach would require modifying each party in
> this transaction. I failed to mention in my initial post that I only have
> control over the server. The server receives a DataHandler object is forced
> to work with it.
>
> Is there another way to achieve the scenario described in my first post?
>
>   


Re: Using MTOM to relay attachments

Posted by "lauri.siltanen" <la...@gmail.com>.
Hi and thanks for the quick reply.

Using the dispatch-provider approach would require modifying each party in
this transaction. I failed to mention in my initial post that I only have
control over the server. The server receives a DataHandler object is forced
to work with it.

Is there another way to achieve the scenario described in my first post?

-- 
View this message in context: http://www.nabble.com/Using-MTOM-to-relay-attachments-tp21088174p21215458.html
Sent from the cxf-user mailing list archive at Nabble.com.