Search in sources :

Example 11 with ISMPServiceGroupManager

use of com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager in project phoss-smp by phax.

the class ServiceMetadataInterfaceTest method testCreateAndDeleteRedirectSMPClient.

@Test
public void testCreateAndDeleteRedirectSMPClient() throws SMPClientException {
    // Lower case
    final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:xxx");
    // Upper case
    final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:XXX");
    final IDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_EN16931_PEPPOL_V30.getAsDocumentTypeIdentifier();
    final ServiceGroupType aSG = new ServiceGroupType();
    aSG.setParticipantIdentifier(new SimpleParticipantIdentifier(aPI_LC));
    aSG.setServiceMetadataReferenceCollection(new ServiceMetadataReferenceCollectionType());
    final RedirectType aRedir = _createRedirect();
    final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr();
    final ISMPRedirectManager aSRMgr = SMPMetaManager.getRedirectMgr();
    final SMPClient aSMPClient = new MockSMPClient();
    assertNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
    assertNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
    assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
    assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
    try {
        // PUT ServiceGroup
        aSMPClient.saveServiceGroup(aSG, CREDENTIALS);
        assertNotNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
        assertNotNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
        assertTrue(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
        assertTrue(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
        final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID(aPI_LC);
        assertNotNull(aServiceGroup);
        final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID(aPI_UC);
        assertEquals(aServiceGroup, aServiceGroup_UC);
        try {
            // PUT 1 ServiceInformation
            aSMPClient.saveServiceRedirect(aPI_LC, aDT, aRedir, CREDENTIALS);
            assertNotNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // PUT 2 ServiceInformation
            aSMPClient.saveServiceRedirect(aPI_LC, aDT, aRedir, CREDENTIALS);
            assertNotNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // DELETE 1 Redirect
            aSMPClient.deleteServiceRegistration(aPI_LC, aDT, CREDENTIALS);
            assertNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        } finally {
            // DELETE 2 Redirect
            try {
                aSMPClient.deleteServiceRegistration(aPI_LC, aDT, CREDENTIALS);
            } catch (final SMPClientNotFoundException ex) {
            // Expected
            }
            assertNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        }
        assertNotNull(aSGMgr.getSMPServiceGroupOfID(aPI_LC));
    } finally {
        // DELETE ServiceGroup
        try {
            aSMPClient.deleteServiceGroup(aPI_LC, CREDENTIALS);
        } catch (final SMPClientNotFoundException ex) {
        // Expected
        }
        assertNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
        assertNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
    }
}
Also used : MockSMPClient(com.helger.phoss.smp.mock.MockSMPClient) SMPClientNotFoundException(com.helger.smpclient.exception.SMPClientNotFoundException) ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ISMPRedirectManager(com.helger.phoss.smp.domain.redirect.ISMPRedirectManager) ServiceMetadataReferenceCollectionType(com.helger.xsds.peppol.smp1.ServiceMetadataReferenceCollectionType) SMPClient(com.helger.smpclient.peppol.SMPClient) MockSMPClient(com.helger.phoss.smp.mock.MockSMPClient) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) ServiceGroupType(com.helger.xsds.peppol.smp1.ServiceGroupType) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) RedirectType(com.helger.xsds.peppol.smp1.RedirectType) Test(org.junit.Test)

Example 12 with ISMPServiceGroupManager

use of com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager in project phoss-smp by phax.

the class ServiceMetadataInterfaceTest method testCreateAndDeleteServiceInformationSMPClient.

