Closed trantub closed 7 years ago
Thanks for the find! I did a small commit and opened a pull request which fixes this. See openbaton/docs#10
As @ranzpirat said, this problem has been fixed in the develop branch, which will be merged into master in the next release. This pull request can be closed.
Replace the receiveEvent function with the following:
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public void receiveEvent(@RequestBody String msg){ System.out.println("Received Event from NFVO: " + msg.substring(0,30) + "...") ; JsonParser jsonParser = new JsonParser(); JsonObject json = jsonParser.parse(msg).getAsJsonObject(); Gson mapper = new GsonBuilder().create(); Action action = mapper.fromJson(json.get("action"), Action.class); System.out.println("ACTION=" + action); NetworkServiceRecord nsr = mapper.fromJson(json.get("payload"), NetworkServiceRecord.class); System.out.println("NSR=" + nsr.getName()); /**