Welcome Guest, Not a member yet? Register   Sign In
XML-RPC Problems
#1

[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
#2

[eluser]cmgmyr[/eluser]
anyone?
#3

[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?
#4

[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.
#5

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

[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?
#7

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

[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?




Theme © iAndrew 2016 - Forum software by © MyBB