clients/src/main/java/com/sidis/eas/client/webserver/Controller.java
/**
     * deletes an unconsumed service with a given ID from the node's vault.
     * @param id unique identifier as UUID for service
     */
deletes an unconsumed service with a given ID from the node's vault.
@param id unique identifier as UUID for service
deletes an unconsumed service with a given ID from the node ' s vault . @param id unique identifier as UUID for service
@RequestMapping(
            value = BASE_PATH + "/services/{id}",
            method = RequestMethod.DELETE,
            produces = MediaType.APPLICATION_JSON_VALUE
    )
    @ResponseBody
    public ResponseEntity<StateAndLinks<ServiceState>> deleteServiceById(
            @PathVariable("id") String id) {
        UniqueIdentifier uid = new UniqueIdentifier(null, UUID.fromString(id));
        try {
            final SignedTransaction signedTx = proxy
                    .startTrackedFlowDynamic(ServiceFlow.Delete.class, uid)
                    .getReturnValue()
                    .get();
            this.messagingTemplate.convertAndSend("/topic/sidis/eas/services", "");
            return ResponseEntity.status(HttpStatus.NO_CONTENT).body(null);
        } catch (Throwable ex) {
            logger.error(ex.getMessage(), ex);
            return ResponseEntity.status(HttpStatus.EXPECTATION_FAILED)
                    .body(new StateAndLinks<ServiceState>().error(ex));
        }
    }
@ RequestMapping ( value = BASE_PATH + "/services/{id}" , method = RequestMethod . DELETE , produces = MediaType . APPLICATION_JSON_VALUE ) @ ResponseBody public ResponseEntity < StateAndLinks < ServiceState > > deleteServiceById ( @ PathVariable ( "id" ) String id ) { UniqueIdentifier uid = new UniqueIdentifier ( null , UUID . fromString ( id ) ) ; try { final SignedTransaction signedTx = proxy . startTrackedFlowDynamic ( ServiceFlow . Delete . class , uid ) . getReturnValue ( ) . get ( ) ; this . messagingTemplate . convertAndSend ( "/topic/sidis/eas/services" , "" ) ; return ResponseEntity . status ( HttpStatus . NO_CONTENT ) . body ( null ) ; } catch ( Throwable ex ) { logger . error ( ex . getMessage ( ) , ex ) ; return ResponseEntity . status ( HttpStatus . EXPECTATION_FAILED ) . body ( new StateAndLinks < ServiceState > ( ) . error ( ex ) ) ; } }
deletes an unconsumed service with a given ID from the node's vault.
deletes an unconsumed service with a given ID from the node ' s vault .