0

I set up a simple soap server with zend. I use an example I found. I try out many solutions, but I still get the error:

This page contains the following errors:
error on line 2 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.

PHP log say

Warning:  DOMDocument::saveXML() domdocument.savexml invalid character value in 
/usr/share/ZendFramework-1.11.11/library/Zend/Soap/Wsdl.php on line 506

Here is my code:

ini_set("soap.wsdl_cache_enabled", 0); // disabling WSDL cache
require 'Zend/Loader/Autoloader.php';
require 'Zend/Soap/Server.php';
require 'Zend/Soap/AutoDiscover.php';
require 'Zend/Soap/Client.php';

$wsdl_uri = 'http://MY-URL/soap.php?wsdl=1';

$wsdl = new Zend_Soap_Autodiscover();
$wsdl->setClass('MeinWebservice');

if (isset($_GET['wsdl'])) {
    $wsdl->handle();
} else {
    $server = new Zend_Soap_Server($wsdl_uri);
    $server->setClass('MeinWebservice');
    $server->handle();
}

class MeinWebservice {

    /**
     * Gibt den Wert mal 10 zurück
     *
     * @param int $inputParam
     * @return int
     */
    public function test1($inputParam) {
        return $inputParam * 10;
    }

    /**
     * Addiert die Werte
     *
     * @param int $inputParam1
     * @param int $inputParam2
     * @return int
     */
    public function test2($inputParam1, $inputParam2) {
        return $inputParam1 + $inputParam2;
    }
}

What am I doing wrong?

4

1 回答 1

0

嗯。似乎是固定的。不知道为什么。我再次设置了肥皂脚本。

于 2012-05-28T21:52:54.060 回答