-
1. Re: WS-Attachment on jbossws
asoldano Jan 11, 2008 6:59 PM (in response to paoletto)With JBossWS you can use either MTOM or SOAP Attachments (SwA), WS-Attachments (DIME) is not supported.
-
2. Re: WS-Attachment on jbossws
paoletto Jan 12, 2008 7:41 AM (in response to paoletto)thanks for clarification.. i had a look on jbossws 2.0.1 examples now, but there is something i dont yet understand:
actually what i would expect is to have some api to "attach" a DataHandler to a web service invocation.
for example, im trying to invoke a web service exposed by ActiveBPEL engine which takes an array of strings.
ActiveBPEL engine provides a set of methods to get attachments from an incoming invocation, but as far as i understood, these attachments dont have to be declared among invocation parameters.
So what i would expect is a way to attach a payload (attachment) to my invocation without the need of having declared it somewhere..
is this possible with jbossws? -
3. Re: WS-Attachment on jbossws
paoletto Jan 13, 2008 2:23 PM (in response to paoletto)Actually i checked the examples provided by ActiveBPEL and in their data type or message type definitions they dont add anything.
Instead, while testing with SoapUI, they enable and then add attachments on the fly.
So i wonder how to add an attachment to an web service invocation from the jbossws generated stub.. :?
thanks for any explaination -
4. Re: WS-Attachment on jbossws
paoletto Jan 14, 2008 5:09 AM (in response to paoletto)googled further, and found this on axis2 documentation:
/* Sample client which sends a message with SwA type attachments */ public void uploadFileUsingSwA(String fileName) throws Exception { Options options = new Options(); options.setTo(targetEPR); options.setProperty(Constants.Configuration.ENABLE_SWA, Constants.VALUE_TRUE); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setTo(targetEPR); ServiceClient sender = new ServiceClient(null,null); sender.setOptions(options); OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP); MessageContext mc = new MessageContext(); mc.setEnvelope(createEnvelope()); FileDataSource fileDataSource = new FileDataSource("test-resources/mtom/test.jpg"); DataHandler dataHandler = new DataHandler(fileDataSource); mc.addAttachment("FirstAttachment",dataHandler); mepClient.addMessageContext(mc); mepClient.execute(true); }
isnt it possible to do the same with jbossws?