NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
error: Response not of type text/xml - SOAP


Joined: 14 Aug 2007
Posts: 5
Reply with quote
hello,

I made an application using PHP5 for creating a web service for Moodle LMS. I build it in my Win XP Pro SP2 and is working perfectly. When i am testing it with a browser, for example http://localhost/moodle/service.php?wsdl, everything is correct.

I setted up using the same files, the same Moodle version(1.Cool, the same PHP+ MySql etc (i use xampp) to an other computer but then i had this error in my browser: "Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\moodle\nusoap.php on line 7240".
I have to say that, the Operation System of the other PC is Microsoft Windows Server 2003, Standard Edition, Service Pack 2. I am sure that my code doesn't have any errors because the same error appears when i am using the example "Hello, World Redux" of the "Programming with NuSOAP Using WSDL" tutorial.

i changed the name of soapclient class to nusoap_soapclient in nusoap.php and the wsdl appeared succesfully!

Using either my files for moodle, or the hello tutorial (server and client), when i call the client from my browser i get the below errors:

a) if i not rename the class soapclient i get the following error:
Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\moodle\nusoap.php on line 7240
b) if i rename the class when i call the client i get the following error
Error: Response not of type text/xml, and i get as response the html code that appears in my browser when i call the helloserver.php (or mine service.php).

althought the wsdl appears correctly when i call the server (helloserver.php?wsdl or mine service.php?wsdl) i get response html code and not xml as it should. In Win XP i tested the application and works fine! the server and the client! what's wrong in win server 2003??? what should i try in order to get back an xml response to my service? all firewalls etc are open on this pc. do i have to change something in the win server 2003 configurations??

any suggestions???

Thank you for your time, i hope to hearing from you soon,

John
View user's profileFind all posts by eaglemanSend private message
reply?


Joined: 14 Aug 2007
Posts: 5
Reply with quote
no one faced before this problem??
View user's profileFind all posts by eaglemanSend private message
You can't do 'echo'


Joined: 30 Oct 2007
Posts: 2
Reply with quote
You can't do "echo", "print" for output. Your output has to be valid XML or you'll get errors. When you do echo and print, the header information is wrong.
View user's profileFind all posts by praxedisSend private message
error: Response not of type text/xml - SOAP
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic