Package org.fao.geonet.csw.common.exceptions

Examples of org.fao.geonet.csw.common.exceptions.CatalogException


    OutputMethod om = context.getOutputMethod();

    boolean inSOAP  = (im == InputMethod.SOAP);
    boolean outSOAP = (inSOAP || om == OutputMethod.SOAP);

    CatalogException exc;

    try
    {
      if (inSOAP)
        request = SOAPUtil.unembed(request);

      Element response = dispatchI(request, context, cswServiceSpecificContraint);

      if (outSOAP)
        response = SOAPUtil.embed(response);

      return response;
    }

    catch(CatalogException e)
    {
      exc = e;
    }

    catch(Exception e)
    {
      context.info("Exception stack trace : \n"+ Util.getStackTrace(e));
            // TODO what's this ?
      exc = new NoApplicableCodeEx(e.toString());
    }

    Element response = CatalogException.marshal(exc);
    boolean sender   = (exc instanceof NoApplicableCodeEx);

    if (outSOAP)
      return SOAPUtil.embedExc(response, sender, exc.getCode(), exc.toString());

    //TODO: need to set the status code

    return response;
  }
View Full Code Here

TOP

Related Classes of org.fao.geonet.csw.common.exceptions.CatalogException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.