This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 174815 - PHP SOAP code is slightly wrong
Summary: PHP SOAP code is slightly wrong
Status: NEW
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: Other Linux
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 16:53 UTC by mikedee
Modified: 2013-07-24 08:08 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mikedee 2009-10-17 16:53:26 UTC
If you drag and drop a soap function from the navigator pane the PHP code is not right, it is actually SoapClient not
SOAPClient.

Also if you are using php 5.3 or greater then is it best to use \SoapClient rather than SoapClient in case the user is
in a namespace, the same for Exception.  The correct code would be something like this.  If you can detect a namespace
declaration in the file then it would be even better.

Sorry if this is a bit pedantic :)

try {
    $wsdl_url = 'url';
    $client     = new \SoapClient($wsdl_url);
    $params = array( 
    );
    $return = $client->login($params);
    print_r($return);
} 
catch(\Exception $e) {
    echo "Exception occured: ".$e;
}
Comment 1 Tomas Mysik 2009-10-22 14:19:28 UTC
This functionality is not provided by PHP modules - I guess this is web services area. Please, reassign if I'm wrong.
Thanks.
Comment 2 Denis Anisimov 2010-10-25 10:41:44 UTC
It looks like RFE not a bug.