From: yermej Date: 2008-04-01T08:55:08+09:00 Subject: Re: Make Soap Body tag self closing? On Mar 31, 4:12 pm, jammendolia wrote: > > A hack: take the final XML and do a string substitution. > > > final_xml.sub!( '', '') > > Thanks for the reply James! > > I had thought of using this approach, and I'm completely open to it, > my problem is that I'm not sure where I can intercept the request to > make this change. I need to hook in somewhere after it's been > generated but before it's sent across the wire. > > Any suggestions? > > Thanks again, > > Joe I'm not positive, but I think you could implement James's idea in SOAP::RPC::Proxy#marshal (in /usr/lib/ruby/1.8/soap/rpc/proxy.rb here). I haven't tested this, but I would save this: module SOAP module RPC class Proxy private class Operation private def marshal(env, opt) send_string = Processor.marshal(env, opt) send_string && send_string.sub!('', '') StreamHandler::ConnectionData.new(send_string) end end end end end and require it in your project. I'm not sure I have all the privates in the right place, but that should be close. Jeremy