metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
210 stars 153 forks source link

message: "No valid response class found for request class Metaregistrar\EPP\metaregEppTransferExtendedRequest" #284

Closed Jeroenhulshof closed 3 years ago

Jeroenhulshof commented 3 years ago

transferDomain gives me this error.

        $eppDomain = new eppDomain('domain.nl');
        $eppDomain->setAuthorisationCode('authcode');
        $eppDomain->setRegistrant('registrant');

        $eppDomain->addContact(new \Metaregistrar\EPP\eppContactHandle('contact', \Metaregistrar\EPP\eppContactHandle::CONTACT_TYPE_ADMIN));
        $eppDomain->addContact(new \Metaregistrar\EPP\eppContactHandle('admin', \Metaregistrar\EPP\eppContactHandle::CONTACT_TYPE_TECH));
        $eppDomain->addContact(new \Metaregistrar\EPP\eppContactHandle('tech', \Metaregistrar\EPP\eppContactHandle::CONTACT_TYPE_BILLING));

        $transfer = new metaregEppTransferExtendedRequest(eppTransferRequest::OPERATION_REQUEST, $eppDomain);
        if ($response = $this->sidnConn->request($transfer)) {
            /* @var $response Metaregistrar\EPP\eppTransferResponse */
            echo $response->getDomainName(),"transfer request was succesful\n";
        }

note: I edited out the handles and auth code for obvious reasons.

What am i doing wrong here?

metaregistrar commented 3 years ago

Hi Jeroen,

For this connection, did you create an 'eppConnection' or a 'metaregEppConnection'

You have to create the last one, as it will make sure that all classes and responses are loaded and in place before you use them.

Jeroenhulshof commented 3 years ago

Hi Metaregistrar,

Thanks for the quick reply.

I have an sidnEppConnection set up and is working fine for creating domains etc, but not for transferring domains.

Jeroenhulshof commented 3 years ago

I think i need more coffee. Ofcourse i cannot use metaReg attributes since i'm using sidnEppConnection. I've changed this line:

$transfer = new metaregEppTransferExtendedRequest(eppTransferRequest::OPERATION_REQUEST, $eppDomain)

to

$transfer = new eppTransferRequest(eppTransferRequest::OPERATION_REQUEST, $eppDomain); And it all works as expected. Sorry for opening this issue, it can be deleted or closed.