title: Add comment to issue using php and JIRA SOAP API
body: <p>How do I add a comment to a JIRA Issue using PHP and Jura's SOAP API? I have the connection and tested it retrieving an existing issue, all runs good, but when I try the addComment method it returns this:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught SoapFault exception: [soapenv:Server.userException] org.xml.sax.SAXException: Bad types (class java.util.HashMap -> class com.atlassian.jira.rpc.soap.beans.RemoteComment) in /home/a7348186/public_html/jira.php:46 Stack trace: <br>
    #0 /home/a7348186/public_html/jira.php(46): SoapClient->__call('addComment', Array)<br> 
    #1 /home/a7348186/public_html/jira.php(46):
    SoapClient->addComment('16VGN3ohoo', 'NTP->29', Array) <br>
    #2 {main}  thrown in /home/a7348186/public_html/jira.php on line 46</p>
  </blockquote>
  
  <p>This is my code:</p>
  
  <pre><code>&lt;?php
  $emailplain = $_REQUEST['plain'];
  $emailsubject = $_REQUEST['subject'];
  $inputkey = $_REQUEST['key'];
  $inputsumm = $_REQUEST['summ'];
  $client = new SoapClient(NULL,
      array(
          "location" =&gt; "https://server.com/rpc/soap/jirasoapservice-v2?wsdl",
          "uri"      =&gt; "urn:xmethods-delayed-quotes",
          "style"    =&gt; SOAP_RPC,
          "use"      =&gt; SOAP_ENCODED
          ));
  $token = $client-&gt;login("user", "pass");
  $issueId = $inputkey;
  $issue = $client-&gt;getIssue($token, $issueId);
  echo("assignee:".$issue-&gt;assignee);
  echo(" created:".$issue-&gt;created);
  echo(" summary:".$issue-&gt;summary);
  echo(" issueid:".$issue-&gt;key);
  print $inputsumm;
  $stringsummary = $issue-&gt;summary;
  
  $string = $issue-&gt;summary;
  $emailsubjectregexp = preg_replace('/[a-zA-Z]+/', '', $inputsumm);
  $stringsumm = ('summary ~ "' . $emailsubjectregexp . '"');
  $jqlstring = $stringsumm;
  
  $searchjql = $client-&gt;getIssuesFromJqlSearch($token, $jqlstring, 100);
  function printArray ($array, $devolver = false) {
      $stringa = '&lt;pre&gt;' . print_r($array, true) . '&lt;/pre&gt;';
      if ($devolver) return $stringa;
      else echo $stringa;
  }
  printArray($searchjql);
  print_r ($searchjql);
  $key = $searchjql[0]-&gt;key;
  echo $key;
  $client-&gt;addComment($token, $key, array('body' =&gt; 'your comment'));
  ?&gt;
  </code></pre>
  
  <p>If you notice, the last line contains the code to execute what I want, but with no luck. Any ideas folks?</p>