[TYPO3-german] Re: SOAP und Typo3
S. Dûsel
steffen.duesel at gmail.com
Fri Aug 15 10:21:25 CEST 2014
Lösung:
ControllerAction:
public function showAction()
{
// Typo3 Output-Buffer töten
while(ob_end_clean());
$options = array('uri'=>'http://localhost/test/');
$server = new SoapServer(NULL,$options);
$server->setClass('MyAPI');
$server->handle();
}
Selbe Datei -> Neue Klasse:
class MyAPI {
public function hello() {
return "Hello";
}
}
SoapClient.php:
$options = array('location' => 'http://localhost/test/index.php?type=1127583644',
'uri' => 'http://localhost/');
$api = new SoapClient(NULL, $options);
echo $api->hello();
TypoScript - Root Template:
xmlCon= PAGE
xmlCon{
typeNum = 1127583644
#Extensionname_Pluginname
10 < tt_content.list.20.extendeduser_memberupload
config {
disableAllHeaderCode = 1
additionalHeaders = Content-type:text/xml|Expires: 0|Cache-Control: no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0, FALSE|Pragma: no-cache
xhtml_cleaning = 0
}
}
More information about the TYPO3-german
mailing list