Skip to main content

How to use attachments with metro?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
dwout
Offline
Joined: 2007-05-03

Hello,
I am trying to figure how to make a WS that returns an attachment in the response, but I can't find any info on how to use attachments with metro in the user guide. (http://metro.java.net/guide/) There is a section on how to enable MTOM, but that doesn't tell me how to actually add attachments...
Can anyone help?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dwuysan
Offline
Joined: 2009-08-27

Have you tried inject @WebServiceContext and add the outbound attachment property? See http://jax-ws.java.net/articles/MessageContext.html