Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 5th January 2012, 07:03
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default SOAP problem with ISPConfig API

Hello,

i use the API very often and normal no problem. I tested it with example code.

PHP Code:
$soap_location 'https://XXXX:8080/remote/index.php';
$soap_uri 'https://XXXX:8080/remote/';
require_once 
'iclasses/class.ispconfig.php';
$isp = new ispconfig($soap_location,$soap_uri,'XXXX','XXXX');
$isp->addClient(1,'test@test.de','test'.time(),'test'.time(),'test'.time(),3); 
But i Get an error.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="/remote/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:loginResponse><return xsi:type="xsd:string">512bc6311124f52c0b523c716de37bdf</return></ns1:loginResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Error: looks like we got no XML document
I tried the example code, too.


Normal example code:
PHP Code:
$client = new SoapClient(null, array('location' =>  'https://XXXX:8080/remote/index.php',
                                     
'uri'      => 'https://XXXX:8080/remote/',
                                     
'trace' => 1,
                                     
'exceptions' => 1));


try {
    if(
$session_id $client->login('XXXX','XXXX')) {
        echo 
'Logged successfull. Session ID:'.$session_id.'<br />';
    }
    } catch (
SoapFault $e) {
    echo 
$client->__getLastResponse();
    die(
'SOAP Error: '.$e->getMessage());

Output:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="/remote/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:loginResponse><return xsi:type="xsd:string">512bc6311124f52c0b523c716de37bdf</return></ns1:loginResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Error: looks like we got no XML document
regards
xaver

Last edited by xaver; 5th January 2012 at 10:34.
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hosting multiple websites and webmail dmwcool Installation/Configuration 8 30th March 2010 04:15
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
Loads of mysql connections to dbispconfig StrikerNL General 2 5th March 2009 15:31
ISPConfig DNS and virtual host configuration tips and problem Ripper Installation/Configuration 6 26th June 2007 01:29
ISPconfig Virtual Hosts + Perfect setup Problem ? orasis Installation/Configuration 5 16th March 2007 11:46


All times are GMT +2. The time now is 09:24.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.