use of net.opengis.ows.x11.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);
}
});
}
use of net.opengis.ows.x11.ExceptionType in project narayana by jbosstm.
the class CoordinatorCompletionCoordinatorClient method sendFail.
/**
* Address
* Send a fail request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendFail(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier, final QName exceptionIdentifier) throws SoapFault, IOException {
MAPEndpoint participant = getParticipant(endpoint, map);
AddressingHelper.installFromFaultTo(map, participant, identifier);
BusinessAgreementWithCoordinatorCompletionCoordinatorPortType port;
port = getPort(endpoint, map, failAction);
ExceptionType fail = new ExceptionType();
fail.setExceptionIdentifier(exceptionIdentifier);
port.failOperation(fail);
}
use of net.opengis.ows.x11.ExceptionType in project narayana by jbosstm.
the class ParticipantCompletionCoordinatorClient method sendFail.
/**
* Send a fault request.
* @param map addressing context initialised with to and message ID.
* @param identifier The identifier of the initiator.
* @throws com.arjuna.webservices.SoapFault For any errors.
* @throws java.io.IOException for any transport errors.
*/
public void sendFail(W3CEndpointReference endpoint, final MAP map, final InstanceIdentifier identifier, final QName exceptionIdentifier) throws SoapFault, IOException {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".sendFail");
}
MAPEndpoint participant = getParticipant(endpoint, map);
AddressingHelper.installFromFaultTo(map, participant, identifier);
BusinessAgreementWithParticipantCompletionCoordinatorPortType port;
port = getPort(endpoint, map, failAction);
ExceptionType fail = new ExceptionType();
fail.setExceptionIdentifier(exceptionIdentifier);
port.failOperation(fail);
}
use of net.opengis.ows.x11.ExceptionType in project narayana by jbosstm.
the class BusinessAgreementWithParticipantCompletionCoordinatorPortTypeImpl 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) {
if (WSTLogger.logger.isTraceEnabled()) {
WSTLogger.logger.trace(getClass().getSimpleName() + ".failOperation");
}
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() {
ParticipantCompletionCoordinatorProcessor.getProcessor().fail(fail, inboundMap, arjunaContext);
}
});
}
use of net.opengis.ows.x11.ExceptionType in project ddf by codice.
the class WfsResponseExceptionMapper method convertToWfsException.
private WfsException convertToWfsException(ExceptionReport report) {
WfsException wfsException = null;
List<ExceptionType> list = new ArrayList<ExceptionType>(report.getException());
if (list.size() > 0) {
Collections.reverse(list);
for (ExceptionType exceptionType : list) {
String exceptionCode = exceptionType.getExceptionCode();
String locator = exceptionType.getLocator();
List<String> exceptionText = exceptionType.getExceptionText();
StringBuilder exceptionMsg = new StringBuilder();
// Exception code is required per CSW schema, but check it anyway
if (StringUtils.isNotBlank(exceptionCode)) {
exceptionMsg.append("exceptionCode = " + exceptionCode + "\n");
} else {
exceptionMsg.append("exceptionCode = UNSPECIFIED");
}
// Locator and exception text(s) are both optional
if (StringUtils.isNotBlank(locator)) {
exceptionMsg.append("locator = " + locator + "\n");
}
if (!CollectionUtils.isEmpty(exceptionText)) {
for (String text : exceptionText) {
exceptionMsg.append(text);
}
}
wfsException = new WfsException(exceptionMsg.toString());
}
if (null == wfsException) {
wfsException = new WfsException("Empty Service Exception Report (version = " + report.getVersion() + ")");
}
} else {
wfsException = new WfsException("Empty Service Exception Report (version = " + report.getVersion() + ")");
}
return wfsException;
}
Aggregations