19 <?xml version=
"1.0" encoding=
"utf-8"?>
20 <
SOAP-ENV:Envelope xmlns:
SOAP-ENV=
"%s">
25 $envelope = sprintf($envelope, Constants::NS_SOAP);
28 $doc->loadXML($envelope);
34 $header = $doc->getElementsByTagNameNS(Constants::NS_SOAP,
'Header')->item(0);
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);
70 $xml = $this->getOutputToSend($message);
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');
send(Message $message)
Send a SAML 2 message using the SOAP binding.
Class representing the ECP Response element.
toSignedXML()
Convert this message to a signed XML document.
receive()
Receive a SAML 2 message sent using the HTTP-POST binding.
Base class for all SAML 2 messages.
catch(Exception $e) $message
getOutputToSend(Message $message)
Add a drawing to the header
getDestination()
Retrieve the destination of this message.