<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Here's some example code I posed at d.o showing how to communicate between two Drupal 6 sites using Services 2.2 thru 2.4, &amp; the XMLRPC server:<div><br></div><div><a href="http://drupal.org/node/774298">http://drupal.org/node/774298</a></div><div><br></div><div>you'll want to examine the "send()" routine, which is used to call any xmlrpc method. The example code uses the Drupal API, rather than cURL, as you are attempting to use. However, the key logic you'll want to see is the "send()" routine, which is the handling &amp; packaging of the method arguments before calling the remote method. Your code you show below is incorrect for XMLRPC parameter packaging.</div><div><br></div><div>Additionally, as an aid for you to convert between the logic I give above and your attempts to use cURL, I have another post at g.o showing how to communicate with a Services 3.0 REST remote API - with two examples: one using cURL and one using the Drupal API. Granted, my second example is for a REST server in Services 3.0, but it demonstrates the cURL handling - you'll just need to translate the first code example's packaging of the method parameters for XMLRPC transport.</div><div><br></div><div><a href="http://drupal.org/node/1070066">http://drupal.org/node/1070066</a></div><div><br></div><div>And for your assurance, both code examples I've posted are taken directly from live sites using those implementations.&nbsp;<br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-family: Helvetica; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><br class="Apple-interchange-newline">Sincerely,</div><div>-Blake</div><div><a href="mailto:bsenftner@earthlink.net">bsenftner@earthlink.net</a></div><div><a href="http://www.BlakeSenftner.com">www.BlakeSenftner.com</a></div><div><a href="http://www.MissingUbercartManual.com">www.MissingUbercartManual.com</a></div></span></span></div>
</div>
<br><div><div>On Mar 4, 2011, at 2:30 PM, <a href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div style="direction: ltr;" bidimailui-charset-is-forced="true" bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff" text="#000000"><div style="margin-bottom: 0cm; margin-top: 0pt; ">After hours of
      searching, scouring, absorbing it was determined that there was
      little hope of (currently) getting past Services 2.4 and REST
      returning a 404 error, so I switched to xmlrpc.</div><div style="margin-bottom: 0cm; margin-top: 0pt; "><br>
    </div><div style="margin-bottom: 0cm; margin-top: 0pt; ">I have a simple
      script to hit my service from outside the site, fine-tuned a
      couple dozen times based on various recommendations, to currently
      be:</div><div style="margin-bottom: 0cm; margin-top: 0pt; "><br>
    </div><div style="margin-bottom: 0cm; margin-top: 0pt; ">$url =
      <a class="moz-txt-link-rfc2396E" href="http://localhost/mydomain/services/xmlrpc">"http://localhost/mydomain/services/xmlrpc"</a>;<br>
      $ch = curl_init();<br>
      $data = 'method=my.method&amp;id=12345&amp;text=hello';<br>
      curl_setopt($ch, CURLOPT_POST, 1);<br>
      curl_setopt($ch, CURLOPT_POSTFIELDS, $data);<br>
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br>
      curl_setopt($ch, CURLOPT_URL, $url);<br>
      <br>
      $response = curl_exec($ch);<br>
      <br>
    </div><div style="margin-bottom: 0cm; margin-top: 0pt; ">with $data as a
      string like above, I continuously receive: faultCode&nbsp; -32700&nbsp;&nbsp;&nbsp;
      faultString&nbsp; Parse error. Request not well formed.&nbsp; </div><div style="margin-bottom: 0cm; margin-top: 0pt; "><br>
    </div><div style="margin-bottom: 0cm; margin-top: 0pt; ">If I change the
      postfields to be an
      array('method'=&gt;'my.method','id'=&gt;12345...&nbsp; I instead
      continuously receive a message that xmlrpc will only handle Post
      transactions.<br>
    </div><div style="margin-bottom: 0cm; margin-top: 0pt; "><br>
    </div>
    <div class="moz-signature">-- <br>
      
      
      
      
      
      <em>I am a non sequitur. Beware, the contents were packaged where
        peanuts are processed.</em><p style="margin-bottom: 0in;"><span>&lt;ayenlogo.jpeg&gt;</span><font style="font-size: 8pt;" size="1">Ayen
Designs
        </font><font face="Times New Roman, serif"><font style="font-size: 8pt;" size="1"><br>
            388
            Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
        <br>
        <font face="Times New Roman, serif"><font style="font-size:
            8pt;" size="1">404-271-9734<br>
            Web:<a href="http://ayendesigns.com/">ayendesigns.com</a><br>
            Blog:
            <a href="http://theaccidentalcoder.com/">theAccidentalCoder.com</a><br>
            Drupal:
            <a href="http://drupal.org/user/367108">j. ayen green</a>
            (367108)<br>
            IRQ: j_ayen_green<br>
            IM (Yahoo) baalwww&nbsp;&nbsp;&nbsp;&nbsp;(MSN)
            <a class="moz-txt-link-abbreviated" href="mailto:baalwww@yahoo.com">baalwww@yahoo.com</a><br>
            Skype: ayendesigns | Facebook: ayendesigns |
            Twitter: @ayendesigns</font></font></p><p style="margin-bottom: 0in;"> <font face="Times New Roman,
          serif"><font style="font-size: 8pt;" size="1"><br>
            <br>
            Ayen
            Designs is the computer services division of <span>&lt;acmelogo.jpeg&gt;</span></font></font></p>
    </div>
  </div>

</blockquote></div><br></div></body></html>