Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services Extension #2

Closed
mCassy opened this issue Apr 17, 2015 · 10 comments
Closed

services Extension #2

mCassy opened this issue Apr 17, 2015 · 10 comments
Assignees
Milestone

Comments

@mCassy
Copy link

mCassy commented Apr 17, 2015

How can I add options ?

<svcsExtension>
@lifeofguenter
Copy link
Member

Hi,

can you give a more broader example? What are you trying to do? Which registrar?

Thank you.

@mCassy
Copy link
Author

mCassy commented Apr 20, 2015

@lifeofguenter . Thank you for respond. I need to send request

<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
    <command>
        <login>
            <clID>login</clID>
            <pw>pass</pw>
            <options>
                <version>1.0</version>
                <lang>en</lang>
            </options>
            <svcs>
                <objURI>http://hostmaster.ua/epp/host-1.1</objURI>
                <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
                <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
                <objURI>http://hostmaster.ua/epp/domain-1.1</objURI>
                <objURI>http://drs.ua/epp/drs-1.0</objURI>
                <objURI>http://hostmaster.ua/epp/contact-1.1</objURI>
                <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
                <svcExtension>
                    <extURI>http://drs.ua/epp/drs-1.0</extURI>
                    <extURI>http://hostmaster.ua/epp/uaepp-1.1</extURI>
                </svcExtension>
            </svcs>
        </login>
        <clTRID>7917b0ee-15c0-4d14-9c10-bdf384e44bbe</clTRID>
    </command>
</epp>

@jbarbede
Copy link
Contributor

+1

Registrar nicmx

<svcs>
    <objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
    <objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
    <objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
    <svcExtension>
        <extURI>http://www.nic.mx/nicmx-msg-1.0</extURI>
        <extURI>http://www.nic.mx/nicmx-res-1.0</extURI>
    </svcExtension>
</svcs>

@lifeofguenter lifeofguenter added this to the 0.1.4 milestone Apr 21, 2015
@lifeofguenter lifeofguenter self-assigned this Apr 21, 2015
@lifeofguenter
Copy link
Member

Please check - it includes a test and an example usage.

@mCassy
Copy link
Author

mCassy commented Apr 23, 2015

@lifeofguenter Thanks a lot. I'm just trying to connect epp.uadns.com :

<?php

error_reporting(E_ALL);
ini_set('display_errors', true);

require 'src/AfriCC/autoload.php';

use AfriCC\EPP\Frame\Command\Login;
use AfriCC\EPP\Client as EPPClient;

if (!isset($_POST['host']))
die("Error");
$host = $_POST['host'];
$user = $_POST['user'];
$pass = $_POST['pass'];
$port = $_POST['port'];


$epp_client = new EPPClient([
    'host' => $host,
    'username' => $user,
    'password' => $pass,
    'services' => [
        'urn:ietf:params:xml:ns:epp-1.0',
    ],
    'debug' => true,
    'port' => $port,
 ]);
$greeting='';
try {
    $greeting = $epp_client->connect();
} catch(Exception $e) {
    echo $e->getMessage() . PHP_EOL;
    unset($epp_client);
    exit(1);
}

$epp_client->close();

Result:

Timeout while reading from EPP Server �[1;31m� domens-mnt-cunic-5538996700cc7 �[0m�[0;32m����[0m�[0;32m�� �[0m
Warning: DOMDocument::loadXML(): Start tag expected, '<' not found in Entity, line: 1 in ..\EPP\Frame\ResponseFactory.php on line 26

I can't find the error

@lifeofguenter lifeofguenter modified the milestones: 0.1.5, 0.1.4 Apr 23, 2015
@lifeofguenter lifeofguenter reopened this Apr 23, 2015
@lifeofguenter
Copy link
Member

Actually I forgot to implement the Client to also use the new feature.

Can you send me via email documentation and sandbox credentials so I can play around?

@jbarbede
Copy link
Contributor

I created a fork with svcExtensions implemented into Client object and NICMX extension. Let me know if I should do a pull request.

I tested last commits, it works fine :-).

@lifeofguenter
Copy link
Member

@jbarbede can you please create a pull request for:

This: jbarbede@9162866 - is pretty good and should be added, but it would also have to be implemented on domain-updates, I suppose?

This: jbarbede@36629cd cannot be automatically merged yet as of yet, I will have to dig into the MX documentation and see what output is being expected and might apply the changes you suggest. In general though I'd be very interested in pulling in additional extensions.

@jbarbede
Copy link
Contributor

@lifeofguenter, I sent you 2 pull requests: svcExtensions + typo fix for the Client, billing contact for domain creation/update.

For NICMX and this change into AbstractFrame, no problem check MX doc and let me know how do you like to implement these specific functions offered by NICMX.

@lifeofguenter
Copy link
Member

Thanks @jbarbede highly appreciated. You might want to maybe add your correct email in your github account/commit config - so your github username will show up under contributors.

I will close here now.

@mCassy: if you still have further problems, please email me: [email protected] with documentation and sandbox credentials.

lifeofguenter added a commit to lifeofguenter/php-epp2 that referenced this issue Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants