Can anyone help? |
Site Admin
|
no, it's not a namespace. It's rather a pointer to the namesapace. Actual namespace for ns2143 in your sample is http://tempuri_org as specified there
xmlns:ns2143="http://tempuri_org" |
||||||||||||
_________________ The PHP IDE team |
|
Thanks for your reply.
So the dafault namespace is http://tempuri_org. How to change this namespace ? Is there any method to do that? Regards Pushparaj. |
||||||||||||
|
Site Admin
|
Could you submit your code there, so I'll show you where to set namespace?
|
||||||||||||
_________________ The PHP IDE team |
|
Hello,
Here is the code which calls the webservice. <?php require_once($cnfIncludesPath.'nusoap/lib/nusoap.php'); $client = new nusoapclient('http://localhost/webservice/publisher_server.php'); $arr_ret_val = $client->call('addPublisherInfo', array( 'strPName' =>'Pushparaj', 'strPAccountType' =>'0' ) ); print_r($arr_ret_val); echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->getDebug(), ENT_QUOTES) . '</pre>'; ?> Here is the webh service server code <?php require_once($cnfIncludesPath.NUSOAP_PATH."nusoap.php"); // Instantiating the soap server class $objServer = new soap_server(); // Configuring the wsdl for this service $objServer->configureWSDL("publisherwsdl","urn:publisherwsdl"); $objServer->wsdl->addComplexType('ResultElement', 'complexType', 'struct', 'all', '', array( 'message'=>array('name'=>'message','type'=>'xsd:string'), 'description'=>array('name'=>'description','type'=>'xsd:string') ) ); $objServer->register('addPublisherInfo', array('strPName' => 'xsd:string', 'strPAccountType' => 'xsd:string', ), // Needs to be an array array('return' => 'tns:ResultElement'), 'urn:publisherwsdl', // namespace 'urn:publisherwsdl#activatePublisher', // soapaction 'rpc', // style 'encoded', // use 'Activate the publisher account ' // documentation ); $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $objServer->service($HTTP_RAW_POST_DATA); ?> Regards Pushparaj |
||||||||||||
|
Site Admin
|
Most probably this is the problem. You specified WRONG url. It must point to WSDL content. Just check with browser to make sure you get WSDL, not "help pages". Normally it is produced when WSDL argument is added, like below $client = new nusoapclient('http://localhost/webservice/publisher_server.php?wsdl', 'wsdl'); but check this URL first using browser: http://localhost/webservice/publisher_server.php?wsdl |
||||||||||||||
_________________ The PHP IDE team |
|
Hi,
Thanks for your reply. I got it. Once i change the url to the wsdl content, it is not pointing to the tempuri_org. Thanks again. Thanks & regards Pushparaj |
||||||||||||
|
Can anyone help? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by