Saturday, July 28, 2007

One Half Done

After a week of coding, i finally have a working MTOM unwrapper. Getting this was relatively easy, and involved parsing the message for the boundary, seperating the message parts, recombining them and encoding the binary octets as base64. See the code below if you are interested. Included is also a simple wrapper for the SOAP4r Libary so I can use it through rails.
http://ross-assoc.net/ruby4mtom.rb

Next up is figuring out a way to hook the MTOM handler into the generation of the SOAP message. The main thing to know is which parts are defined/restricted to base64 or hex, otherwise it is very hard to tell what needs to be seperated out into parts and un-encoded.

Any thoughts or bugs are much appreciated.

2 comments:

el2king said...

I am interested in using MTOM4ruby and using Axis2/C to send a SOAP attachment through MTOM. Since MTOM4ruby is not entirely finished yet, do you know of a time frame of when MTOM4ruby will be finished or in a stable state? Thanks!

DC said...

Hi, I d like to introduce you to WSO2 Web Service Framework for Ruby which in fact based on Axis2/C which have the full support for MTOM.

HTH