@Test public void simple() throws LookupException { assertEquals(busdoxLocator.lookup("9908:991825827").getHost(), "B-770c6f5843e9e302de47ae4026307076.iso6523-actorid-upis.edelivery.tech.ec.europa.eu"); }
@Override public URI lookup(ParticipantIdentifier participantIdentifier) throws LookupException { String hostname = hostnameGenerator.generate(participantIdentifier); try { final Lookup lookup = new Lookup(hostname); if (lookup.run() == null) { if(lookup.getResult() == Lookup.HOST_NOT_FOUND) { throw new NotFoundException( String.format("Identifier '%s' is not registered in SML.", participantIdentifier.getIdentifier())); } else { throw new LookupException( String.format("Error when looking up identifier '%s' in SML.", participantIdentifier.getIdentifier())); } } } catch (TextParseException e) { throw new LookupException(e.getMessage(), e); } return URI.create(String.format("http: }
BusdoxLocator extends AbstractLocator { @Override public URI lookup(ParticipantIdentifier participantIdentifier) throws LookupException { String hostname = hostnameGenerator.generate(participantIdentifier); try { final Lookup lookup = new Lookup(hostname); if (lookup.run() == null) { if(lookup.getResult() == Lookup.HOST_NOT_FOUND) { throw new NotFoundException( String.format("Identifier '%s' is not registered in SML.", participantIdentifier.getIdentifier())); } else { throw new LookupException( String.format("Error when looking up identifier '%s' in SML.", participantIdentifier.getIdentifier())); } } } catch (TextParseException e) { throw new LookupException(e.getMessage(), e); } return URI.create(String.format("http: } }
BusdoxLocator extends AbstractLocator { @Override public URI lookup(ParticipantIdentifier participantIdentifier) throws LookupException { String hostname = hostnameGenerator.generate(participantIdentifier); try { final Lookup lookup = new Lookup(hostname); if (lookup.run() == null) { if(lookup.getResult() == Lookup.HOST_NOT_FOUND) { throw new NotFoundException( String.format("Identifier '%s' is not registered in SML.", participantIdentifier.getIdentifier())); } else { throw new LookupException( String.format("Error when looking up identifier '%s' in SML.", participantIdentifier.getIdentifier())); } } } catch (TextParseException e) { throw new LookupException(e.getMessage(), e); } return URI.create(String.format("http: } BusdoxLocator(Mode mode); @SuppressWarnings("unused")  BusdoxLocator(String hostname);  BusdoxLocator(String prefix, String hostname, String algorithm); }
BusdoxLocator extends AbstractLocator { @Override public URI lookup(ParticipantIdentifier participantIdentifier) throws LookupException { String hostname = hostnameGenerator.generate(participantIdentifier); try { final Lookup lookup = new Lookup(hostname); if (lookup.run() == null) { if(lookup.getResult() == Lookup.HOST_NOT_FOUND) { throw new NotFoundException( String.format("Identifier '%s' is not registered in SML.", participantIdentifier.getIdentifier())); } else { throw new LookupException( String.format("Error when looking up identifier '%s' in SML.", participantIdentifier.getIdentifier())); } } } catch (TextParseException e) { throw new LookupException(e.getMessage(), e); } return URI.create(String.format("http: } BusdoxLocator(Mode mode); @SuppressWarnings("unused")  BusdoxLocator(String hostname);  BusdoxLocator(String prefix, String hostname, String algorithm); @Override URI lookup(ParticipantIdentifier participantIdentifier); }
BusdoxLocator extends AbstractLocator { @Override public URI lookup(ParticipantIdentifier participantIdentifier) throws LookupException { String hostname = hostnameGenerator.generate(participantIdentifier); try { final Lookup lookup = new Lookup(hostname); if (lookup.run() == null) { if(lookup.getResult() == Lookup.HOST_NOT_FOUND) { throw new NotFoundException( String.format("Identifier '%s' is not registered in SML.", participantIdentifier.getIdentifier())); } else { throw new LookupException( String.format("Error when looking up identifier '%s' in SML.", participantIdentifier.getIdentifier())); } } } catch (TextParseException e) { throw new LookupException(e.getMessage(), e); } return URI.create(String.format("http: } BusdoxLocator(Mode mode); @SuppressWarnings("unused")  BusdoxLocator(String hostname);  BusdoxLocator(String prefix, String hostname, String algorithm); @Override URI lookup(ParticipantIdentifier participantIdentifier);  }