Search in sources :

Example 1 with ExceptionType

use of org.talend.types.demos.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 2 with ExceptionType

use of org.talend.types.demos.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);
    SeekBookError e = new SeekBookError("Book not found", frame);
    return e;
}
Also used : ExceptionType(org.talend.types.demos.generalobjects.errorhandling._1.ExceptionType) SeekBookError(org.talend.services.demos.library._1_0.SeekBookError) ExceptionFrame(org.talend.types.demos.generalobjects.errorhandling._1.ExceptionFrame)

Example 3 with ExceptionType

use of org.talend.types.demos.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 4 with ExceptionType

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

the class OwsEncoderv110 method encodeOwsExceptionReport.

private ExceptionReportDocument encodeOwsExceptionReport(final OwsExceptionReport owsExceptionReport) {
    ExceptionReportDocument erd = ExceptionReportDocument.Factory.newInstance(getXmlOptions());
    ExceptionReport er = erd.addNewExceptionReport();
    // er.setLanguage("en");
    er.setVersion(owsExceptionReport.getVersion());
    List<ExceptionType> exceptionTypes = new ArrayList<>(owsExceptionReport.getExceptions().size());
    owsExceptionReport.getExceptions().stream().map(this::encodeOwsException).map(ExceptionDocument::getException).forEach(exceptionTypes::add);
    er.setExceptionArray(exceptionTypes.toArray(new ExceptionType[exceptionTypes.size()]));
    N52XmlHelper.setSchemaLocationsToDocument(erd, Collections.singletonList(N52XmlHelper.getSchemaLocationForOWS110()));
    return erd;
}
Also used : ExceptionType(net.opengis.ows.x11.ExceptionType) ExceptionReport(net.opengis.ows.x11.ExceptionReportDocument.ExceptionReport) OwsExceptionReport(org.n52.shetland.ogc.ows.exception.OwsExceptionReport) ArrayList(java.util.ArrayList) ExceptionReportDocument(net.opengis.ows.x11.ExceptionReportDocument)

Example 5 with ExceptionType

use of org.talend.types.demos.generalobjects.errorhandling._1.ExceptionType in project narayana by jbosstm.

the class BusinessAgreementWithCoordinatorCompletionCoordinatorPortTypeImpl method failOperation.

/**
 * @param parameters
 */
@WebMethod(operationName = "FailOperation", action = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Fail")
@Oneway
@Action(input = "http://docs.oasis-open.org/ws-tx/wsba/2006/06/Fail")
public void failOperation(@WebParam(name = "Fail", targetNamespace = "http://docs.oasis-open.org/ws-tx/wsba/2006/06", partName = "parameters") ExceptionType parameters) {
    MessageContext ctx = webServiceCtx.getMessageContext();
    final ExceptionType fail = parameters;
    final MAP inboundMap = AddressingHelper.inboundMap(ctx);
    final ArjunaContext arjunaContext = ArjunaContext.getCurrentContext(ctx);
    TaskManager.getManager().queueTask(new Task() {

        public void executeTask() {
            CoordinatorCompletionCoordinatorProcessor.getProcessor().fail(fail, inboundMap, arjunaContext);
        }
    });
}
Also used : ExceptionType(org.oasis_open.docs.ws_tx.wsba._2006._06.ExceptionType) Task(com.arjuna.services.framework.task.Task) MessageContext(javax.xml.ws.handler.MessageContext) ArjunaContext(com.arjuna.webservices11.wsarj.ArjunaContext) MAP(org.jboss.ws.api.addressing.MAP) Action(javax.xml.ws.Action)

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 ExceptionType (net.opengis.ows.v_1_0_0.ExceptionType)3 ExceptionType (net.opengis.ows.x11.ExceptionType)3 Task (com.arjuna.services.framework.task.Task)2 ArjunaContext (com.arjuna.webservices11.wsarj.ArjunaContext)2 ArrayList (java.util.ArrayList)2 Action (javax.xml.ws.Action)2 MessageContext (javax.xml.ws.handler.MessageContext)2 WfsException (org.codice.ddf.spatial.ogc.wfs.catalog.common.WfsException)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