# SOAP Client

**URL:** <https://www.ruby-forum.com/t/soap-client/141433>\
**Category:** Ruby\
**Created:** [June 25, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/soap-client/141433 "2008-06-25T20:51:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertpostill](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8797f3/32.png) [@robertpostill](https://www.ruby-forum.com/u/robertpostill)\
**Post date:** [June 25, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/soap-client/141433/1 "2008-06-25T20:51:12Z")

</div>

I’m a complete SOAP neophyte. I have managed to hack myself part of the  
way to my goal, so I suppose that’s good. Anyhow, I guess I’ll break  
this all down so you all can completely understand what’s going on.

I’m trying to create a SOAP client to interact with a SOAP server  
provided by a client. Their website shows the proper way of formatting  
the SOAP message to send, which I successfully recreated with curl. I  
dove into the Ruby (with no help from documentation…because there is  
roughly 0 on it that I have found) and I pieced together something like  
this:

require ‘soap/rpc/driver’  
driver = SOAP::RPC::Driver.new(‘url’, nil, ‘soapaction\_url’)  
driver.add\_method(‘GetLicensees’, ‘UserID’, ‘UserPass’)  
driver.GetLicensees(‘user’, ‘pass’)

This works yet doesn’t work. I get an Access Denied return message. I  
fiddled around here and there and realized one thing, my method is  
missing something of (what I think) grave importance. my   
method is not getting a xmlns="" attribute–and the clients  
documentation says it needs a specific one (which we will call  
client\_xmlns).

So my question is, how do I get add\_method (or use another method?) to  
add xmlns=‘client\_xmlns’ to my method.

NOTE: I’ve taken the exact dump of what my Ruby is creating and sending  
to the server and put it into a shell script that uses curl. It fails.  
When I had xmlns=‘client\_xmlns’ to the method it responds  
correctly–thus I came to the conclusion of what my problem is. So that  
means it’s not another issue, so I think.

Thanks in advanced guy, cheers!  
-Kotrin
