Converting HttpMeessageAdapter to Java.