NuSoap with PHP5

For the past few days I have been working with SOAP on a number of platforms. I wanted to use NuSoap with PHP5 and here are a few steps which will allow you to do so. As PHP5 has an inbuilt support for webservices it will clash with the names in nusoap.php. To get over this rename the class soapclient to soap_client. Also rename the constructor soapclient to soap_client.

This is all that needs to be done. Once you do this you would be able to run NuSoap with PHP5.

Technorati Tags: , ,

Comments

Anonymous said…
its not enough ... you should rename additionally here (~7072 line of code):

$evalStr = 'class soap_proxy_'.$r.' extends soapclient {
'.$evalStr.'
}';
Anonymous said…
that still doesnt do it for me
Anonymous said…
Thanks very handy for you to point that out. I made the 2 changes you initially stated and it works fine for me.
Anonymous said…
I'm tired

I'm angry

I'm gonna kill my IT staff for not telling me the upgraded -- thusly blowing a huge library that worked with NuSoap.

And I found this post.

I love you. Thank you.
Arnie Shore said…
Guys, thanks a bunch - but my install fails to work. Bear with this noob. My changes are:

File: class.soapclient.php

line 25: class soap_client extends nusoap_base {...

line 92: function soap_client($endpoint,...

line 672: $evalStr = 'class soap_proxy_'.$r.' extends soap_client { ...

OK?
VJ said…
Can you tell me whats the error you are getting?
Anonymous said…
I just replaced all "soapclient" to "soap_client". Find and replace in the whole file.
It works great.


I love you too!

:-))))
Sa-rawr said…
Thanks so much for your post, totally helped!!
Anonymous said…
spot on- thank you for the post- I racked my brain for the last 18 hours- until I tried your simple fix.
Matt Montag said…
Too easy. Thanks bro...
Anonymous said…
It's even easier. Just call

nusoap_client
instead of
soapclient
Rad said…
Hi Vivek,

Recently, I have moved content from 'X' server to 'Y' server. 'X' server was using php4.x and 'Y' was asked to use only php5.x.

Now, nusoap web servies were not working. So I did change to work like below.

From:
function UserData(&$userid){
//formed xml arrayobject to return}

To:
function UserData($userid){
//formed xml arrayobject to return}

It works after removing & from input param.

Now I'm facing problem is, if server doesn't have input param, that it's not return array of objects.

Please help me.

Popular posts from this blog

The best mobile development platform for hobbyist programmer

Using Voicemail with Airtel Prepaid Karnataka

And yet more invites for joost