@Test
public void testCreateAndDeleteServiceInformationSMPClient() throws SMPClientException {
    // Lower case
    final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:xxx");
    // Upper case
    final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:XXX");
    final PeppolDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_EN16931_PEPPOL_V30.getAsDocumentTypeIdentifier();
    final PeppolProcessIdentifier aProcID = EPredefinedProcessIdentifier.BIS3_BILLING.getAsProcessIdentifier();
    final ServiceGroupType aSG = new ServiceGroupType();
    aSG.setParticipantIdentifier(new SimpleParticipantIdentifier(aPI_LC));
    aSG.setServiceMetadataReferenceCollection(new ServiceMetadataReferenceCollectionType());
    final ServiceInformationType aSI = new ServiceInformationType();
    aSI.setParticipantIdentifier(new SimpleParticipantIdentifier(aPI_LC));
    aSI.setDocumentIdentifier(aDT);
    {
        final ProcessListType aPL = new ProcessListType();
        final ProcessType aProcess = new ProcessType();
        aProcess.setProcessIdentifier(aProcID);
        final ServiceEndpointList aSEL = new ServiceEndpointList();
        final EndpointType aEndpoint = new EndpointType();
        aEndpoint.setEndpointReference(W3CEndpointReferenceHelper.createEndpointReference("http://test.smpserver/as2"));
        aEndpoint.setRequireBusinessLevelSignature(false);
        aEndpoint.setCertificate("blacert");
        aEndpoint.setServiceDescription("Unit test service");
        aEndpoint.setTechnicalContactUrl("https://github.com/phax/phoss-smp");
        aEndpoint.setTransportProfile(ESMPTransportProfile.TRANSPORT_PROFILE_AS2.getID());
        aSEL.addEndpoint(aEndpoint);
        aProcess.setServiceEndpointList(aSEL);
        aPL.addProcess(aProcess);
        aSI.setProcessList(aPL);
    }
    final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr();
    final ISMPServiceInformationManager aSIMgr = SMPMetaManager.getServiceInformationMgr();
    final SMPClient aSMPClient = new MockSMPClient();
    assertNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
    assertNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
    assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
    assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
    try {
        // PUT ServiceGroup
        aSMPClient.saveServiceGroup(aSG, CREDENTIALS);
        // Read both
        assertNotNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
        assertNotNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
        assertTrue(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
        assertTrue(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
        final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID(aPI_LC);
        assertNotNull(aServiceGroup);
        final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID(aPI_UC);
        assertEquals(aServiceGroup, aServiceGroup_UC);
        try {
            // PUT 1 ServiceInformation
            aSMPClient.saveServiceInformation(aSI, CREDENTIALS);
            assertNotNull(aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // PUT 2 ServiceInformation
            aSMPClient.saveServiceInformation(aSI, CREDENTIALS);
            assertNotNull(aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // DELETE 1 ServiceInformation
            aSMPClient.deleteServiceRegistration(aPI_LC, aDT, CREDENTIALS);
            assertNull(aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        } finally {
            // DELETE 2 ServiceInformation
            try {
                aSMPClient.deleteServiceRegistration(aPI_LC, aDT, CREDENTIALS);
            } catch (final SMPClientNotFoundException ex) {
            // Expected
            }
            assertNull(aSIMgr.getSMPServiceInformationOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        }
        assertNotNull(aSMPClient.getServiceGroup(aPI_LC));
    } finally {
        // DELETE ServiceGroup
        try {
            aSMPClient.deleteServiceGroup(aPI_LC, CREDENTIALS);
        } catch (final SMPClientNotFoundException ex) {
        // Expected
        }
        assertNull(aSMPClient.getServiceGroupOrNull(aPI_LC));
        assertNull(aSMPClient.getServiceGroupOrNull(aPI_UC));
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
    }
}
Also used : ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ISMPServiceInformationManager(com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformationManager) ServiceMetadataReferenceCollectionType(com.helger.xsds.peppol.smp1.ServiceMetadataReferenceCollectionType) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) PeppolProcessIdentifier(com.helger.peppolid.peppol.process.PeppolProcessIdentifier) ServiceInformationType(com.helger.xsds.peppol.smp1.ServiceInformationType) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) MockSMPClient(com.helger.phoss.smp.mock.MockSMPClient) SMPClientNotFoundException(com.helger.smpclient.exception.SMPClientNotFoundException) ProcessType(com.helger.xsds.peppol.smp1.ProcessType) SMPClient(com.helger.smpclient.peppol.SMPClient) MockSMPClient(com.helger.phoss.smp.mock.MockSMPClient) PeppolDocumentTypeIdentifier(com.helger.peppolid.peppol.doctype.PeppolDocumentTypeIdentifier) EndpointType(com.helger.xsds.peppol.smp1.EndpointType) ProcessListType(com.helger.xsds.peppol.smp1.ProcessListType) ServiceGroupType(com.helger.xsds.peppol.smp1.ServiceGroupType) ServiceEndpointList(com.helger.xsds.peppol.smp1.ServiceEndpointList) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Test(org.junit.Test)

Example 13 with ISMPServiceGroupManager

use of com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager in project phoss-smp by phax.

the class ServiceMetadataInterfaceTest method testCreateAndDeleteRedirectJerseyClient.

@Test
public void testCreateAndDeleteRedirectJerseyClient() {
    // Lower case
    final IParticipantIdentifier aPI_LC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:xxx");
    final String sPI_LC = aPI_LC.getURIEncoded();
    // Upper case
    final IParticipantIdentifier aPI_UC = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme("9915:XXX");
    final String sPI_UC = aPI_UC.getURIEncoded();
    final IDocumentTypeIdentifier aDT = EPredefinedDocumentTypeIdentifier.INVOICE_EN16931_PEPPOL_V30.getAsDocumentTypeIdentifier();
    final String sDT = aDT.getURIEncoded();
    final ServiceGroupType aSG = new ServiceGroupType();
    aSG.setParticipantIdentifier(new SimpleParticipantIdentifier(aPI_LC));
    aSG.setServiceMetadataReferenceCollection(new ServiceMetadataReferenceCollectionType());
    final ServiceMetadataType aSM = new ServiceMetadataType();
    aSM.setRedirect(_createRedirect());
    final ISMPServiceGroupManager aSGMgr = SMPMetaManager.getServiceGroupMgr();
    final ISMPRedirectManager aSRMgr = SMPMetaManager.getRedirectMgr();
    final WebTarget aTarget = ClientBuilder.newClient().target(m_aRule.getFullURL());
    Response aResponseMsg;
    _testResponseJerseyClient(aTarget.path(sPI_LC).request().get(), 404);
    _testResponseJerseyClient(aTarget.path(sPI_UC).request().get(), 404);
    try {
        // PUT ServiceGroup
        aResponseMsg = _addCredentials(aTarget.path(sPI_LC).request()).put(Entity.xml(m_aObjFactory.createServiceGroup(aSG)));
        _testResponseJerseyClient(aResponseMsg, 200);
        assertNotNull(aTarget.path(sPI_LC).request().get(ServiceGroupType.class));
        assertNotNull(aTarget.path(sPI_UC).request().get(ServiceGroupType.class));
        final ISMPServiceGroup aServiceGroup = aSGMgr.getSMPServiceGroupOfID(aPI_LC);
        assertNotNull(aServiceGroup);
        final ISMPServiceGroup aServiceGroup_UC = aSGMgr.getSMPServiceGroupOfID(aPI_UC);
        assertEquals(aServiceGroup, aServiceGroup_UC);
        try {
            // PUT 1 ServiceInformation
            aResponseMsg = _addCredentials(aTarget.path(sPI_LC).path("services").path(sDT).request()).put(Entity.xml(m_aObjFactory.createServiceMetadata(aSM)));
            _testResponseJerseyClient(aResponseMsg, 200);
            assertNotNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // PUT 2 ServiceInformation
            aResponseMsg = _addCredentials(aTarget.path(sPI_LC).path("services").path(sDT).request()).put(Entity.xml(m_aObjFactory.createServiceMetadata(aSM)));
            _testResponseJerseyClient(aResponseMsg, 200);
            assertNotNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
            // DELETE 1 Redirect
            aResponseMsg = _addCredentials(aTarget.path(sPI_LC).path("services").path(sDT).request()).delete();
            _testResponseJerseyClient(aResponseMsg, 200);
            assertNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        } finally {
            // DELETE 2 Redirect
            aResponseMsg = _addCredentials(aTarget.path(sPI_LC).path("services").path(sDT).request()).delete();
            _testResponseJerseyClient(aResponseMsg, 200, 404);
            assertNull(aSRMgr.getSMPRedirectOfServiceGroupAndDocumentType(aServiceGroup, aDT));
        }
        assertNotNull(aTarget.path(sPI_LC).request().get(ServiceGroupType.class));
    } finally {
        // DELETE ServiceGroup
        aResponseMsg = _addCredentials(aTarget.path(sPI_LC).request()).delete();
        _testResponseJerseyClient(aResponseMsg, 200, 404);
        _testResponseJerseyClient(aTarget.path(sPI_LC).request().get(), 404);
        _testResponseJerseyClient(aTarget.path(sPI_UC).request().get(), 404);
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_LC));
        assertFalse(aSGMgr.containsSMPServiceGroupWithID(aPI_UC));
    }
}
Also used : Response(javax.ws.rs.core.Response) ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ISMPRedirectManager(com.helger.phoss.smp.domain.redirect.ISMPRedirectManager) ServiceMetadataReferenceCollectionType(com.helger.xsds.peppol.smp1.ServiceMetadataReferenceCollectionType) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) WebTarget(javax.ws.rs.client.WebTarget) ServiceGroupType(com.helger.xsds.peppol.smp1.ServiceGroupType) ServiceMetadataType(com.helger.xsds.peppol.smp1.ServiceMetadataType) SimpleParticipantIdentifier(com.helger.peppolid.simple.participant.SimpleParticipantIdentifier) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Test(org.junit.Test)

Example 14 with ISMPServiceGroupManager

use of com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager in project phoss-smp by phax.

the class APIExecutorExportAllXMLVer1 method invokeAPI.

public void invokeAPI(@Nonnull final IAPIDescriptor aAPIDescriptor, @Nonnull @Nonempty final String sPath, @Nonnull final Map<String, String> aPathVariables, @Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    final String sLogPrefix = "[REST API Export-All-XML-V1] ";
    LOGGER.info(sLogPrefix + "Starting Export");
    // Only authenticated user may do so
    final BasicAuthClientCredentials aBasicAuth = getMandatoryAuth(aRequestScope.headers());
    SMPUserManagerPhoton.validateUserCredentials(aBasicAuth);
    // Start action after authentication
    final ISMPSettingsManager aSettingsMgr = SMPMetaManager.getSettingsMgr();
    final ISMPServiceGroupManager aServiceGroupMgr = SMPMetaManager.getServiceGroupMgr();
    // Now get all relevant service groups
    final ICommonsList<ISMPServiceGroup> aAllServiceGroups = aServiceGroupMgr.getAllSMPServiceGroups();
    final boolean bIncludeBusinessCards = aRequestScope.params().getAsBoolean(PARAM_INCLUDE_BUSINESS_CARDS, aSettingsMgr.getSettings().isDirectoryIntegrationEnabled());
    final IMicroDocument aDoc = ServiceGroupExport.createExportDataXMLVer10(aAllServiceGroups, bIncludeBusinessCards);
    LOGGER.info(sLogPrefix + "Finished creating Export data");
    // Build the XML response
    final IXMLWriterSettings aXWS = new XMLWriterSettings();
    aUnifiedResponse.setContentAndCharset(MicroWriter.getNodeAsString(aDoc, aXWS), aXWS.getCharset()).setMimeType(new MimeType(CMimeType.APPLICATION_XML).addParameter(CMimeType.PARAMETER_NAME_CHARSET, aXWS.getCharset().name())).disableCaching();
}
Also used : ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) BasicAuthClientCredentials(com.helger.http.basicauth.BasicAuthClientCredentials) ISMPSettingsManager(com.helger.phoss.smp.settings.ISMPSettingsManager) IXMLWriterSettings(com.helger.xml.serialize.write.IXMLWriterSettings) IXMLWriterSettings(com.helger.xml.serialize.write.IXMLWriterSettings) XMLWriterSettings(com.helger.xml.serialize.write.XMLWriterSettings) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) IMicroDocument(com.helger.xml.microdom.IMicroDocument) CMimeType(com.helger.commons.mime.CMimeType) MimeType(com.helger.commons.mime.MimeType)

