@ PUT @ Consumes ( { MediaType . TEXT_XML , MediaType . APPLICATION_XML } ) public Response putResource ( @ PathParam ( JaxRxConstants . SYSTEM ) final String system , @ PathParam ( JaxRxConstants . RESOURCE ) final String resource , @ Context final HttpHeaders headers , final InputStream xml ) { final JaxRx impl = Systems . getInstance ( system ) ; final String info = impl . update ( xml , new ResourcePath ( resource , headers ) ) ; return Response . created ( null ) . entity ( info ) . build ( ) ; }
This method will be called when a new XML file has to be stored within the database . The user request will be forwarded to this method . Afterwards it creates a response message with the created HTTP status code if the storing has been successful .