ausregistry / ari-toolkit Goto Github PK
View Code? Open in Web Editor NEWClient-side libraries that implement the core EPP specifications, the domain, host and contact mappings of the specifications, and mappings for extensions operated by ARI.
Client-side libraries that implement the core EPP specifications, the domain, host and contact mappings of the specifications, and mappings for extensions operated by ARI.
The toolkit properties file supports a setting "xml.validation.enable" which defaults to true.
HOWEVER, setting this to false doesn't actually work.
The reason is that com.ausregistry.jtoolkit2.xml.EPPWriter has this line in a static initializer block:
EPPSchemaProvider.setValidating(true);
This gets called during SessionManager's startup() method, which happens after configuration has been applied. So if you had set xml.validation.enable=false, then EPPWriter will turn validation right back on during startup().
Not really sure why its hard-coded in EPPWriter, but this makes it impossible to turn off XML schema validation.
Following code, causes registry to reject the command
DomainCreateCommand command = new DomainCreateCommand(domainName, username, pass, contacts);
DomainCreateResponse response = new DomainCreateResponse();
byte[] base64EncodedPart = TmchXmlParser.extractBase64EncodedPartFromSmdFile(
new FileInputStream(pathToSMD));
TmchDomainCreateCommandExtension extension = new TmchDomainCreateCommandExtension();
extension.setEncodedSignedMarkData(new String(base64EncodedPart));
command.appendExtension(extension);
logger.info(command.toXML());
sessionManager.execute(new Transaction(command, response));
return response;
This returns following XML as response:
<?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">
<response>
<result code="2103">
<msg lang="en">Unimplemented extension</msg>
<extValue>
<value>
<undef/>
</value>
<reason lang="en">urn:ar:params:xml:ns:tmch-1.0</reason>
</extValue>
</result>
<trID>
<clTRID>X</clTRID>
<svTRID>X</svTRID>
</trID>
</response>
</epp>
When i follow the demo example to just send a DomainCheckCommand (https://github.com/AusRegistry/ari-toolkit/blob/master/src/main/java/com/ausregistry/jtoolkit2/demo/DomainCheckDemo.java) it works to send the hello and greeting command and to perform the login with "manager.startup()". But when i send the DomainCheckCommand i get an "SEVERE: Read timed out"
This is the console output when i run the demo:
Apr 20, 2017 9:48:16 AM com.ausregistry.jtoolkit2.session.SessionManagerImpl doConfigure
INFO: Logging configured from file: null
Apr 20, 2017 9:48:16 AM com.ausregistry.jtoolkit2.session.SessionManagerImpl startup
INFO: Startup
Apr 20, 2017 9:48:16 AM com.ausregistry.jtoolkit2.xml.XMLWriter toXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><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><poll op="req"/><clTRID>.20170420.094816.0</clTRID></command></epp>
Apr 20, 2017 9:48:20 AM com.ausregistry.jtoolkit2.session.TLSSession read
INFO: <?xml version="1.0" encoding="utf-8"?>
<epp xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:obj="urn:ietf:params:xml:ns:obj-1.0" xmlns="urn:ietf:params:xml:ns:epp-1.0">
<greeting>
<svID>Ficora EPP Server</svID>
<svDate>2017-04-20T10:48:19.8293692+03:00</svDate>
<svcMenu>
<version>1.0</version>
<lang>en</lang>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:nsset-1.2</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:domain-ext-1.0</extURI>
</svcExtension>
</svcMenu>
<dcp>
<access>
<personal />
</access>
<statement>
<purpose>
<prov />
</purpose>
<recipient>
<ours />
<public />
</recipient>
<retention>
<stated />
</retention>
</statement>
</dcp>
</greeting>
</epp>
Apr 20, 2017 9:48:20 AM com.ausregistry.jtoolkit2.xml.XMLWriter toXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:obj="urn:ietf:params:xml:ns:obj-1.0">
<greeting>
<svID>Ficora EPP Server</svID>
<svDate>2017-04-20T10:48:19.8293692+03:00</svDate>
<svcMenu>
<version>1.0</version>
<lang>en</lang>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:nsset-1.2</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:domain-ext-1.0</extURI>
</svcExtension>
</svcMenu>
<dcp>
<access>
<personal/>
</access>
<statement>
<purpose>
<prov/>
</purpose>
<recipient>
<ours/>
<public/>
</recipient>
<retention>
<stated/>
</retention>
</statement>
</dcp>
</greeting>
</epp>
Apr 20, 2017 9:48:20 AM com.ausregistry.jtoolkit2.se.Greeting fromXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:obj="urn:ietf:params:xml:ns:obj-1.0">
<greeting>
<svID>Ficora EPP Server</svID>
<svDate>2017-04-20T10:48:19.8293692+03:00</svDate>
<svcMenu>
<version>1.0</version>
<lang>en</lang>
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:nsset-1.2</objURI>
<objURI>urn:ietf:params:xml:ns:domain-1.0</objURI>
<svcExtension>
<extURI>urn:ietf:params:xml:ns:secDNS-1.1</extURI>
<extURI>urn:ietf:params:xml:ns:domain-ext-1.0</extURI>
</svcExtension>
</svcMenu>
<dcp>
<access>
<personal/>
</access>
<statement>
<purpose>
<prov/>
</purpose>
<recipient>
<ours/>
<public/>
</recipient>
<retention>
<stated/>
</retention>
</statement>
</dcp>
</greeting>
</epp>
Apr 20, 2017 9:48:20 AM com.ausregistry.jtoolkit2.se.Greeting fromXML
INFO: (svID = Ficora EPP Server)(svDate = java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=false,lenient=true,zone=sun.util.calendar.ZoneInfo[id="UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2017,MONTH=3,WEEK_OF_YEAR=1,WEEK_OF_MONTH=1,DAY_OF_MONTH=20,DAY_OF_YEAR=1,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=10,MINUTE=48,SECOND=19,MILLISECOND=829,ZONE_OFFSET=10800000,DST_OFFSET=0])(versions = (1.0))(languages = (en))(objURIs = (urn:ietf:params:xml:ns:contact-1.0,urn:ietf:params:xml:ns:nsset-1.2,urn:ietf:params:xml:ns:domain-1.0))
Apr 20, 2017 9:48:20 AM com.ausregistry.jtoolkit2.xml.XMLWriter toXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><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>clID</clID><pw>password</pw><options><version>1.0</version><lang>en</lang></options><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></svcs></login><clTRID>clID.20170420.094820.0</clTRID></command></epp>
Apr 20, 2017 9:48:24 AM com.ausregistry.jtoolkit2.session.TLSSession read
INFO: <?xml version="1.0" encoding="utf-8"?>
<epp xmlns:host="urn:ietf:params:xml:ns:host-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xmlns:obj="urn:ietf:params:xml:ns:obj-1.0" xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<trID>
<clTRID>clID.20170420.094820.0</clTRID>
<svTRID>h0wpmaw</svTRID>
</trID>
</response>
</epp>
Apr 20, 2017 9:48:24 AM com.ausregistry.jtoolkit2.session.TLSSession recordResponseTime
INFO: Response time for transaction of type login [3991ms] (first use).
Apr 20, 2017 9:48:24 AM com.ausregistry.jtoolkit2.xml.XMLWriter toXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><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><check><check xmlns="urn:ietf:params:xml:ns:domain-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd"><name>test.fi</name></check></check><clTRID>clID.20170420.094824.1</clTRID></command></epp>
Apr 20, 2017 9:48:54 AM com.ausregistry.jtoolkit2.session.TLSSession read
SEVERE: Read timed out
Apr 20, 2017 9:48:54 AM com.ausregistry.jtoolkit2.session.TLSSession read
SEVERE: Socket timeout occurred while trying to read data from an EPP session.
Apr 20, 2017 9:48:54 AM com.ausregistry.jtoolkit2.session.SessionManagerImpl execute
WARNING: Read timed out
Apr 20, 2017 9:48:54 AM com.ausregistry.jtoolkit2.session.SessionManagerImpl execute
WARNING: net.socket.closed
Apr 20, 2017 9:48:54 AM com.ausregistry.jtoolkit2.xml.XMLWriter toXML
INFO: <?xml version="1.0" encoding="UTF-8"?><!--ari java toolkit v3.7.3--><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><logout/><clTRID>clID.20170420.094854.2</clTRID></command></epp>
Apr 20, 2017 9:49:24 AM com.ausregistry.jtoolkit2.session.TLSSession read
SEVERE: Read timed out
Apr 20, 2017 9:49:24 AM com.ausregistry.jtoolkit2.session.TLSSession read
SEVERE: Socket timeout occurred while trying to read data from an EPP session.
Apr 20, 2017 9:49:24 AM com.ausregistry.jtoolkit2.session.TLSSession close
INFO: Read timed out
Apr 20, 2017 9:49:24 AM com.ausregistry.jtoolkit2.session.TLSSession close
INFO: Failed to write to socket; already closed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.