19<?xml version=
"1.0" encoding=
"utf-8"?>
20<
SOAP-ENV:Envelope xmlns:
SOAP-ENV=
"%s">
25 $envelope =
sprintf($envelope, Constants::NS_SOAP);
27 $doc =
new DOMDocument;
28 $doc->loadXML($envelope);
34 $header = $doc->getElementsByTagNameNS(Constants::NS_SOAP,
'Header')->item(0);
37 $response->AssertionConsumerServiceURL = $this->getDestination() ?:
$message->getDestination();
50 $body = $doc->getElementsByTagNameNs(Constants::NS_SOAP,
'Body')->item(0);
52 $body->appendChild($doc->importNode(
$message->toSignedXML(),
true));
54 return $doc->saveXML();
68 header(
'Content-Type: text/xml',
true);
71 Utils::getContainer()->debugMessage(
$xml,
'out');
87 $postText = $this->getInputStream();
89 if (empty($postText)) {
90 throw new \Exception(
'Invalid message received to AssertionConsumerService endpoint.');
93 $document = DOMDocumentFactory::fromString($postText);
94 $xml = $document->firstChild;
95 Utils::getContainer()->debugMessage(
$xml,
'in');
96 $results = Utils::xpQuery(
$xml,
'/soap-env:Envelope/soap-env:Body/*[1]');
98 return Message::fromXML(
$results[0]);
103 return file_get_contents(
'php://input');
sprintf('%.4f', $callTime)
An exception for terminatinating execution or to throw for unit testing.
Base class for all SAML 2 messages.
getOutputToSend(Message $message)
receive()
Receive a SAML 2 message sent using the HTTP-POST binding.
send(Message $message)
Send a SAML 2 message using the SOAP binding.
Class representing the ECP Response element.
catch(Exception $e) $message