How to turn off warnings when using NUSOAP with PHP 5

Posted on 2010-01-12
Medium Priority
Last Modified: 2013-11-18

How can I turn off warnings on per page basis when using NUSOAP with PHP 5?

I have been trying to convert a NuSOAP WS call to a PHP 5 Soap Extension call but no luck there.
Is there a best practices document that describes the steps to follow for a migration from NuSOAP Client to PHP5 SoapClient?

Attached is a sample NuSOAP Client Call that needs to be upgraded to PHP 5 SoapClient.
Any help with that would be greatly appreciated as my attempts have failed so far :-(

Thanks, D.
 * The code bellow works fine with PHP4 and PHP5 but sends deprecated warnings for PHP5
 * This is a sample NuSOAP code that needs to be translated into PHP5 Soap Extension code 
 * using SoapClient class instead of nusoap_client class.
 * Any help would be greatly appreciated. If you live in the SoCal area I will throw in 
 * Happy Hour drinks ;-)

// This funtion handles the loging part
function sodCall($wsdl, $method, $params) {
    $sodClient = new nusoap_client($wsdl, true);
    $sodClient->response_timeout = 600;

    if ($_SESSION == "" || time() > $_SESSION) {
        $header = '<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/xx/secext">
        $sodResult = $sodClient->call($method, $params,'','',$header);
        $cookies = $sodClient->getCookies();
        $_SESSION = $cookies[0];
    } else {
        $sodClient->setCookie("JSESSIONID", $_SESSION);
        $sodResult = $sodClient->call($method, $params);
    if ($sodResult) {
        $_SESSION = time() + 598; // 10 minute timeout
        return $sodResult;

// variable used for the data retrieval selection
$accountid = 'HE3598-1JGJF';

//body of the soap call
$findLead = array(
    "LeadWS_LeadQueryPage_Input" => array(
        "ListOfLead" => array(
            "Lead" => array(
                "AccountId" => "='$accountid'",
                "LeadId" => "",
                "LeadEmail" => "",
                "ContactId" => "",
                "ContactFullName" => ""
        ), "PageSize" => "100"

//soap call execution
$findLeadResult = sodCall('wsdl/v2/Lead.wsdl','LeadQueryPage',$findLead);
<pre><?php var_dump($findLeadResult);?></pre>

Open in new window

Question by:deve-lopez
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 40

Accepted Solution

Richard Quadling earned 2000 total points
ID: 26319479
You can turn off deprecated warnings ...

error_reporting(error_reporting() & ~E_DEPRECATED);

should do the trick if placed at the beginning of your code and before you include the nusoap class.
LVL 40

Assisted Solution

by:Richard Quadling
Richard Quadling earned 2000 total points
ID: 26390229
Also, depending upon the warnings/errors, you could fix the nusoap class.

What errors are you getting?

Author Closing Comment

ID: 31676274

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question