public function toXML(DOMElement $parent)
 {
     $xml = parent::toXML($parent);
     $xml->setAttributeNS(SAML2_Const::NS_XSI, 'xsi:type', 'myns:MyElement');
     $xml->setAttributeNS('http://example.org/mynsdefinition', 'myns:tmp', 'tmp');
     $xml->removeAttributeNS('http://example.org/mynsdefinition', 'tmp');
     return $xml;
 }
 /**
  * Convert this SecurityTokenServiceType RoleDescriptor to XML.
  *
  * @param DOMElement $parent  The element we should add this contact to.
  * @return DOMElement  The new ContactPerson-element.
  */
 public function toXML(DOMElement $parent)
 {
     assert('is_string($this->Location)');
     $e = parent::toXML($parent);
     $e->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fed', sspmod_adfs_SAML2_XML_fed_Const::NS_FED);
     $e->setAttributeNS(SAML2_Const::NS_XSI, 'xsi:type', 'fed:SecurityTokenServiceType');
     sspmod_adfs_SAML2_XML_fed_TokenTypesOffered::appendXML($e);
     sspmod_adfs_SAML2_XML_fed_Endpoint::appendXML($e, 'SecurityTokenServiceEndpoint', $this->Location);
     sspmod_adfs_SAML2_XML_fed_Endpoint::appendXML($e, 'fed:PassiveRequestorEndpoint', $this->Location);
     return $e;
 }
Exemple #3
0
 /**
  * Add this PDPDescriptor to an EntityDescriptor.
  *
  * @param DOMElement $parent The EntityDescriptor we should append this IDPSSODescriptor to.
  * @return DOMElement
  */
 public function toXML(DOMElement $parent)
 {
     assert('is_array($this->AuthzService)');
     assert('!empty($this->AuthzService)');
     assert('is_array($this->AssertionIDRequestService)');
     assert('is_array($this->NameIDFormat)');
     $e = parent::toXML($parent);
     foreach ($this->AuthzService as $ep) {
         $ep->toXML($e, 'md:AuthzService');
     }
     foreach ($this->AssertionIDRequestService as $ep) {
         $ep->toXML($e, 'md:AssertionIDRequestService');
     }
     SAML2_Utils::addStrings($e, SAML2_Const::NS_MD, 'md:NameIDFormat', FALSE, $this->NameIDFormat);
     return $e;
 }
 /**
  * Add this SSODescriptorType to an EntityDescriptor.
  *
  * @param  DOMElement $parent The EntityDescriptor we should append this SSODescriptorType to.
  * @return DOMElement The generated SSODescriptor DOMElement.
  */
 protected function toXML(DOMElement $parent)
 {
     assert('is_array($this->ArtifactResolutionService)');
     assert('is_array($this->SingleLogoutService)');
     assert('is_array($this->ManageNameIDService)');
     assert('is_array($this->NameIDFormat)');
     $e = parent::toXML($parent);
     foreach ($this->ArtifactResolutionService as $ep) {
         $ep->toXML($e, 'md:ArtifactResolutionService');
     }
     foreach ($this->SingleLogoutService as $ep) {
         $ep->toXML($e, 'md:SingleLogoutService');
     }
     foreach ($this->ManageNameIDService as $ep) {
         $ep->toXML($e, 'md:ManageNameIDService');
     }
     SAML2_Utils::addStrings($e, SAML2_Const::NS_MD, 'md:NameIDFormat', FALSE, $this->NameIDFormat);
     return $e;
 }
 /**
  * Initialize an unknown RoleDescriptor.
  *
  * @param DOMElement $xml  The XML element we should load.
  */
 public function __construct(DOMElement $xml)
 {
     parent::__construct('md:RoleDescriptor', $xml);
     $this->xml = new SAML2_XML_Chunk($xml);
 }