Welcome Guest, Not a member yet? Register   Sign In
Problem with XML RPC
#1

[eluser]Unknown[/eluser]
Hi All.

I am implementing PLESK (hosting control panel) in my application using PLESK XML RPC API. I have problem with implementation in CI this code:

The headers:

Code:
POST /enterprise/control/agent.php
HTTP/1.1 Host: 10.58.32.100:8443
HTTP_AUTH_LOGIN: login
HTTP_AUTH_PASSWD: qwedsa
HTTP_PRETTY_PRINT: TRUE
Content-Length: 294
Content-Type: text/xml

The packet:

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<packet version="1.4.1.2">
<domain>
<get>
    <filter/>
    <dataset>
        <limits/>
        <prefs/>
        <user/>
        <hosting/>
        <stat/>
        <gen_info/>
    </dataset>
</get>
</domain>
</packet>

How can I make an authorization (LOGIN and PASS) using libary in CI? Should I send normal headers before make XML request? And what with: "HTTP/1.1 Host: 10.58.32.100:8443" in the headers? Is it requied?
#2

[eluser]Randy Casburn[/eluser]
Here is what you should do...

Step 1) Make a Clean install of CI and get the Welcome page to work with your web server using a basic HTTP_AUTH capability and nothing else (NO XML-RPC, nothing else)

Step 2) Refer to the excellent CI documentation on how to set up a CI XML-RPC server and Client and do that next using the tests in the documentation and get that to work perfectly while still using your HTTP_AUTH from above

======

Once you have accomplished those two things, you essentially have accomplished what you want to achieve. Once you get this all working, its a matter of accepting the incoming requests from your clients and using CI controllers to direct those XML-RPC server requests through the CI XML-RPC server to your PLESK API.

The CI XML-RPC server should be able to do this.

Randy




Theme © iAndrew 2016 - Forum software by © MyBB