{
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
ServiceToken accessToken = getServiceProvider().getAccessToken(request);
if(accessToken==null)
{
response.setStatus(401);
return;
}
response.setContentType("text/xml");
response.setCharacterEncoding("UTF-8");
PrintWriter writer = response.getWriter();
writer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>")
.append("<user>")
.append("<id>").append(accessToken.getId()).append("</id>")
.append("<contacts>")
.append("contacts goes here ...")
.append("</contacts>")
.append("</user>");