public WSMPublisher(int capacity, boolean defaultAsync, String brokerEpr_, boolean isXmlEpr) throws IOException { super(capacity, defaultAsync); if (!isXmlEpr) { brokerEpr = new EndpointReference(brokerEpr_);// EndpointReferenceHelper.fro(brokerEpr_); } else { brokerEpr = EndpointReferenceHelper.fromString(brokerEpr_); } broker = new WseMsgBrokerClient(); broker.init(brokerEpr.getAddress()); }
public Subscription renewMessageboxSubscription(String epr, String subscriptionId, String topic, String xpath, boolean subscribePermanatly) throws MsgBrokerClientException { this.subscriptionId = subscriptionId; this.topic = topic; WseMsgBrokerClient wseClient = new WseMsgBrokerClient(); EndpointReference endpointReference = null; try { endpointReference = EndpointReferenceHelper.fromString(epr); } catch (AxisFault f) { throw new MsgBrokerClientException("unable to convert end point reference", f); } subscriptionId = subscribeToBroker(endpointReference.getAddress(), topic, xpath, wseClient, subscribePermanatly); Subscription subscription = new Subscription(this, subscriptionId, topic, callback, this.brokerURL); subscription.setMessageBoxEpr(endpointReference); return subscription; }