Home How to wrap and unwrap the trained model object generated using Weka for Restful Webservice (Java)
 Is it possible to send the trained model as a GET request to the client using Restful webservice?? I have tried the following way, @GET @Produces(MediaType.TEXT_PLAIN) public String getIt() throws Exception { J48 model = (J48) SerializationHelper.read(file.getAbsolutePath()); return model.toString(); }  I have tested this request with Postman and got the following response J48 pruned tree ------------------ TMAX <= 0.43381 | TMIN <= 0.322058: yes (760.0) | TMIN > 0.322058 | | TMIN <= 0.413488: yes (23.0) | | TMIN > 0.413488: no (3.0) TMAX > 0.43381: no (14479.0/1.0) Number of Leaves : 4 Size of the tree : 7  I have then created a Rest client and got the following response. InboundJaxrsResponse{context=ClientResponse{method=GET, uri=http://localhost:8080/restserver/webapi/algorithm, status=200, reason=OK}}  Now, I'm stuck at how to use this response as trained model and test the model for new data. I hope and I would get some suggestions from you. Thanks in advance!