public function toXML(DOMElement $parent) : DOMElement
    {
        if (!is_string($this->getAssertionConsumerServiceURL())) {
            throw new InvalidArgumentException("AssertionConsumerServiceURL must be a string");
        }

        $doc = $parent->ownerDocument;
        $response = $doc->createElementNS(Constants::NS_ECP, 'ecp:Response');

        $parent->appendChild($response);

        $response->setAttributeNS(Constants::NS_SOAP, 'SOAP-ENV:mustUnderstand', '1');
        $response->setAttributeNS(Constants::NS_SOAP, 'SOAP-ENV:actor', 'http://schemas.xmlsoap.org/soap/actor/next');
        $response->setAttribute('AssertionConsumerServiceURL', $this->getAssertionConsumerServiceURL());

        return $response;
    }
public function toXML(DOMElement $parent) : DOMElement
    {
        if (!is_string($this->getAssertionConsumerServiceURL())) {
            throw new InvalidArgumentException("AssertionConsumerServiceURL must be a string");
        }

        $doc = $parent->ownerDocument;
        $response = $doc->createElementNS(Constants::NS_ECP, 'ecp:Response');

        $parent->appendChild($response);

        $response->setAttributeNS(Constants::NS_SOAP, 'SOAP-ENV:mustUnderstand', '1');
        $response->setAttributeNS(Constants::NS_SOAP, 'SOAP-ENV:actor', 'http://schemas.xmlsoap.org/soap/actor/next');
        $response->setAttribute('AssertionConsumerServiceURL', $this->getAssertionConsumerServiceURL());

        return $response;
    }
public function toXML ( DOMElement $ parent ) : DOMElement { if ( ! is_string ( $ this -> getAssertionConsumerServiceURL ( ) ) ) { throw new InvalidArgumentException ( "AssertionConsumerServiceURL must be a string" ) ; } $ doc = $ parent -> ownerDocument ; $ response = $ doc -> createElementNS ( Constants :: NS_ECP , 'ecp:Response' ) ; $ parent -> appendChild ( $ response ) ; $ response -> setAttributeNS ( Constants :: NS_SOAP , 'SOAP-ENV:mustUnderstand' , '1' ) ; $ response -> setAttributeNS ( Constants :: NS_SOAP , 'SOAP-ENV:actor' , 'http://schemas.xmlsoap.org/soap/actor/next' ) ; $ response -> setAttribute ( 'AssertionConsumerServiceURL' , $ this -> getAssertionConsumerServiceURL ( ) ) ; return $ response ; }
Convert this ECP Response to XML.

@param \DOMElement $parent The element we should append this element to.
@throws InvalidArgumentException
@return \DOMElement
Convert this ECP Response to XML .