Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th September 2009, 22:22
Skprorok Skprorok is offline
Member
 
Join Date: Jun 2009
Posts: 56
Thanks: 8
Thanked 0 Times in 0 Posts
Default SOAP Error: DTD are not supported by SOAP

When I try to make an e-mail user ( $client->mail_user_add() ) i get error:
"SOAP Error: DTD are not supported by SOAP".

Can you tell me what to do please?
Reply With Quote
Sponsored Links
  #2  
Old 20th September 2009, 00:07
Edek7 Edek7 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 21
Thanks: 1
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by Skprorok View Post
When I try to make an e-mail user ( $client->mail_user_add() ) i get error:
"SOAP Error: DTD are not supported by SOAP".

Can you tell me what to do please?
Hello, It`s very simple how get this to work. Here`s the example script that is included in ISPConfig tar.gz package in remoting_client\examples directory:
Look at it:
<?php
...

...

...
HERE IS THE GOOD example of script that adds a email user. It must contain this parameters ... all of them. Of course you must personalize settings to meet your requirements.

$params = array( 'server_id' => 1,
'email' => 'franek@dsad.dsa',
'password' => 'franek',
'quota' => '10',
'maildir' => '/var/vmail/dsad.dsa/franek',
'homedir' => '/var/vmail', 'uid' => '5000',
'gid' => '5000',
'postfix' => 'y',
'disableimap' => '0',
'disablepop3' => '0');


$client_id = 0;
$domain_id = $client->mail_user_add($session_id,$client_id, $params);



if($client->logout($session_id)) {
echo 'Wylogowany.<br />';
}


} catch (SoapFault $e) {
die('SOAP Blad: '.$e->getMessage());
}

?>

I hope this helps you a lot.
Reply With Quote
  #3  
Old 20th September 2009, 22:50
Skprorok Skprorok is offline
Member
 
Join Date: Jun 2009
Posts: 56
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Thanks.

But when I use this exact script, I will get error.
Reply With Quote
  #4  
Old 21st September 2009, 09:37
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Please take a look here in the PHP manual on how to debug this:

http://www.php.net/manual/de/ref.soap.php#60935
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 21st September 2009, 16:35
Skprorok Skprorok is offline
Member
 
Join Date: Jun 2009
Posts: 56
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Please take a look here in the PHP manual on how to debug this:

http://www.php.net/manual/de/ref.soap.php#60935
Thank you for your time, but I still don't know how to resolve problem.

Can you help me please?
Reply With Quote
  #6  
Old 22nd September 2009, 10:39
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Please take a look at the link I posted above, it explains on how to debug this error.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Skprorok (25th September 2009)
  #7  
Old 22nd September 2009, 16:31
Skprorok Skprorok is offline
Member
 
Join Date: Jun 2009
Posts: 56
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Please take a look at the link I posted above, it explains on how to debug this error.
When I use method posted in link above I still can't repair it.

My source code:

...
$domain_id = $client->mail_user_add($session_id,$client_id, $params);
echo "Response:\n" . $client->__getLastResponse() . "\n";


if($client->logout($session_id)) {
echo 'Odhlásenı.<br />';
}

} catch (SoapFault $e) {
die('SOAP Error: '.$e->GetMessage());
}

Script will output:

Logged into remote server sucessfully. The SessionID is .................
SOAP Error: DTD are not supported by SOAP
Reply With Quote
  #8  
Old 24th September 2009, 23:00
Edek7 Edek7 is offline
Junior Member
 
Join Date: Jul 2009
Posts: 21
Thanks: 1
Thanked 1 Time in 1 Post
Default

Ok, i`ll check this script because I and my friend extended the SOAP functionality. It`s seems that something is wrong with data send to the SOAP. Very likely something is missing in params ... Please be patient.

I`ll just checked this script:

<?php

$username = 'admin';
$password = 'admin';

$soap_location = 'http://xxxxxxxxxx:8080/remote/index.php';
$soap_uri = 'http://xxxxxxxxxxxx:8080/remote/';


$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri));


try {
if($session_id = $client->login($username,$password)) {
echo 'Zalogowany. Sesja:'.$session_id.'<br />';
}

$params = array( 'server_id' => 1,
'email' => 'franek@dsad.dsa',
'password' => 'franek',
'quota' => '10',
'maildir' => '/var/vmail/dsad.dsa/franek',
'homedir' => '/var/vmail',
'uid' => '5000',
'gid' => '5000',
'postfix' => 'y',
'disableimap' => '0',
'disablepop3' => '0');


$client_id = 0;
$domain_id = $client->mail_user_add($session_id,$client_id, $params);



if($client->logout($session_id)) {
echo 'Wylogowany.<br />';
}


} catch (SoapFault $e) {
die('SOAP Blad: '.$e->getMessage());
}

?>

It works... so I had no idea why it doesn`t work for you.

Last edited by Edek7; 24th September 2009 at 23:07.
Reply With Quote
The Following User Says Thank You to Edek7 For This Useful Post:
Skprorok (25th September 2009)
  #9  
Old 25th September 2009, 14:29
Skprorok Skprorok is offline
Member
 
Join Date: Jun 2009
Posts: 56
Thanks: 8
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by Edek7 View Post
Ok, i`ll check this script because I and my friend extended the SOAP functionality. It`s seems that something is wrong with data send to the SOAP. Very likely something is missing in params ... Please be patient.

I`ll just checked this script:

<?php

$username = 'admin';
$password = 'admin';

$soap_location = 'http://xxxxxxxxxx:8080/remote/index.php';
$soap_uri = 'http://xxxxxxxxxxxx:8080/remote/';


$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri));


try {
if($session_id = $client->login($username,$password)) {
echo 'Zalogowany. Sesja:'.$session_id.'<br />';
}

$params = array( 'server_id' => 1,
'email' => 'franek@dsad.dsa',
'password' => 'franek',
'quota' => '10',
'maildir' => '/var/vmail/dsad.dsa/franek',
'homedir' => '/var/vmail',
'uid' => '5000',
'gid' => '5000',
'postfix' => 'y',
'disableimap' => '0',
'disablepop3' => '0');


$client_id = 0;
$domain_id = $client->mail_user_add($session_id,$client_id, $params);



if($client->logout($session_id)) {
echo 'Wylogowany.<br />';
}


} catch (SoapFault $e) {
die('SOAP Blad: '.$e->getMessage());
}

?>

It works... so I had no idea why it doesn`t work for you.
Thank you very much for your time. Thank to Till too. I had bad soap location (
$soap_location = 'http://xxxxxxxxxx:8080/remote/index.php';
$soap_uri = 'http://xxxxxxxxxxxx:8080/remote/';
)
You should rewrite this two lines in example file in /remote/example.php in the install package to this lines. In the example file it is written very complicated (maybe only for me).
Reply With Quote
Reply

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
Postfix error: can't use email!! Please help. miguelpinheiro General 7 16th November 2008 23:00
Enable SOAP help trcinc1 Installation/Configuration 0 3rd July 2008 19:01
<Location> not supported? zarrelli Installation/Configuration 8 8th February 2007 20:07
Dspam planet_fox General 6 20th January 2007 18:42
Vhosts no longer written to whitty Installation/Configuration 15 3rd July 2006 22:37


All times are GMT +2. The time now is 20:19.


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