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());
}
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());
}
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);
}
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;
}
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;
}
Aggregations