How to create urn:localhost-catalog SOAP header in Ruby?
I have this (working) example in php:

    $usernameToken = new SoapHeaderUsernameToken( $password, $username );
    $soapHeaders[] = new SoapHeader("urn:localhost-catalog", 'UsernameToken', $usernameToken);
    
    $client = new SoapClient("my_client_url");
    $client->__setSoapHeaders( $soapHeaders );

But I want a client in Ruby. I'm using the savon gem, which can do authentication for you. So far, I have the following method:

    def my_soap_client
        client = Savon::Client.new do
            wsdl.document = "my_client_url"
        end
    
        client.wsse.credentials "usr", "pass" # Adding :digest doesn't seem to help
    
        return client
    end
    
    # I make requests like this:
    my_soap_client.request :wsdl, "getProductGroups", :parent_id => 1

I can successfully list available actions, but if I try to make a request, the result is always **"(SOAP-ENV:Client) Missing parameter"**. Also, it doesn't matter if I pass correct credentials or fake ones. That is why I believe the authentication fails.

Hope someone can help!
How to create urn:localhost-catalog SOAP header in Ruby?
===

I have this (working) example in php:

    $usernameToken = new SoapHeaderUsernameToken( $password, $username );
    $soapHeaders[] = new SoapHeader("urn:localhost-catalog", 'UsernameToken', $usernameToken);
    
    $client = new SoapClient("my_client_url");
    $client->__setSoapHeaders( $soapHeaders );

But I want a client in Ruby. I'm using the savon gem, which can do authentication for you. So far, I have the following method:

    def my_soap_client
        client = Savon::Client.new do
            wsdl.document = "my_client_url"
        end
    
        client.wsse.credentials "usr", "pass" # Adding :digest doesn't seem to help
    
        return client
    end
    
    # I make requests like this:
    my_soap_client.request :wsdl, "getProductGroups", :parent_id => 1

I can successfully list available actions, but if I try to make a request, the result is always **"(SOAP-ENV:Client) Missing parameter"**. Also, it doesn't matter if I pass correct credentials or fake ones. That is why I believe the authentication fails.

Hope someone can help!