@Test public void simpleHeader() throws PeppolException { LookupClient client = LookupClientBuilder.forMode(testMode) .fetcher(ApacheFetcher.class) .build(); Endpoint endpoint = client.getEndpoint( Header.newInstance() .receiver(ParticipantIdentifier.of("9908:810418052")) .documentType(DocumentTypeIdentifier.of( "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##" + "urn:www.cenbii.eu:transaction:biitrns010:ver2.0" + ":extended:urn:www.peppol.eu:bis:peppol4a:ver2.0::2.1")) .process(ProcessIdentifier.of("urn:www.cenbii.eu:profile:bii04:ver2.0")), TransportProfile.AS2_1_0); assertNotNull(endpoint); }
public Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier, TransportProfile... transportProfiles) throws PeppolSecurityException, EndpointNotFoundException { Endpoint endpoint = serviceMetadata.getEndpoint(processIdentifier, transportProfiles); validator.validate(Service.AP, endpoint.getCertificate()); return endpoint; }
LookupClient { public Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier, TransportProfile... transportProfiles) throws PeppolSecurityException, EndpointNotFoundException { Endpoint endpoint = serviceMetadata.getEndpoint(processIdentifier, transportProfiles); validator.validate(Service.AP, endpoint.getCertificate()); return endpoint; } }
LookupClient { public Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier, TransportProfile... transportProfiles) throws PeppolSecurityException, EndpointNotFoundException { Endpoint endpoint = serviceMetadata.getEndpoint(processIdentifier, transportProfiles); validator.validate(Service.AP, endpoint.getCertificate()); return endpoint; } protected  LookupClient(LookupClientBuilder builder); }
LookupClient { public Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier, TransportProfile... transportProfiles) throws PeppolSecurityException, EndpointNotFoundException { Endpoint endpoint = serviceMetadata.getEndpoint(processIdentifier, transportProfiles); validator.validate(Service.AP, endpoint.getCertificate()); return endpoint; } protected  LookupClient(LookupClientBuilder builder); List<ServiceReference> getServiceReferences(ParticipantIdentifier participantIdentifier); List<DocumentTypeIdentifier> getDocumentIdentifiers(ParticipantIdentifier participantIdentifier); ServiceMetadata getServiceMetadata(ParticipantIdentifier participantIdentifier,
                                              DocumentTypeIdentifier documentTypeIdentifier); Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier,
                                TransportProfile... transportProfiles); Endpoint getEndpoint(ParticipantIdentifier participantIdentifier,
                                DocumentTypeIdentifier documentTypeIdentifier, ProcessIdentifier processIdentifier,
                                TransportProfile... transportProfiles); Endpoint getEndpoint(Header header, TransportProfile... transportProfiles); }
LookupClient { public Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier, TransportProfile... transportProfiles) throws PeppolSecurityException, EndpointNotFoundException { Endpoint endpoint = serviceMetadata.getEndpoint(processIdentifier, transportProfiles); validator.validate(Service.AP, endpoint.getCertificate()); return endpoint; } protected  LookupClient(LookupClientBuilder builder); List<ServiceReference> getServiceReferences(ParticipantIdentifier participantIdentifier); List<DocumentTypeIdentifier> getDocumentIdentifiers(ParticipantIdentifier participantIdentifier); ServiceMetadata getServiceMetadata(ParticipantIdentifier participantIdentifier,
                                              DocumentTypeIdentifier documentTypeIdentifier); Endpoint getEndpoint(ServiceMetadata serviceMetadata, ProcessIdentifier processIdentifier,
                                TransportProfile... transportProfiles); Endpoint getEndpoint(ParticipantIdentifier participantIdentifier,
                                DocumentTypeIdentifier documentTypeIdentifier, ProcessIdentifier processIdentifier,
                                TransportProfile... transportProfiles); Endpoint getEndpoint(Header header, TransportProfile... transportProfiles);  }