IoT CAS Frameworks/IOT_Server/Server_Admin_Framework/source/ConsumerAPI/src/java/AV_Action/AV_GetXMLResourceConfig.java
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/xml;charset=UTF-8");
         StringBuffer result = new StringBuffer();
        String szopration = "GetResourceConfig";
        String szrespStr=null;
        String szSessionid = "";
        boolean fchkParam = false;
        String szResourceConfig = null;
        try
        {
            szSessionid = request.getParameter("szsessionid");
            /*if (szSessionid != null && !szSessionid.equalsIgnoreCase(""))
            {
                
                fchkParam = true;
            }
            if (fchkParam)
            {*/
               
                    result.append("<resourceconfig>");
                    
                    szResourceConfig = GetXMLResourceConfiguration.getResourecConfig(request);
                    if (szResourceConfig == null)
                    {
                        
                        AV_Constants.opStatus=AV_Constants.NODATA_FOUND;
                        log.debug("No data found");
                    } else
                    {
                        if(szResourceConfig.equals(null))
                            result.append("Undefined");
                        else
                            result.append(szResourceConfig);

                        AV_Constants.opStatus=AV_Constants.SUCCESS;
                    }
                    result.append("</resourceconfig>");
                    //System.out.println("Result==>>"+result);
                
            /*} else
            {
                
                AV_Constants.opStatus=AV_Constants.INVALID_INPUTS;

            }*/
        } catch (Exception e)
        {
            e.printStackTrace();
            log.error("Error while performing action", e);
            AV_Constants.opStatus=AV_Constants.FAILURE;
        }
        try
        {
            szrespStr=AV_OutputFormat.formatOutPut(AV_Constants.opStatus,result,szopration,null);
            
            response.getWriter().write(szrespStr);

        } catch (Exception e)
        {
            log.debug("exception while writing output", e);
        } finally
        {
            try
            {
                szopration = null;
                szrespStr=null;
                result = null;

            } catch (Exception e)
            {
                e.printStackTrace();
            }
        }
    }
/**
     * Processes requests for both HTTP
     * <code>GET</code> and
     * <code>POST</code> methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
Processes requests for both HTTP
GET and
POST methods.

@param request servlet request
@param response servlet response
@throws ServletException if a servlet-specific error occurs
@throws IOException if an I/O error occurs
Processes requests for both HTTP GET and POST methods . @param request servlet request @param response servlet response @throws ServletException if a servlet - specific error occurs @throws IOException if an I / O error occurs
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/xml;charset=UTF-8");
         StringBuffer result = new StringBuffer();
        String szopration = "GetResourceConfig";
        String szrespStr=null;
        String szSessionid = "";
        boolean fchkParam = false;
        String szResourceConfig = null;
        try
        {
            szSessionid = request.getParameter("szsessionid");
            /*if (szSessionid != null && !szSessionid.equalsIgnoreCase(""))
            {
                fchkParam = true;
            }
            if (fchkParam)
            {*/
                    result.append("<resourceconfig>");
                    szResourceConfig = GetXMLResourceConfiguration.getResourecConfig(request);
                    if (szResourceConfig == null)
                    {
                        AV_Constants.opStatus=AV_Constants.NODATA_FOUND;
                        log.debug("No data found");
                    } else
                    {
                        if(szResourceConfig.equals(null))
                            result.append("Undefined");
                        else
                            result.append(szResourceConfig);
                        AV_Constants.opStatus=AV_Constants.SUCCESS;
                    }
                    result.append("</resourceconfig>");
            /*} else
            {
                AV_Constants.opStatus=AV_Constants.INVALID_INPUTS;
            }*/
        } catch (Exception e)
        {
            e.printStackTrace();
            log.error("Error while performing action", e);
            AV_Constants.opStatus=AV_Constants.FAILURE;
        }
        try
        {
            szrespStr=AV_OutputFormat.formatOutPut(AV_Constants.opStatus,result,szopration,null);
            response.getWriter().write(szrespStr);
        } catch (Exception e)
        {
            log.debug("exception while writing output", e);
        } finally
        {
            try
            {
                szopration = null;
                szrespStr=null;
                result = null;
            } catch (Exception e)
            {
                e.printStackTrace();
            }
        }
    }
protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { response . setContentType ( "text/xml;charset=UTF-8" ) ; StringBuffer result = new StringBuffer ( ) ; String szopration = "GetResourceConfig" ; String szrespStr = null ; String szSessionid = "" ; boolean fchkParam = false ; String szResourceConfig = null ; try { szSessionid = request . getParameter ( "szsessionid" ) ; /*if (szSessionid != null && !szSessionid.equalsIgnoreCase(""))
            {
                
                fchkParam = true;
            }
            if (fchkParam)
            {*/ result . append ( "<resourceconfig>" ) ; szResourceConfig = GetXMLResourceConfiguration . getResourecConfig ( request ) ; if ( szResourceConfig == null ) { AV_Constants . opStatus = AV_Constants . NODATA_FOUND ; log . debug ( "No data found" ) ; } else { if ( szResourceConfig . equals ( null ) ) result . append ( "Undefined" ) ; else result . append ( szResourceConfig ) ; AV_Constants . opStatus = AV_Constants . SUCCESS ; } result . append ( "</resourceconfig>" ) ; /*} else
            {
                
                AV_Constants.opStatus=AV_Constants.INVALID_INPUTS;

            }*/ } catch ( Exception e ) { e . printStackTrace ( ) ; log . error ( "Error while performing action" , e ) ; AV_Constants . opStatus = AV_Constants . FAILURE ; } try { szrespStr = AV_OutputFormat . formatOutPut ( AV_Constants . opStatus , result , szopration , null ) ; response . getWriter ( ) . write ( szrespStr ) ; } catch ( Exception e ) { log . debug ( "exception while writing output" , e ) ; } finally { try { szopration = null ; szrespStr = null ; result = null ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } }
Processes requests for both HTTP
 <code>GET</code> and
 <code>POST</code> methods.
Processes requests for both HTTP <code > GET< / code > and <code > POST< / code > methods .
//System.out.println("Result==>>"+result);