Friday, May 13, 2011
A very simple way to send attachement to a webservices
As i know the SOA has a standard way i'e MTOM for sending and recieving attachement which i have described in one of my previous blog.What i found from this a some sort of inter-operatability issue as well as performance issue as i have to unnessarily encode the content(which one can think that the data is protected but the truth is its not bcos decoding is very easy) which even increases the size of the attachment also uncessary xml syntaxes are incorporated which even increases the size of data to be send while invoking the webservice.So i thought what if i want to have my own style of sending and recieving attachemts.Then what i can do is simply get the bytes of the attachment.using java.io.* api and send it as a parameter to the operation.But this solution can be used if you only want to send/recieve attachments.If you want to send more complex parameters then my suggestion is to use MTOM.
Subscribe to:
Posts (Atom)