Hi all,
I am new to Webservices and am trying to create Webservice using nusoap. I tried a simple example code provided in the internet - but the same throws the following error.
Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\test_webservice\nusoapprogwsdl\lib\nusoap.php on line 7240
Any help in this regards... Please.....
Regards,
Navin
Create a Webservice using nusoap
Moderator: General Moderators
- navinkumarank
- Forum Newbie
- Posts: 6
- Joined: Thu Apr 05, 2007 8:52 am
Sounds like you are including the class twice, try include_once, or remove one of the two includes.
- navinkumarank
- Forum Newbie
- Posts: 6
- Joined: Thu Apr 05, 2007 8:52 am
I am using " require_once('lib/nusoap.php'); " in my client php file.
but I am not sure where exactly I have to make change in "nusoap.php" because it is a famous class used... and I think there might not be any problem in that class file.
The client codes which I downloaded and used are from this URL http://www.scottnichol.com/nusoapintro.htm
Hope you will get an Idea if you see this above URL...
Note: If you have done some webservices in php can you help me out how to create a webservice in php and manipulate that ?
Regards,
Navin
but I am not sure where exactly I have to make change in "nusoap.php" because it is a famous class used... and I think there might not be any problem in that class file.
The client codes which I downloaded and used are from this URL http://www.scottnichol.com/nusoapintro.htm
Hope you will get an Idea if you see this above URL...
Note: If you have done some webservices in php can you help me out how to create a webservice in php and manipulate that ?
Regards,
Navin
-
Steve Mellor
- Forum Commoner
- Posts: 49
- Joined: Thu Aug 02, 2007 8:18 am
Re: Create a Webservice using nusoap
That makes me think it's a problem in one of the class files. Either that or; do you have over 7000 lines of code?navinkumarank wrote:Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\test_webservice\nusoapprogwsdl\lib\nusoap.php on line 7240
navin - SoapClient is a built-in class that exists in PHP5 (when php is compiled with --enable-soap). This is conflicting with nuSOAP's soapclient class (case doesnt matter in PHP).
You dont require nuSOAP anymore.
You dont require nuSOAP anymore.
- navinkumarank
- Forum Newbie
- Posts: 6
- Joined: Thu Apr 05, 2007 8:52 am
Problem with <complexType> while using Nusoap
feyd | Please use
any help in this regards please.....
Regards,
Navin
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
hi,
I am now able to create a Webservice using "Nusoap" but I am facing problems while trying to create a Webservice with the WSDL containing "[b]<complexType>[/b]".
When I run the service using the client I get the following fault response..... And I am not sure what it represents....
[syntax="xml"]
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 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:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">Server</faultcode>
<faultactor xsi:type="xsd:string"/>
<faultstring xsi:type="xsd:string">unable to serialize result</faultstring>
<detail xsi:type="xsd:string"/>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Regards,
Navin
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]