Examples of WSEventException


Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

        try {
            Message message = new Message();
            message.setMessage(mc.getEnvelope().getBody().getFirstElement());
            getBrokerService().publishRobust(message, topic);
        } catch (EventBrokerException e) {
            throw new WSEventException("Can not publish the message : " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

                OMElement topicNode = (OMElement) topicXPath.selectSingleNode(mc.getEnvelope());
                if (topicNode != null) {
                    topic = topicNode.getText();
                }
            } catch (JaxenException e) {
                throw new WSEventException("can not process the xpath ", e);
            }
        }
        return topic;
    }
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

                        EventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
                        "Unable to subscribe ", "", mc.isSOAP11());
                dispatchResponse(soapEnvelope, EventingConstants.WSA_FAULT, mc, true);
            }
        } catch (Exception e) {
            throw new WSEventException(" Error at Subscribing : " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

                        subscription.getId());
            }
            SOAPEnvelope soapEnvelope = builder.fromSubscription(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_UNSUBSCRIBE_RESPONSE, mc, false);
        } catch (InvalidMessageException e) {
            throw new WSEventException("Invalid message ", e);
        } catch (EventBrokerException e) {
            log.debug("UnSubscription failed, sending fault repsponse");
            SOAPEnvelope soapEnvelope = BuilderUtils.genFaultResponse(
                    EventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
                    "Unable to Unsubscribe", "", mc.isSOAP11());
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

            }
            subscription = getBrokerService().getSubscription(subscription.getId());
            if (subscription != null) {
                String loggedInUser = EventBrokerUtils.getLoggedInUserName();
                if (!loggedInUser.equals("admin") && !loggedInUser.equals(subscription.getOwner())) {
                    throw new WSEventException("User " + loggedInUser + " does not own subscription " + subscription.getId());
                }
                if (log.isDebugEnabled()) {
                    log.debug("Sending GetStatus responce for Subscription ID : " +
                            subscription.getId());
                }
                SOAPEnvelope soapEnvelope = builder.fromSubscription(subscription);
                dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE, mc, false);
            } else {
                log.debug("GetStatus failed, sending fault response");
                SOAPEnvelope soapEnvelope = BuilderUtils.genFaultResponse(
                        EventingConstants.WSE_FAULT_CODE_RECEIVER, "EventSourceUnableToProcess",
                        "Subscription Not Found", "", mc.isSOAP11());
                dispatchResponse(soapEnvelope, EventingConstants.WSA_FAULT, mc, true);
            }
        } catch (InvalidMessageException e) {
            throw new WSEventException("Invalid message exception ", e);
        } catch (EventBrokerException e) {
            throw new WSEventException("Event processing exception ",e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

                    GetSubscriptionsCommandBuilder.buildResponseforGetSubscriptions(
                            filteredSubscriptions, maxResultCount, firstIndex);
            dispatchResponse(getSubscriptionsResponseEnv,
                    EventingConstants.WSE_RENEW_RESPONSE, mc, false);
        } catch (AxisFault e) {
            throw new WSEventException("Error at Get Subscriptions:" + e.getMessage(), e);
        } catch (EventBrokerException e) {
            throw new WSEventException("Can not get the subscriptions ", e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.event.ws.internal.exception.WSEventException

        try {
            Message message = new Message();
            message.setMessage(mc.getEnvelope().getBody().getFirstElement());
            getBrokerService().publishRobust(message, topic);
        } catch (EventBrokerException e) {
            throw new WSEventException("Can not publish the message : " + e.getMessage(), e);
        }

    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.