Example 15 with ISMPServiceGroupManager

use of com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager in project phoss-smp by phax.

the class APIExecutorExportSpecificXMLVer1 method invokeAPI.

public void invokeAPI(@Nonnull final IAPIDescriptor aAPIDescriptor, @Nonnull @Nonempty final String sPath, @Nonnull final Map<String, String> aPathVariables, @Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    final String sPathServiceGroupID = aPathVariables.get(SMPRestFilter.PARAM_SERVICE_GROUP_ID);
    final String sLogPrefix = "[REST API Export-Specific-XML-V1] ";
    LOGGER.info(sLogPrefix + "Starting Export of '" + sPathServiceGroupID + "'");
    // Only authenticated user may do so
    final BasicAuthClientCredentials aBasicAuth = getMandatoryAuth(aRequestScope.headers());
    SMPUserManagerPhoton.validateUserCredentials(aBasicAuth);
    // Start action after authentication
    final ISMPSettingsManager aSettingsMgr = SMPMetaManager.getSettingsMgr();
    final ISMPServiceGroupManager aServiceGroupMgr = SMPMetaManager.getServiceGroupMgr();
    final ISMPServerAPIDataProvider aDataProvider = new SMPRestDataProvider(aRequestScope, null);
    final IIdentifierFactory aIdentifierFactory = SMPMetaManager.getIdentifierFactory();
    final IParticipantIdentifier aPathServiceGroupID = aIdentifierFactory.parseParticipantIdentifier(sPathServiceGroupID);
    if (aPathServiceGroupID == null) {
        // Invalid identifier
        throw SMPBadRequestException.failedToParseSG(sPathServiceGroupID, aDataProvider.getCurrentURI());
    }
    // Retrieve the service group
    final ISMPServiceGroup aServiceGroup = aServiceGroupMgr.getSMPServiceGroupOfID(aPathServiceGroupID);
    if (aServiceGroup == null) {
        // No such service group
        throw new SMPNotFoundException("Unknown Service Group '" + sPathServiceGroupID + "'", aDataProvider.getCurrentURI());
    }
    final boolean bIncludeBusinessCards = aRequestScope.params().getAsBoolean(PARAM_INCLUDE_BUSINESS_CARDS, aSettingsMgr.getSettings().isDirectoryIntegrationEnabled());
    final IMicroDocument aDoc = ServiceGroupExport.createExportDataXMLVer10(new CommonsArrayList<>(aServiceGroup), bIncludeBusinessCards);
    LOGGER.info(sLogPrefix + "Finished creating Export data");
    // Build the XML response
    final IXMLWriterSettings aXWS = new XMLWriterSettings();
    aUnifiedResponse.setContentAndCharset(MicroWriter.getNodeAsString(aDoc, aXWS), aXWS.getCharset()).setMimeType(new MimeType(CMimeType.APPLICATION_XML).addParameter(CMimeType.PARAMETER_NAME_CHARSET, aXWS.getCharset().name())).disableCaching();
}
Also used : ISMPServiceGroupManager(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager) ISMPSettingsManager(com.helger.phoss.smp.settings.ISMPSettingsManager) IXMLWriterSettings(com.helger.xml.serialize.write.IXMLWriterSettings) XMLWriterSettings(com.helger.xml.serialize.write.XMLWriterSettings) IXMLWriterSettings(com.helger.xml.serialize.write.IXMLWriterSettings) ISMPServiceGroup(com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup) CMimeType(com.helger.commons.mime.CMimeType) MimeType(com.helger.commons.mime.MimeType) SMPNotFoundException(com.helger.phoss.smp.exception.SMPNotFoundException) BasicAuthClientCredentials(com.helger.http.basicauth.BasicAuthClientCredentials) ISMPServerAPIDataProvider(com.helger.phoss.smp.restapi.ISMPServerAPIDataProvider) IMicroDocument(com.helger.xml.microdom.IMicroDocument) IIdentifierFactory(com.helger.peppolid.factory.IIdentifierFactory) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Aggregations

