Search in sources :

Example 1 with ServiceMetadataPublisherServiceType

use of com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType in project peppol-commons by phax.

the class SMLFuncTest method testManageServiceMetadataUpdate.

@Test
public void testManageServiceMetadataUpdate() throws Exception {
    final ServiceMetadataPublisherServiceType aServiceMetadataRead = m_aSMClient.read(m_aServiceMetadataPublisher.getServiceMetadataPublisherID());
    assertNotNull(aServiceMetadataRead);
    aServiceMetadataRead.getPublisherEndpoint().setPhysicalAddress("173.156.1.1");
    m_aSMClient.update(aServiceMetadataRead);
    final ServiceMetadataPublisherServiceType aAfterSignedServiceMetadataRead = m_aSMClient.read(m_aServiceMetadataPublisher.getServiceMetadataPublisherID());
    m_aSMClient.delete(aAfterSignedServiceMetadataRead.getServiceMetadataPublisherID());
    assertEquals("173.156.1.1", aAfterSignedServiceMetadataRead.getPublisherEndpoint().getPhysicalAddress());
}
Also used : ServiceMetadataPublisherServiceType(com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType) Test(org.junit.Test)

Example 2 with ServiceMetadataPublisherServiceType

use of com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType in project peppol-commons by phax.

the class SMLFuncTest method testManageServiceMetadataDoubleDelete.

@Test(expected = NotFoundFault.class)
public void testManageServiceMetadataDoubleDelete() throws Exception {
    final ServiceMetadataPublisherServiceType aServiceMetadataRead = m_aSMClient.read(m_aServiceMetadataPublisher.getServiceMetadataPublisherID());
    assertNotNull(aServiceMetadataRead);
    m_aSMClient.delete(aServiceMetadataRead.getServiceMetadataPublisherID());
    // Delete again
    m_aSMClient.delete(aServiceMetadataRead.getServiceMetadataPublisherID());
}
Also used : ServiceMetadataPublisherServiceType(com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType) Test(org.junit.Test)

Example 3 with ServiceMetadataPublisherServiceType

use of com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType in project peppol-commons by phax.

the class WildcardFuncTest method initialize.

@Before
public void initialize() throws Exception {
    m_aSMClient = new ManageServiceMetadataServiceCaller(SML_INFO);
    m_aSMClient.setSSLSocketFactory(createConfiguredSSLSocketFactory(SML_INFO, false));
    try {
        m_aSMClient.delete(SMP_ID);
    } catch (final NotFoundFault e) {
    // This is fine, since we are just cleaning
    }
    // Create SMP
    final ServiceMetadataPublisherServiceType aServiceMetadataCreate = new ServiceMetadataPublisherServiceType();
    aServiceMetadataCreate.setServiceMetadataPublisherID(SMP_ID);
    final PublisherEndpointType aEndpoint = new PublisherEndpointType();
    aEndpoint.setLogicalAddress(ADDRESS_LOGICAL);
    aEndpoint.setPhysicalAddress(ADDRESS_PHYSICAL);
    aServiceMetadataCreate.setPublisherEndpoint(aEndpoint);
    m_aSMClient.create(aServiceMetadataCreate);
}
Also used : ManageServiceMetadataServiceCaller(com.helger.peppol.smlclient.ManageServiceMetadataServiceCaller) PublisherEndpointType(com.helger.peppol.smlclient.smp.PublisherEndpointType) ServiceMetadataPublisherServiceType(com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType) NotFoundFault(com.helger.peppol.smlclient.smp.NotFoundFault) Before(org.junit.Before)

Example 4 with ServiceMetadataPublisherServiceType

use of com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType in project peppol-commons by phax.

the class SMKFuncTest method _createSMPData.

@Nonnull
private static ServiceMetadataPublisherServiceType _createSMPData(@Nonnull final ManageServiceMetadataServiceCaller aSMPClient, @Nonnull @Nonempty final String sSMPID) throws Exception {
    final ServiceMetadataPublisherServiceType aServiceMetadataCreate = new ServiceMetadataPublisherServiceType();
    aServiceMetadataCreate.setServiceMetadataPublisherID(sSMPID);
    final PublisherEndpointType aEndpoint = new PublisherEndpointType();
    aEndpoint.setLogicalAddress(L_ENDPOINTADDRESS);
    aEndpoint.setPhysicalAddress(P_ENDPOINTADDRESS);
    aServiceMetadataCreate.setPublisherEndpoint(aEndpoint);
    aSMPClient.create(aServiceMetadataCreate);
    return aServiceMetadataCreate;
}
Also used : PublisherEndpointType(com.helger.peppol.smlclient.smp.PublisherEndpointType) ServiceMetadataPublisherServiceType(com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType) Nonnull(javax.annotation.Nonnull)

Example 5 with ServiceMetadataPublisherServiceType

use of com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType in project peppol-commons by phax.

the class SMLFuncTest method _createSMPData.

@Nonnull
private static ServiceMetadataPublisherServiceType _createSMPData(@Nonnull final ManageServiceMetadataServiceCaller aSMLSMPClient, @Nonnull @Nonempty final String sSMPID) throws Exception {
    final ServiceMetadataPublisherServiceType aServiceMetadataCreate = new ServiceMetadataPublisherServiceType();
    aServiceMetadataCreate.setServiceMetadataPublisherID(sSMPID);
    final PublisherEndpointType aEndpoint = new PublisherEndpointType();
    aEndpoint.setLogicalAddress(L_ENDPOINTADDRESS);
    aEndpoint.setPhysicalAddress(P_ENDPOINTADDRESS);
    aServiceMetadataCreate.setPublisherEndpoint(aEndpoint);
    aSMLSMPClient.create(aServiceMetadataCreate);
    return aServiceMetadataCreate;
}
Also used : PublisherEndpointType(com.helger.peppol.smlclient.smp.PublisherEndpointType) ServiceMetadataPublisherServiceType(com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType) Nonnull(javax.annotation.Nonnull)

Aggregations

ServiceMetadataPublisherServiceType (com.helger.peppol.smlclient.smp.ServiceMetadataPublisherServiceType)10 PublisherEndpointType (com.helger.peppol.smlclient.smp.PublisherEndpointType)5 Test (org.junit.Test)4 Nonnull (javax.annotation.Nonnull)3 ManageParticipantIdentifierServiceCaller (com.helger.peppol.smlclient.ManageParticipantIdentifierServiceCaller)1 ManageServiceMetadataServiceCaller (com.helger.peppol.smlclient.ManageServiceMetadataServiceCaller)1 NotFoundFault (com.helger.peppol.smlclient.smp.NotFoundFault)1 Before (org.junit.Before)1