Search in sources :

Example 11 with ExceptionType

use of org.talend.types.test.generalobjects.errorhandling._1.ExceptionType in project ddf by codice.

the class CswExceptionMapper method createServiceException.

private ExceptionReport createServiceException(CswException cswException) {
    ExceptionReport exceptionReport = new ExceptionReport();
    exceptionReport.setVersion(SERVICE_EXCEPTION_REPORT_VERSION);
    ExceptionType exception = new ExceptionType();
    exception.setExceptionCode(cswException.getExceptionCode());
    exception.setLocator(cswException.getLocator());
    exception.getExceptionText().add(cswException.getMessage());
    exceptionReport.getException().add(exception);
    return exceptionReport;
}
Also used : ExceptionType(net.opengis.ows.v_1_0_0.ExceptionType) ExceptionReport(net.opengis.ows.v_1_0_0.ExceptionReport)

Example 12 with ExceptionType

use of org.talend.types.test.generalobjects.errorhandling._1.ExceptionType in project tesb-rt-se by Talend.

the class LibraryServerImpl method prepareException.

private SeekBookError prepareException(String message) {
    ExceptionType exception = new ExceptionType();
    exception.setOperation("seekBook");
    exception.setServiceName("LibraryService");
    exception.setExceptionText(message);
    ExceptionFrame frame = new ExceptionFrame();
    frame.getException().add(exception);
    return new SeekBookError("Book not found", frame);
}
Also used : ExceptionType(org.talend.types.test.generalobjects.errorhandling._1.ExceptionType) SeekBookError(org.talend.services.test.library._1_0.SeekBookError) ExceptionFrame(org.talend.types.test.generalobjects.errorhandling._1.ExceptionFrame)

Example 13 with ExceptionType

use of org.talend.types.test.generalobjects.errorhandling._1.ExceptionType in project tesb-rt-se by Talend.

the class LibraryServerImpl method prepareException.

private SeekBookError prepareException(String message) {
    ExceptionType exception = new ExceptionType();
    exception.setOperation("seekBook");
    exception.setServiceName("LibraryService");
    exception.setExceptionText(message);
    ExceptionFrame frame = new ExceptionFrame();
    frame.getException().add(exception);
    return new SeekBookError("Book not found", frame);
}
Also used : ExceptionType(org.talend.types.test.generalobjects.errorhandling._1.ExceptionType) SeekBookError(org.talend.services.test.library._1_0.SeekBookError) ExceptionFrame(org.talend.types.test.generalobjects.errorhandling._1.ExceptionFrame)

Example 14 with ExceptionType

use of org.talend.types.test.generalobjects.errorhandling._1.ExceptionType in project tesb-rt-se by Talend.

the class LibraryServerImpl method prepareException.

private SeekBookError prepareException(String message) {
    ExceptionType exception = new ExceptionType();
    exception.setOperation("seekBook");
    exception.setServiceName("LibraryService");
    exception.setExceptionText(message);
    ExceptionFrame frame = new ExceptionFrame();
    frame.getException().add(exception);
    return new SeekBookError("Book not found", frame);
}
Also used : ExceptionType(org.talend.types.test.generalobjects.errorhandling._1.ExceptionType) SeekBookError(org.talend.services.test.library._1_0.SeekBookError) ExceptionFrame(org.talend.types.test.generalobjects.errorhandling._1.ExceptionFrame)

Example 15 with ExceptionType

use of org.talend.types.test.generalobjects.errorhandling._1.ExceptionType in project arctic-sea by 52North.

the class OwsExceptionReportDecoder method decode.

private OwsExceptionReport decode(ExceptionReport report) {
    String version = report.getVersion();
    ExceptionType[] exceptionTypes = report.getExceptionArray();
    List<CodedException> exceptions = Streams.stream(exceptionTypes).map(this::decode).collect(toList());
    return new CompositeOwsException(exceptions).setVersion(version);
}
Also used : ExceptionType(net.opengis.ows.x11.ExceptionType) CodedException(org.n52.shetland.ogc.ows.exception.CodedException) CompositeOwsException(org.n52.shetland.ogc.ows.exception.CompositeOwsException)

Aggregations

SeekBookError (org.talend.services.test.library._1_0.SeekBookError)5 ExceptionFrame (org.talend.types.test.generalobjects.errorhandling._1.ExceptionFrame)5 ExceptionType (org.talend.types.test.generalobjects.errorhandling._1.ExceptionType)5 ExceptionType (org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType)4 ArrayList (java.util.ArrayList)3 ExceptionType (net.opengis.ows.x11.ExceptionType)3 Task (com.arjuna.services.framework.task.Task)2 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)2 Action (javax.xml.ws.Action)2 MessageContext (javax.xml.ws.handler.MessageContext)2 ExceptionType (net.opengis.ows.v_1_0_0.ExceptionType)2 MAP (org.jboss.ws.api.addressing.MAP)2 MAPEndpoint (org.jboss.ws.api.addressing.MAPEndpoint)2 SuppressFBWarnings (edu.umd.cs.findbugs.annotations.SuppressFBWarnings)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 ExceptionReport (net.opengis.ows.v_1_0_0.ExceptionReport)1 ExceptionType (net.opengis.ows.v_1_1_0.ExceptionType)1 ExceptionDocument (net.opengis.ows.x11.ExceptionDocument)1 ExceptionReportDocument (net.opengis.ows.x11.ExceptionReportDocument)1