use of com.helger.smpclient.httpclient.SMPHttpResponseHandlerWriteOperations in project peppol-commons by phax.
the class BDXR2Client method deleteServiceRegistration.
/**
* Deletes a service meta data object given by its service group id and its
* document type.
*
* @param aServiceGroupID
* The service group id of the service meta data to delete. May not be
* <code>null</code>.
* @param aDocumentTypeID
* The document type of the service meta data to delete. May not be
* <code>null</code>.
* @param aCredentials
* The user name and password to use as credentials. May not be
* <code>null</code>.
* @throws SMPClientException
* in case something goes wrong
* @throws SMPClientUnauthorizedException
* The user name or password was not correct.
* @throws SMPClientNotFoundException
* The service meta data object did not exist.
* @throws SMPClientBadRequestException
* The request was not well formed.
*/
public void deleteServiceRegistration(@Nonnull final IParticipantIdentifier aServiceGroupID, @Nonnull final IDocumentTypeIdentifier aDocumentTypeID, @Nonnull final BasicAuthClientCredentials aCredentials) throws SMPClientException {
ValueEnforcer.notNull(aServiceGroupID, "ServiceGroupID");
ValueEnforcer.notNull(aDocumentTypeID, "DocumentTypeID");
ValueEnforcer.notNull(aCredentials, "Credentials");
final String sURI = getSMPHostURI() + PATH_OASIS_BDXR_SMP_2 + aServiceGroupID.getURIPercentEncoded() + '/' + URL_PART_SERVICES + '/' + aDocumentTypeID.getURIPercentEncoded();
if (LOGGER.isDebugEnabled())
LOGGER.debug("BDXR2Client deleteServiceRegistration@" + sURI);
final HttpDelete aRequest = new HttpDelete(sURI);
aRequest.addHeader(CHttpHeader.AUTHORIZATION, aCredentials.getRequestValue());
executeGenericRequest(aRequest, new SMPHttpResponseHandlerWriteOperations());
}
use of com.helger.smpclient.httpclient.SMPHttpResponseHandlerWriteOperations in project peppol-commons by phax.
the class BDXR2Client method deleteServiceGroup.
/**
* Deletes a service group given by its service group id.
*
* @param aServiceGroupID
* The service group id of the service group to delete. May not be
* <code>null</code>.
* @param aCredentials
* The user name and password to use as credentials. May not be
* <code>null</code>.
* @throws SMPClientException
* in case something goes wrong
* @throws SMPClientNotFoundException
* The service group id did not exist.
* @throws SMPClientUnauthorizedException
* The user name or password was not correct.
* @throws SMPClientBadRequestException
* The request was not well formed.
*/
public void deleteServiceGroup(@Nonnull final IParticipantIdentifier aServiceGroupID, @Nonnull final BasicAuthClientCredentials aCredentials) throws SMPClientException {
ValueEnforcer.notNull(aCredentials, "Credentials");
final String sURI = getSMPHostURI() + PATH_OASIS_BDXR_SMP_2 + aServiceGroupID.getURIPercentEncoded();
if (LOGGER.isDebugEnabled())
LOGGER.debug("BDXR2Client deleteServiceGroup@" + sURI);
final HttpDelete aRequest = new HttpDelete(sURI);
aRequest.addHeader(CHttpHeader.AUTHORIZATION, aCredentials.getRequestValue());
executeGenericRequest(aRequest, new SMPHttpResponseHandlerWriteOperations());
}
Aggregations