Project

General

Profile

« Previous | Next » 

Revision 5515

Added by berkley over 14 years ago

added explicit 200 codes to ResourceHandler

View differences:

src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
403 403
        try
404 404
        {
405 405
            out = response.getOutputStream();
406
            response.setStatus(200);
406 407
            response.setContentType("text/xml");
407 408
            AuthToken token = new AuthToken(sessionId);
408 409
            String fromDateS = params.get("fromDate")[0];
......
552 553
        
553 554
        params.put("docid", new String[] { localId });
554 555
        PrintWriter out = response.getWriter();
556
        response.setStatus(200);
555 557
        response.setContentType("text/xml");
556 558
        handler.handleIdIsRegisteredAction(out, params, response);
557 559
        out.close();
......
564 566
     */
565 567
    private void getAllDocIds() throws IOException {
566 568
        PrintWriter out = response.getWriter();
569
        response.setStatus(200);
567 570
        response.setContentType("text/xml");
568 571
        handler.handleGetAllDocidsAction(out, params, response);
569 572
        out.close();
......
579 582
    {
580 583
        params.put("docid", new String[] { guid });
581 584
        PrintWriter out = response.getWriter();
585
        response.setStatus(200);
582 586
        response.setContentType("text/xml");
583 587
        //handler.handleGetRevisionAndDocTypeAction(out, params);
584 588

  
......
628 632
     */
629 633
    private void getNextObject() throws IOException {
630 634
        PrintWriter out = response.getWriter();
635
        response.setStatus(200);
631 636
        response.setContentType("text/xml");
632 637
        handler.handleGetMaxDocidAction(out, params, response);
633 638
        out.close();
......
644 649
        OutputStream out = null;
645 650
        try {
646 651
            out = response.getOutputStream();
652
            response.setStatus(200);
647 653
            response.setContentType("text/xml");
648 654
            if(guid != null)
649 655
            { //get a specific document                
......
766 772
                        objectFormat, replicaStatus, start, count);
767 773
                
768 774
                StringReader sr = new StringReader(ol.toString());                
769
                out = response.getOutputStream();      
775
                out = response.getOutputStream();  
776
                response.setStatus(200);
770 777
                response.setContentType("text/xml");
771 778
                // Serialize and write it to the output stream
772 779
                
......
848 855
        OutputStream out = null;
849 856
        try {
850 857
            response.setContentType("text/xml");
858
            response.setStatus(200);
851 859
            out = response.getOutputStream();
852 860
            Identifier id = new Identifier();
853 861
            id.setValue(guid);
......
1051 1059
        OutputStream out = null;
1052 1060
        try {
1053 1061
            out = response.getOutputStream();
1062
            response.setStatus(200);
1054 1063
            response.setContentType("text/xml");
1055 1064
        } catch (IOException e1) {
1056 1065
            logMetacat.error("Could not get the output stream for writing in putObject");
......
1182 1191
        
1183 1192
        params.put("docid", new String[] { localId });
1184 1193
        PrintWriter out = response.getWriter();
1194
        response.setStatus(200);
1185 1195
        response.setContentType("text/xml");
1186 1196
        handler.handleDeleteAction(out, params, request, response, username,
1187 1197
                groupNames);
......
1230 1240
     */
1231 1241
    private void login() throws IOException {
1232 1242
        PrintWriter out = response.getWriter();
1243
        response.setStatus(200);
1233 1244
        response.setContentType("text/xml");
1234 1245
        handler.handleLoginAction(out, params, request, response);
1235 1246
        out.close();
......
1242 1253
     */
1243 1254
    private void logout() throws IOException {
1244 1255
        PrintWriter out = response.getWriter();
1256
        response.setStatus(200);
1245 1257
        response.setContentType("text/xml");
1246 1258
        handler.handleLogoutAction(out, params, request, response);
1247 1259
        out.close();

Also available in: Unified diff