@POST
    @Consumes(MediaType.APPLICATION_XML)
    @Produces(MediaType.APPLICATION_XML)
    public Response createProvider(@Context HttpHeaders hh,@Context UriInfo uriInfo, String payload)
            throws IOException, JAXBException {
        
        logger.debug("StartOf createProvider - REQUEST Insert /providers");
        
        ProviderHelper providerRestService = getProviderHelper();
        String location;
        try {
            location = providerRestService.createProvider(
                    hh, uriInfo.getAbsolutePath().toString(), payload);
        } catch (HelperException e) {
            logger.info("createProvider exception", e);
            return buildResponse(e);
        }
        logger.debug("EndOf createProvider");
        return buildResponsePOST(
                HttpStatus.CREATED,
                printMessage(HttpStatus.CREATED,
                        "The createProvider has been stored successfully in the SLA Repository Database"),
                location);
    }
@ POST @ Consumes ( MediaType . APPLICATION_XML ) @ Produces ( MediaType . APPLICATION_XML ) public Response createProvider ( @ Context HttpHeaders hh , @ Context UriInfo uriInfo , String payload ) throws IOException , JAXBException { logger . debug ( "StartOf createProvider - REQUEST Insert /providers" ) ; ProviderHelper providerRestService = getProviderHelper ( ) ; String location ; try { location = providerRestService . createProvider ( hh , uriInfo . getAbsolutePath ( ) . toString ( ) , payload ) ; } catch ( HelperException e ) { logger . info ( "createProvider exception" , e ) ; return buildResponse ( e ) ; } logger . debug ( "EndOf createProvider" ) ; return buildResponsePOST ( HttpStatus . CREATED , printMessage ( HttpStatus . CREATED , "The createProvider has been stored successfully in the SLA Repository Database" ) , location ) ; }
Creates a new provider


<pre>
POST /providers

Request:
POST /providers HTTP/1.1
Accept: application/xml

Response:

{@code
<provider>
<uuid>fc993580-03fe-41eb-8a21-a56709f9370f</uuid>
<name>provider-3</name>
</provider>

}

</pre>

Example: <li>curl -H "Content-type: application/xml" -X POST -d
@provider.xml localhost:8080/sla-service/providers/</li>

@return XML information with the different details of the provider