|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by ramzaro in SOAP, Web Services Description Language, PHP Scripting Language
Hi,
I have created a nusoap server using the code below(PHP), after referring to
http://www.scottnichol.com/nusoapprogwsdl.htmIt should return xml for wsdl as in the example but it return like in the picture indeed,
which return "This XML file does not appear to have any style information associated with it. The document tree is shown below"
The effect:
When i try to connect via asp.net, it return same error, "This XML file does not appear to have any style information associated with it. The document tree is shown below". So i believe it has something to do with the xml style information.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
|
<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the server instance
$server = new soap_server();
// Initialize WSDL support
$server->configureWSDL('hellowsdl', 'urn:hellowsdl');
// Register the method to expose
$server->register('hello', // method name
array('name' => 'xsd:string'), // input parameters
array('return' => 'xsd:string'), // output parameters
'urn:hellowsdl', // namespace
'urn:hellowsdl#hello', // soapaction
'rpc', // style
'encoded', // use
'Says hello to the caller' // documentation
);
// Define the method as a PHP function
function hello($name) {
return 'Hello, ' . $name;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>
|
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625