I hate dot NET, but sadly I spent an entire day interfacing with it. To make a long story short, to get my Rails application talking to a dot NET webservice properly, I needed to slightly hijack ActionWebService::Client::Soap.
I've included a patch to rails/actionwebservice/lib/action_web_service/client/soap_client.rb which helped me deal with dot NET. It'd be great if someone with write access to Rails svn could commit this, or otherwise propose a better way to accomplish what I'm doing with ActionWebService.
Basically what this does is allow you to do something like this:
client = ActionWebService::Client::Soap.new(GmClickToCallApi, 'http://someurl/Service.asmx’, :namespace => 'http://some_namespace/', :soap_action_base => "http://some_namespace", :driver_options => { 'protocol.wiredump_file_base' => "/Users/bosko/FOO_BAR" }, :driver_attributes => { 'default_encodingstyle' => SOAP::EncodingStyle::ASPDotNetHandler::Namespace, 'allow_unqualified_element' => true})
The key thing to observe is the new "driver_attributes" option. This is similar to "driver_options", but different -- see the patch for how/why. There is no current way (before patch) to send attribute assignment messages to the underlying SOAP Driver in AWS::Client::Soap. This lets you do just that.
Note also that in the above code snippet, I use the "protocol.wiredump_file_base" option as well; it wouldn't hurt if this particular option was also documented in AWS::Client::Soap (it's not in the patch I submit, but perhaps it should be in a separate one).
Cheers,
hijack_actionwebservice_soap_client.diff (2.07 KB)