Ik heb NuSOAP gedownload om ook eens met SOAP te spelen. Maar het loopt al mis met het standaardvoorbeeld, dit is mijn output:
Dit is de brondcode van de php-script:
Zie ik iets over het hoofd?
XML:
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
26
27
28
29
30
31
| <?xml version="1.0" ?> - <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:si="http://soapinterop.org/xsd"> - <SOAP-ENV:Body> - <SOAP-ENV:Fault> <faultcode>Server</faultcode> <faultactor>method '' not defined in service ''</faultactor> <faultstring /> - <detail> <soapVal xsi:type="xsd:string" /> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> - <!-- soap_server: entering parseRequest() on 16:40 2004-01-30 soap_server: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */* soap_server: Accept-Language: en,nl;q=0.5 soap_server: Accept-Encoding: gzip, deflate soap_server: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) soap_server: Host: coen2 soap_server: got encoding: UTF-8 soap_server: method name: soap_server: method '' not found! soap_server: parser debug: soap_parser: xml was empty, didn't parse! soap_server: server sending... --> |
Dit is de brondcode van de php-script:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| <?php require_once('nusoap.php'); $s = new soap_server; $s->register('hello'); function hello($name){ // optionally catch an error and return a fault if($name == ''){ return new soap_fault('Client','','Must supply a valid name.'); } return "hello $name!"; } $s->service($HTTP_RAW_POST_DATA); ?> |
Zie ik iets over het hoofd?