porting rest4j server module