ISMPServiceGroupManager (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroupManager)67 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)47 ISMPServiceGroup (com.helger.phoss.smp.domain.servicegroup.ISMPServiceGroup)45 IIdentifierFactory (com.helger.peppolid.factory.IIdentifierFactory)35 IUser (com.helger.photon.security.user.IUser)25 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)23 SMPServerException (com.helger.phoss.smp.exception.SMPServerException)22 Nonnull (javax.annotation.Nonnull)22 ISMPServiceInformationManager (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformationManager)21 Test (org.junit.Test)19 ISMPRedirectManager (com.helger.phoss.smp.domain.redirect.ISMPRedirectManager)16 HCNodeList (com.helger.html.hc.impl.HCNodeList)15 ISMPServiceInformation (com.helger.phoss.smp.domain.serviceinfo.ISMPServiceInformation)15 IMicroDocument (com.helger.xml.microdom.IMicroDocument)12 ServiceGroupType (com.helger.xsds.peppol.smp1.ServiceGroupType)12 ServiceMetadataReferenceCollectionType (com.helger.xsds.peppol.smp1.ServiceMetadataReferenceCollectionType)12 SMPNotFoundException (com.helger.phoss.smp.exception.SMPNotFoundException)11 ISMPSettings (com.helger.phoss.smp.settings.ISMPSettings)11 ICommonsList (com.helger.commons.collection.impl.ICommonsList)10 SimpleParticipantIdentifier (com.helger.peppolid.simple.participant.SimpleParticipantIdentifier)10