@Override public EndpointReference[] getEndpointReferences(AxisService service, String ip) { return new EndpointReference[] { new EndpointReference(MailConstants.TRANSPORT_PREFIX + emailAddress) }; }
public void setAcksToEndpointReference(EndpointReference acksToEndpointRef){ this.acksToEndpointRef = acksToEndpointRef; if(acksToEndpointRef != null){ acksToEPR = acksToEndpointRef.getAddress(); } }
/** * @param qname * @param value - the text of the OMElement. Remember that this is a convenient method for the user, * which has limited capability. If you want more power use @See EndpointReference#addReferenceParameter(OMElement) */ public void addReferenceParameter(QName qname, String value) { if (qname == null) { return; } OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(qname, null); omElement.setText(value); addReferenceParameter(omElement); }
protected org.apache.axis2.addressing.EndpointReference getWSATOEPR(WebServiceBinding binding) { org.apache.axis2.addressing.EndpointReference epr = getEPR(binding); if (epr == null) { epr = getPortLocationEPR(binding); } else if (epr.getAddress() == null || epr.getAddress().length() < 1) { org.apache.axis2.addressing.EndpointReference bindingEPR = getPortLocationEPR(binding); if (bindingEPR != null) { epr.setAddress(bindingEPR.getAddress()); } } return epr; }
public MessagePuller startPullingFromExistingMsgBox(EndpointReference msgBoxAddr, NotificationHandler handler, long interval, long timeout) throws MsgBrokerClientException { String toAddress = msgBoxAddr.getAddress(); int biginIndex = toAddress.indexOf("clientid"); String clientId = toAddress.substring(biginIndex + "clientid".length() + 1); if ((msgBoxAddr.getAllReferenceParameters() == null || msgBoxAddr.getAllReferenceParameters() .get(MsgBoxQNameConstants.MSG_BOXID_QNAME).getText() == null) && biginIndex == -1) throw new MsgBrokerClientException("Invalid Message Box Address"); this.msgBoxUser = new MsgBoxClient(); MessagePuller messagePuller = new MessagePuller(msgBoxUser, msgBoxAddr, handler, interval, timeout); messagePuller.startPulling(); return messagePuller; }
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 static boolean hasReferenceParameters(EndpointReference epr){ Map<QName, OMElement> refParams = epr.getAllReferenceParameters(); if(refParams!=null){ if(!refParams.isEmpty()){ return true; } } return false; }
public MessagePuller startPullingFromExistingMsgBox(EndpointReference msgBoxAddr, NotificationHandler handler, long interval, long timeout) throws MsgBrokerClientException { String toAddress = msgBoxAddr.getAddress(); int biginIndex = toAddress.indexOf("clientid"); String clientId = toAddress.substring(biginIndex + "clientid".length() + 1); if ((msgBoxAddr.getAllReferenceParameters() == null || msgBoxAddr.getAllReferenceParameters() .get(MsgBoxQNameConstants.MSG_BOXID_QNAME).getText() == null) && biginIndex == -1) throw new MsgBrokerClientException("Invalid Message Box Address"); this.msgBoxUser = new MsgBoxClient(); MessagePuller messagePuller = new MessagePuller(msgBoxUser, msgBoxAddr, handler, interval, timeout); messagePuller.startPulling(); return messagePuller; }
public static String decodeSubscriptionResponse(OMElement subscriptionReference) throws AxisFault { String subscriptionId = null; EndpointReference subscriptionReferenceEPR = EndpointReferenceHelper.fromOM(subscriptionReference); Map<QName, OMElement> referenceParams = subscriptionReferenceEPR.getAllReferenceParameters(); if (referenceParams != null) { QName identifierQName = new QName(NameSpaceConstants.WSNT_NS.getNamespaceURI(), WsmgCommonConstants.SUBSCRIPTION_ID); OMElement identifierEl = referenceParams.get(identifierQName); subscriptionId = (identifierEl != null) ? identifierEl.getText() : null; } return subscriptionId; }
public EndpointReference getAcksToEndpointReference(){ if(acksToEndpointRef==null && acksToEPR!=null){ //this is for release to release compatability with serializaed data acksToEndpointRef = new EndpointReference(acksToEPR);; } return acksToEndpointRef; }
public void setOfferedEndPointEPR(EndpointReference offeredEndPointEPR) { this.offeredEndPointEPR = offeredEndPointEPR; this.offeredEndPoint = offeredEndPointEPR.getAddress(); }
public static String decodeSubscriptionResponse(OMElement subscriptionReference) throws AxisFault { String subscriptionId = null; EndpointReference subscriptionReferenceEPR = EndpointReferenceHelper.fromOM(subscriptionReference); Map<QName, OMElement> referenceParams = subscriptionReferenceEPR.getAllReferenceParameters(); if (referenceParams != null) { QName identifierQName = new QName(NameSpaceConstants.WSNT_NS.getNamespaceURI(), WsmgCommonConstants.SUBSCRIPTION_ID); OMElement identifierEl = referenceParams.get(identifierQName); subscriptionId = (identifierEl != null) ? identifierEl.getText() : null; } return subscriptionId; }
/** * @param qname * @param value - the text of the OMElement. Remember that this is a convenient method for the user, * which has limited capability. If you want more power use @See EndpointReference#addReferenceParameter(OMElement) */ public void addReferenceParameter(QName qname, String value) { if (qname == null) { return; } OMElement omElement = OMAbstractFactory.getOMFactory().createOMElement(qname, null); omElement.setText(value); addReferenceParameter(omElement); }
@Override public EndpointReference[] getEndpointReferences(AxisService service, String ip) { return new EndpointReference[] { new EndpointReference(MailConstants.TRANSPORT_PREFIX + emailAddress) }; }
public void setToEndpointReference(EndpointReference toEndpointRef){ this.toEndpointReference = toEndpointRef; toEPR = toEndpointReference.getAddress(); }
public static String decodeSubscriptionResponse(OMElement subscriptionReference) throws AxisFault { String subscriptionId = null; EndpointReference subscriptionReferenceEPR = EndpointReferenceHelper.fromOM(subscriptionReference); Map<QName, OMElement> referenceParams = subscriptionReferenceEPR.getAllReferenceParameters(); if (referenceParams != null) { QName identifierQName = new QName(NameSpaceConstants.WSNT_NS.getNamespaceURI(), WsmgCommonConstants.SUBSCRIPTION_ID); OMElement identifierEl = referenceParams.get(identifierQName); subscriptionId = (identifierEl != null) ? identifierEl.getText() : null; } return subscriptionId; }
public EndpointReference getReplyToEndpointReference(){ if(replyToEndpointReference==null && replyToEPR!=null){ //this is for release to release compatability with serializaed data replyToEndpointReference = new EndpointReference(replyToEPR);; } return replyToEndpointReference; }
public void setReplyToEndpointReference(EndpointReference replyToEndpointRef){ this.replyToEndpointReference = replyToEndpointRef; replyToEPR = replyToEndpointRef.getAddress(); }
public static String decodeSubscriptionResponse(OMElement subscriptionReference) throws AxisFault { String subscriptionId = null; EndpointReference subscriptionReferenceEPR = EndpointReferenceHelper.fromOM(subscriptionReference); Map<QName, OMElement> referenceParams = subscriptionReferenceEPR.getAllReferenceParameters(); if (referenceParams != null) { QName identifierQName = new QName(NameSpaceConstants.WSNT_NS.getNamespaceURI(), WsmgCommonConstants.SUBSCRIPTION_ID); OMElement identifierEl = referenceParams.get(identifierQName); subscriptionId = (identifierEl != null) ? identifierEl.getText() : null; } return subscriptionId; }
public EndpointReference getToEndpointReference(){ if(toEndpointReference==null && toEPR!=null){ //this is for release to release compatability with serializaed data toEndpointReference = new EndpointReference(toEPR);; } return toEndpointReference; }