title: SOAP-ERROR: Encoding: object has no 'CompanyID' property" PHP
body: <p>Here is the common Soap error what we are facing in our project while sending SOAP request..</p>
  
  <p>Please find the PHP code below and sample of SOAP request....</p>
  
  <pre><code>        $client = new SoapClient("url for wsdl",
                   array(
                      'soap_version'   =&gt; SOAP_1_1, // Default Version
                      'trace'          =&gt; true,
                      'exceptions' =&gt; true,
                      'style' =&gt; SOAP_RPC, 
                      'use' =&gt; SOAP_ENCODED
                      )
                   );
  
  
                  $parimaryName = array(  
                      "Company" =&gt; "xyz",
                      "FirstName" =&gt; "test",
                      "LastName" =&gt; "test",
                      "Mi"=&gt;"test",
                      "NickName" =&gt; "t",
                      "Email" =&gt; "test@test.com"
                   );
  
              $customer = array(
                       "CustClassificationID" =&gt; 12345,
                       "PrimaryName" =&gt; $parimaryName,
                       "EnrollerDistributorID" =&gt; 345545
                  );
  
  
                  $webser= array(
                  'APIKey' =&gt; 'xxx-xxx-xxxx',
                  'CompanyID' =&gt; xxx,            
                  "Customer"=&gt; $customer
  
                  );
  
                  $ccRequest= array(
                      "WebServiceCredentialsBase"=&gt;$webser,
                      "CustomerCreateOnlyRequest"=&gt;$req                       
                  );    
  
                  $final=  array( 'Request' =&gt;  $ccRequest);
  
                  try {
  
                  $result = $client-&gt;myServiceCall($final);
                  echo "&lt;pre&gt;"; print_r($result); echo "&lt;/pre&gt;";
                  echo "Success"."&lt;br /&gt;";
                  echo("\n&lt;p&gt;&lt;pre&gt;Dumping request:\n" . htmlspecialchars($client-&gt;__getLastRequest()) . '&lt;/pre&gt;&lt;/p&gt;');
                  echo("\n&lt;p&gt;&lt;pre&gt;Dumping response:\n" . htmlspecialchars($client-&gt;__getLastResponse()) . '&lt;/pre&gt;&lt;/p&gt;');              
                } catch(Exception $e) {
                  echo "Failure"."&lt;br /&gt;";
                  echo("\n&lt;p&gt;&lt;pre&gt;Dumping request:\n" . htmlspecialchars($client-&gt;__getLastRequest()) . '&lt;/pre&gt;&lt;/p&gt;');
                  echo("\n&lt;p&gt;&lt;pre&gt;Dumping response:\n" . htmlspecialchars($client-&gt;__getLastResponse()) . '&lt;/pre&gt;&lt;/p&gt;');
                  echo "Caught Exception"; echo "&lt;/br&gt;";
                  var_dump($e-&gt;getMessage());
              }
  </code></pre>
  
  <p>Error :-</p>
  
  <pre><code>Caught Exception
  string(56) "SOAP-ERROR: Encoding: object has no 'CompanyID' property"
  </code></pre>
  
  <p>I tried to debug error but no solution !!</p>
  
  <p>Please guide me where I am doing mistake !!</p>
  
  <p>Thanks !!</p>