HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Strange Soap Class error using Remoting with ISPConfig 2.2.16 - Junk after XML??? (

bpmee 13th September 2007 05:43

Strange Soap Class error using Remoting with ISPConfig 2.2.16 - Junk after XML???
Hi all,

I'm happy to be using the latest version of ISPconfig 2.2.16 on my server, which operates on Fedora Core 5.

I'm having a problem, however, attempting to setup websites remotely using "Remoting" and the SOAP function of ISConfig 2.2.16

I'm executing commands using a PERL script that is basically an exact copy of the example .PHP scripts, except I have added the necessary values for each website I want to create.

When I run the script, it will install a few websites on my ISPConfig 2.2.16 server, and then randomly, the script dies with this error::confused:


junk after document element at line 2, column 0, byte 7 at /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/XML/ line 187
<br />
<b>Catchable fatal error</b>:  Object of class soap_fault could not be converted to string in <b>/home/admispconfig/ispconfig/lib/classes/ispconfig_soap.obj.php</b> on line <b>2000</b><br />
 at line 228

My guess is that the script is running fine WITHOUT an error being called on the receiving end of the new website request.

But, when the server throws an error, there seems to be something wrong with SOAP on that server when attempting to report it.

So I looked at the Soap.obj.php file on my ISPconfig 2.2.16 server and specifically looked at line 2000.

It appears to be an error or fault call:

PHP Code:

$this->debug("done calling method: $this->methodname, received $method_response of type".gettype($method_response));
// if we got nothing back. this might be ok (echoVoid)
if(isset($method_response) && $method_response != '' || is_bool($method_response)) {
// if fault
if(get_class($method_response) == 'soap_fault'){
$this->debug('got a fault object from method');
$this->fault $method_response;
// if return val is soapval object
} elseif(get_class($method_response) == 'soapval'){
$this->debug('got a soapval object from method');
$return_val $method_response->serialize();
// returned other
} else { 

Things I've done to try to fix this:

1.) Verified IONcube loader - It is in folder /home/admispconfig/ispconfig/web/ioncube . IONcube was present, and the error still persisted.

2.) Ran CPAN force install of XML::Parser on the server calling to the ISPConfig 2.2.16 server to make sure it is up to date. This did not help.

3.) Tried substituting the soap.obj.php file from a dev version of ISPconfig 2.3.1, but this did not help. I then replaced this change with the original file that came with ISPConfig 2.2.16 and the error continued.

NOTE: I can successfully script multiple website installations from the server I am using to my other servers that are running ISPConfig 2.3.1 dev without any trouble.

Perhaps there is an issue with 2.2.16's coding in the SOAP class?:confused:

Thanks in advance for any help....

Tommahawk 13th September 2007 05:53

The issue is with return soap_faults in /home/admispconfig/web/remote/index.php

soap expects xml but instead a string is returned to fix the issue you can change it to return a string instead of xml where soap_faults are returned.

e.g return "the error" //returning a string not xml

All times are GMT +2. The time now is 16:41.

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