rubiii/savon — Issue #268: SOAPAction shall match 'uri#method' if present
Author: Sephi-Chan
Created: 2012-02-17 21:08:36+00:00
State: open

Hello

I try to use a SOAP SMS sending service with Savon but I can't get it working…
The problem is in the way I use Savon since it worked well with the dead simple PHP SoapClient.

``` ruby
class SMS
WSDL_URI = "https://www.ovh.com/soapi/soapi-re-1.31.wsdl"
LOGIN = '...'
PASSWORD = '...'
SMS_ACCOUNT = '...'
NUMBER_FROM = '...'

def initialize(message)
@client = Savon::Client.new(SMS::WSDL_URI)
@message = message
end

def send(numberTo)
params = {
login: SMS::LOGIN,
password: SMS::PASSWORD,
smsAccount: SMS::SMS_ACCOUNT,
numberFrom: SMS::NUMBER_FROM,
numberTo: numberTo,
message: @message,
smsValidity: 10,
smsClass: 1,
smsDeferred: 0,
smsPriority: 3,
smsCoding: 1,
tag: ""
}

response = @client.request(:telephony_sms_user_send) do
soap.body = params
end
end
end
```

When I run it with:

``` ruby
message = SMS.new("Foo")
message.send("+33...")
```

The call fails with this error:

```
Savon::SOAP::Fault: (soap:Client) SOAPAction shall match 'uri#method' if present (got 'http://soapi.ovh.com/manager#telephonySmsUserSend', expected '#telephonySmsUserSend'
```

I think this error is not justified since the SOAPAction of the working call (with PHP) is exactly the one that Savon got.

Please tell me what additional information I can give you to help me get it working.