|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
SOAP and Cannot redeclare class errorHi, After modifying guessClassName() in SCA_Helper.php to find my classes (which are prefixed with 'class.'), I can finally generate WSDL with ? wsdl - kind of. I can see that the WSDL has been generated through XDEBUG and SCA::logger (see below). However, output of the WSDL is prevented by the following error: Fatal error: Cannot redeclare class ilSoapUserAdministration in C: \xampp\htdocs\ilias4\webservice\soap\classes \class.ilSoapUserAdministration.php on line 38 Without ?wsdl, I see that error clearly. With ?wsdl, I get no WSDL and a "junk after document" message with the html of the error message table. Here's my class definition; the log follows. Appreciate any help! """ include "SCA/SCA.php"; chdir("c:/xampp/htdocs/ilias4/"); /** * Soap user administration methods * * @author Stefan Meyer <smeyer@...> * @version $Id: class.ilSoapUserAdministration.php 16124 2008-03-01 20:55:59Z rkuester $ * @service * @binding.soap * @package ilias */ include_once './webservice/soap/classes/ class.ilSoapAdministration.php'; class ilSoapUserAdministration extends ilSoapAdministration { """ Fatal error: Cannot redeclare class ilSoapUserAdministration [ 1] Info 25/04/2008 06:03:57::747 ....SCA::initComponent - Entering [ 2] Info 25/04/2008 06:03:57::748 ....SCA::initComponent - Called from C:\xampp\htdocs\ilias4\webservice\soap\classes \class.ilSoapUserAdministration.php [ 3] Info 25/04/2008 06:03:57::749 ....SCA::initComponent - $_SERVER['HTTP_HOST'] = localhost [ 4] Info 25/04/2008 06:03:57::750 ....SCA::initComponent - $_SERVER['REQUEST_METHOD'] = GET [ 5] Info 25/04/2008 06:03:57::751 ....SCA::initComponent - $_SERVER['PHP_SELF'] = /htdocs/ilias4/webservice/soap/classes/ class.ilSoapUserAdministration.php [ 6] Info 25/04/2008 06:03:57::752 ....SCA::initComponent - $_SERVER['REQUEST_URI'] = ///htdocs/ilias4/webservice/soap/classes/ class.ilSoapUserAdministration.php?wsdl [ 7] Info 25/04/2008 06:03:57::753 ....SCA::initComponent - $_GET['wsdl'] = [ 8] Info 25/04/2008 06:03:57::967 ....SCA::initComponent - Applying tests for a soap binding [ 9] Info 25/04/2008 06:03:57::970 ....SCA::initComponent - The request is a service description request for soap [ 10] Info 25/04/2008 06:03:57::974 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate - Entering [ 11] Info 25/04/2008 06:03:58:: 35 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate - Exiting having generated wsdl [ 12] Info 25/04/2008 06:03:58:: 36 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate - The wsdl is <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:tns2="http://ilSoapUserAdministration" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http:// schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" targetNamespace="http://ilSoapUserAdministration"> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: SOAP and Cannot redeclare class errorDylan wrote: > Hi, > > After modifying guessClassName() in SCA_Helper.php to find my classes > (which are prefixed with 'class.'), I can finally generate WSDL with ? > wsdl - kind of. > > I can see that the WSDL has been generated through XDEBUG and > SCA::logger (see below). However, output of the WSDL is prevented by > the following error: > > Fatal error: Cannot redeclare class ilSoapUserAdministration in C: > \xampp\htdocs\ilias4\webservice\soap\classes > \class.ilSoapUserAdministration.php on line 38 > > Without ?wsdl, I see that error clearly. With ?wsdl, I get no WSDL and > a "junk after document" message with the html of the error message > table. > > Here's my class definition; the log follows. Appreciate any help! > > """ > include "SCA/SCA.php"; > chdir("c:/xampp/htdocs/ilias4/"); > > /** > * Soap user administration methods > * > * @author Stefan Meyer <smeyer@...> > * @version $Id: class.ilSoapUserAdministration.php 16124 2008-03-01 > 20:55:59Z rkuester $ > * @service > * @binding.soap > * @package ilias > */ > include_once './webservice/soap/classes/ > class.ilSoapAdministration.php'; > > class ilSoapUserAdministration extends ilSoapAdministration { > """ > > Fatal error: Cannot redeclare class ilSoapUserAdministration > [ 1] Info 25/04/2008 06:03:57::747 ....SCA::initComponent - Entering > [ 2] Info 25/04/2008 06:03:57::748 ....SCA::initComponent - Called > from C:\xampp\htdocs\ilias4\webservice\soap\classes > \class.ilSoapUserAdministration.php > [ 3] Info 25/04/2008 06:03:57::749 ....SCA::initComponent - > $_SERVER['HTTP_HOST'] = localhost > [ 4] Info 25/04/2008 06:03:57::750 ....SCA::initComponent - > $_SERVER['REQUEST_METHOD'] = GET > [ 5] Info 25/04/2008 06:03:57::751 ....SCA::initComponent - > $_SERVER['PHP_SELF'] = /htdocs/ilias4/webservice/soap/classes/ > class.ilSoapUserAdministration.php > [ 6] Info 25/04/2008 06:03:57::752 ....SCA::initComponent - > $_SERVER['REQUEST_URI'] = ///htdocs/ilias4/webservice/soap/classes/ > class.ilSoapUserAdministration.php?wsdl > [ 7] Info 25/04/2008 06:03:57::753 ....SCA::initComponent - > $_GET['wsdl'] = > [ 8] Info 25/04/2008 06:03:57::967 ....SCA::initComponent - Applying > tests for a soap binding > [ 9] Info 25/04/2008 06:03:57::970 ....SCA::initComponent - The > request is a service description request for soap > [ 10] Info 25/04/2008 > 06:03:57::974 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate > - Entering > [ 11] Info 25/04/2008 06:03:58:: > 35 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate - > Exiting having generated wsdl > [ 12] Info 25/04/2008 06:03:58:: > 36 .....SCA_Bindings_soap_ServiceDescriptionGenerator::generate - The > wsdl is <?xml version="1.0" encoding="UTF-8"?> > <wsdl:definitions xmlns:tns2="http://ilSoapUserAdministration" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http:// > schemas.xmlsoap.org/wsdl/soap/" xmlns:xsi="http://www.w3.org/2001/ > XMLSchema-instance" targetNamespace="http://ilSoapUserAdministration"> > Have you tried the solution in this thread http://groups.google.co.uk/group/phpsoa/browse_thread/thread/7961ae41ce5b7944 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: SOAP and Cannot redeclare class errorHi Caroline,
Thanks for the link. I worked around the problem in the meantime by wrapping my service class with a check to see if the class exists as you do for SCA.php. I've updated my script to include SCA/SCA.php after the class is defined, and this works as well. Now I have my WSDL, but get an SDO_DAS_XML::loadString error when I use getService(wsdl) or soapClient. I'll post this in the existing thread (http://tinyurl.com/5ty2gr) Best, -- Dylan Oliver Primaverity, LLC Sweeping Design LLC --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@... To unsubscribe from this group, send email to phpsoa-unsubscribe@... For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |