package com.skype.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.social.skypeBot.api.SkypeBot;
import org.springframework.social.skypeBot.api.data.from.Message;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Anton Leliuk
 */
@RestController
public class EchoController {

    @Autowired
    private SkypeBot skypeBot;

    @RequestMapping(value = "/chat", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)
    public void chat(@RequestBody Message fromSkype){

        org.springframework.social.skypeBot.api.data.to.Message toSkype = new org.springframework.social.skypeBot.api.data.to.Message();
        toSkype.setContent(fromSkype.getContent());
        skypeBot.sendMessage(fromSkype.getFrom(), toSkype);
    }
}

@@ -239,20 +239,18 @@
 pi.data.
-from
+to
 .Message
@@ -251,16 +251,61 @@
 essage;%0A
+import org.springframework.util.ObjectUtils;%0A
 import o
@@ -861,23 +861,22 @@
 estBody 
-Message
+Object
  fromSky
@@ -880,25 +880,26 @@
 Skype)%7B%0A
-%0A
+//
         
 org.spri
@@ -894,185 +894,145 @@
     
-org.springframework.social.skypeBot.api.data.to.Message toSkype = new org.springframework.social.skypeBot.api.data.to.Message();%0A        toSkype.setContent(fromSkype.getContent(
+System.out.println(fromSkype);%0A        Message toSkype = new Message();%0A        toSkype.setContent(ObjectUtils.nullSafeToString(fromSkype
 ));%0A
@@ -1064,27 +1064,24 @@
 age(
-fromSkype.getFrom()
+%228:anton_leliuk%22
 , to

Test request