I posted this question last week in the soap4r group but haven’t
received any replies. So I’m hoping maybe someone here can help.
My situation is this; I 've generated the default/driver/
mappingRegistry using wsdl2ruby for a client that will consume .Net
I have created a customized SOAP::Filter::Handler that takes care of
assigning the soap: namespace to the elements, and I’ve created a
customized SOAP::Header::Handler that takes care of the custom auth
header elements. So far, so good.
I’ve compared the generated request between a working .Net client and
my ruby client, and they are virtually identical with one exception;
for the initial authentication call (e.g. signon), there is no payload
in the soap:Body. The .Net client generates this empty body as
soap:Body/ (self closing) whereas the ruby version generates
I realize both are perfectly valid and should be interpreted the same
way, but unfortunately, this is not the case. I don’'t have access to
the source code for this web service, but I was able to decompile the
dll, and guess what… Whoever wrote it, has some code that is
checking specifically for the existence of a self closed body tag.
When the code doesn’t see the self closed tag, it assumes there will
be a payload, and proceeds to do a substring on it to get a known
piece of data out. Unfortunately again, this is causing a .Net
exception to be thrown (index out of range type of exception) which
blows the whole deal.
Ideally, I’d have the web service modified to use an XML DOM parser
instead, but I don’t have this luxury.
So, my question is; Is there any way to override the default behavior
in soap4r to make it render the empty body with a self closing tag
I really hope so because I’d hate to have to scrap this project over
something so silly!
Thanks in advance!