CodeIgniter Forums
XML-RPC Problems - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: XML-RPC Problems (/showthread.php?tid=11124)



XML-RPC Problems - El Forum - 08-26-2008

[eluser]cmgmyr[/eluser]
Hello,
I'm trying to connect to a web service and I'm running into some problems. Here is what I have so far:

Code:
$this->load->library('xmlrpc');
        
        $this->xmlrpc->set_debug(TRUE);
        
        $this->xmlrpc->server('URL_OF_SERVICE', 80);
        $this->xmlrpc->method('METHOD_OF_SERVICE');
        
        $request = array(
                       array(
                               array('token' => 'ABC123'),
                               'struct'
                            ),
                       array(
                               array('id_number' => '123'),
                               'struct'
                            )
                   );
        
        $this->xmlrpc->request($request);
        
        if (!$this->xmlrpc->send_request()){
            echo $this->xmlrpc->display_error();
        }else{
            echo 'It worked!';
        }

I'm getting:
Code:
Did not receive a '200 OK' response from remote server. (HTTP/1.1 500 Internal Server Error)
as the error code.

1. What am I doing wrong?
2. How can I see the full request that I'm sending to the server to make sure it looks ok?

Thanks in advance,
-Chris


XML-RPC Problems - El Forum - 08-27-2008

[eluser]cmgmyr[/eluser]
anyone?


XML-RPC Problems - El Forum - 08-27-2008

[eluser]cmgmyr[/eluser]
When I have it set to debug I get this in the response:

Code:
<soap:Envelope>
<soap:Header>
<soap12:Upgrade>
<soap12:SupportedEnvelope qname="soap:Envelope"/>
<soap12:SupportedEnvelope qname="soap12:Envelope"/>
</soap12:Upgrade>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:VersionMismatch</faultcode>
<faultstring>
Possible SOAP version mismatch: Envelope namespace  was unexpected. Expecting http://schemas.xmlsoap.org/soap/envelope/.
</faultstring>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>

Any ideas?


XML-RPC Problems - El Forum - 09-03-2008

[eluser]Jilani Jidni[/eluser]
[quote author="cmgmyr" date="1219823748"]Hello,
I'm trying to connect to a web service and I'm running into some problems. Here is what I have so far:

Code:
$this->load->library('xmlrpc');
        
        $this->xmlrpc->set_debug(TRUE);
        
        $this->xmlrpc->server('URL_OF_SERVICE', 80);
        $this->xmlrpc->method('METHOD_OF_SERVICE');
        
        $request = array(
                       array(
                               array('token' => 'ABC123'),
                               'struct'
                            ),
                       array(
                               array('id_number' => '123'),
                               'struct'
                            )
                   );
        
        $this->xmlrpc->request($request);
        
        if (!$this->xmlrpc->send_request()){
            echo $this->xmlrpc->display_error();
        }else{
            echo 'It worked!';
        }

I'm getting:
Code:
Did not receive a '200 OK' response from remote server. (HTTP/1.1 500 Internal Server Error)
as the error code.

1. What am I doing wrong?
2. How can I see the full request that I'm sending to the server to make sure it looks ok?

Thanks in advance,
-Chris[/quote]

May be you are trying to call https url. please try to call a http url.


XML-RPC Problems - El Forum - 09-03-2008

[eluser]cmgmyr[/eluser]
No, it is a http url.


XML-RPC Problems - El Forum - 09-03-2008

[eluser]Jilani Jidni[/eluser]
[quote author="cmgmyr" date="1220464865"]No, it is a http url.[/quote]

do you have any echo or redirect function call into base controller?


XML-RPC Problems - El Forum - 09-03-2008

[eluser]cmgmyr[/eluser]
Sorry, what do you mean? The service is on another server and not running CI.


XML-RPC Problems - El Forum - 09-03-2008

[eluser]Jilani Jidni[/eluser]
[quote author="cmgmyr" date="1220465734"]Sorry, what do you mean? The service is on another server and not running CI.[/quote]

can you share your xmlrpc server code?