title: PHP SoapClient, Ruby wash_out, when passing params: Object of class stdClass could not be converted to string
body: <p>Here's my PHP:</p>
  
  <pre><code>    $url = "http://localhost:3000/api/wsdl";
  
      $client = new SoapClient($url);
  
      $params-&gt;a  = 'a Value';
      $params-&gt;b  = 'another Value';
  
      $client-&gt;AnOperation($params);
  </code></pre>
  
  <p>Here's a ruby controller using the wash_out gem that I'm using to create my soap server:</p>
  
  <pre><code>require "wash_out/soap"
  
  class ApiController &lt; ApplicationController
    soap_service namespace: 'urn:WashOut'
  
    soap_action "AnOperation",
                :args   =&gt; { :a =&gt; :string, :b =&gt; :string },
                :return =&gt; :string
    def AnOperation
      render :soap =&gt; "done"
    end
  
    before_filter :dump_parameters
    def dump_parameters
      logger.debug params.inspect
    end
  end
  </code></pre>
  
  <p>Here's the WSDL that was generated:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:WashOut" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="api" targetNamespace="urn:WashOut"&gt;
    &lt;types&gt;
      &lt;schema targetNamespace="urn:WashOut" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
      &lt;/schema&gt;
    &lt;/types&gt;
    &lt;portType name="api_port"&gt;
      &lt;operation name="AnOperation"&gt;
        &lt;input message="tns:AnOperation"/&gt;
        &lt;output message="tns:AnOperation_response"/&gt;
      &lt;/operation&gt;
    &lt;/portType&gt;
    &lt;binding name="api_binding" type="tns:api_port"&gt;
      &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
      &lt;operation name="AnOperation"&gt;
        &lt;soap:operation soapAction="AnOperation"/&gt;
        &lt;input&gt;
          &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WashOut"/&gt;
        &lt;/input&gt;
        &lt;output&gt;
          &lt;soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:WashOut"/&gt;
        &lt;/output&gt;
      &lt;/operation&gt;
    &lt;/binding&gt;
    &lt;service name="service"&gt;
      &lt;port name="api_port" binding="tns:api_binding"&gt;
        &lt;soap:address location="http://localhost:3000/api/action"/&gt;
      &lt;/port&gt;
    &lt;/service&gt;
    &lt;message name="AnOperation"&gt;
      &lt;part name="a" type="xsd:string"/&gt;
      &lt;part name="b" type="xsd:string"/&gt;
    &lt;/message&gt;
    &lt;message name="AnOperation_response"&gt;
      &lt;part name="value" type="xsd:string"/&gt;
    &lt;/message&gt;
  &lt;/definitions&gt;
  </code></pre>
  
  <p>When I run the PHP, I get "Object of class stdClass could not be converted to string".</p>