title: Calling a SOAP method with PHP for a specific service
body: <p>Sorry to have to do this, but I'm getting no love from the people who run this particular webservice. I've never used SOAP before.</p>
  
  <p><a href="https://cwi.rezexchange.com:9991/Service.asmx?op=CwiRateDetails" rel="nofollow noreferrer">Here's the method I'm trying to call</a></p>
  
  <p>And here's the code I'm thinking should work</p>
  
  <pre><code>    public function soapTest(){
  
              echo "start &lt;br /&gt;";
              use_soap_error_handler(true);
              $client = new SoapClient("https://cwi.rezexchange.com:9991/?wsdl");
  
                  // here's the problem. What goes in the parenthesis?
              $result = $client-&gt;CwiRateDetails(????);
  
              echo($result);
              echo "&lt;br /&gt; end";
  
          }
  </code></pre>
  
  <p>Now I'm guessing this tells me what the parenthesis should contain. </p>
  
  <pre><code>POST /Service.asmx HTTP/1.1
  Host: cwi.rezexchange.com
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://hotelconcepts.com/CwiRateDetails"
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;CwiRateDetails xmlns="http://hotelconcepts.com/"&gt;
        &lt;PropertyCode&gt;string&lt;/PropertyCode&gt;
        &lt;DateFrom&gt;dateTime&lt;/DateFrom&gt;
        &lt;DateTo&gt;dateTime&lt;/DateTo&gt;
        &lt;RatePlan&gt;string&lt;/RatePlan&gt;
        &lt;RoomType&gt;string&lt;/RoomType&gt;
        &lt;PromotionalRates&gt;boolean&lt;/PromotionalRates&gt;
      &lt;/CwiRateDetails&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>My guess is that something like</p>
  
  <pre><code>$result = $client-&gt;CwiRateDetails($PCode, $DateFrom, $DateTo, $RatePlan, $RoomType, false);
  </code></pre>
  
  <p>Should work. But I don't know what the date format is, or what room types are or how to reference a rate plan. </p>
  
  <p>Now. Before I go ape shit bannana bonkers over email with them, am I wrong in thinking there's a load more information they need to give me? Or is there some sort of SOAP trickery I can use to get that information from somewhere?</p>