Toon posts:

[PHP/SOAP] voorbeeld uit readme.txt van NuSOAP lukt niet

Pagina: 1
Acties:
  • 40 views sinds 30-01-2008

Verwijderd

Topicstarter
Ik heb NuSOAP gedownload om ook eens met SOAP te spelen. Maar het loopt al mis met het standaardvoorbeeld, dit is mijn output:

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
<?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, uit de readme.txt bij NuSOAP:

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? |:(

  • Tux
  • Registratie: Augustus 2001
  • Laatst online: 06:37

Tux

Misschien met $_POST werken ipv $HTTP_RAW_POST_DATA :)

The NS has launched a new space transportation service, using German trains which were upgraded into spaceships.


  • .oisyn
  • Registratie: September 2000
  • Laatst online: 10:25

.oisyn

Moderator Devschuur®

Demotivational Speaker

Give a man a game and he'll have fun for a day. Teach a man to make games and he'll never have fun again.


Dit topic is gesloten.