/** * Creates an InputNode. * * @param graph */ public StreamSourceNode(Graph graph) { super(graph); this.label = UUIDGenerator.getUUID(); }
public String getContentID() { if (contentID == null) { contentID = UUIDGenerator.getUUID() + "@apache.org"; } return this.contentID; }
/** * Constructs an InputNode. * * @param nodeElement * @throws GraphException */ public StreamSourceNode(XmlElement nodeElement) throws GraphException { super(nodeElement); this.label = UUIDGenerator.getUUID(); }
public static String getUUID() { String uuid = org.apache.axiom.om.util.UUIDGenerator.getUUID(); return uuid; } }
public String generateRequestId() { return UUIDGenerator.getUUID(); }
/** * Create a new UUID. * * @return */ public static String getUUID() { // String uuid = "uuid:" + UUIDGenerator.getUUID(); String uuid = org.apache.axiom.om.util.UUIDGenerator.getUUID(); return uuid; }
public static String getRamdomId() { return UUIDGenerator.getUUID(); }
/** * Generates an Id for a subscription. * * @return the generated Id as String */ public static String generateId() throws EventingException { // generate an ID for this subscription String id = UUIDGenerator.getUUID(); try { URI uri = new URI(id); return uri.getSchemeSpecificPart(); } catch (URISyntaxException e) { throw new EventingException(e); } }
@Override protected void updateMessageID() throws MessagingException { // although MailConstants.MAIL_HEADER_X_MESSAGE_ID solves the gmail problem with axis2-axis2 // invocations it is not a generic solution. // we can over come gmail problem by setting the message id as follows with a valid gmail address // <xxxx@gmail.com> this can be achived by appending from address at the end of uuid if (getHeader(MailConstants.MAIL_HEADER_MESSAGE_ID) == null) { String uuid = "<" + UUIDGenerator.getUUID().replaceAll(":",".") + fromAddress +">"; setHeader(MailConstants.MAIL_HEADER_MESSAGE_ID, uuid); } }
public static Options getOptions(String soapAction, long timeout, EndpointReference destination) { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setAction(soapAction); opts.setTimeOutInMilliSeconds(timeout); opts.setMessageId(UUIDGenerator.getUUID()); opts.setTo(destination); return opts; }
public static Options getOptions(String soapAction, long timeout, EndpointReference destination) { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setAction(soapAction); opts.setTimeOutInMilliSeconds(timeout); opts.setMessageId(UUIDGenerator.getUUID()); opts.setTo(destination); return opts; }
public String subscribe(Subscription subscription) throws EventException { if (subscription.getId() == null) { subscription.setId(org.apache.axiom.om.util.UUIDGenerator.getUUID()); } store.put(subscription.getId(), subscription); return subscription.getId(); }
private ServiceClient createServiceClient() throws AxisFault { String uuid = UUIDGenerator.getUUID(); Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(new EndpointReference(this.msgBoxEndPointReference)); opts.setMessageId(uuid); opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "createMsgBox"); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); ServiceClient client = new ServiceClient(); try { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); if (logger.isDebugEnabled()) logger.debug("Addressing module engaged"); } catch (AxisFault e) { if (logger.isDebugEnabled()) logger.debug("Addressing module not engaged :" + e); } client.setOptions(opts); return client; }
private ServiceClient createServiceClient() throws AxisFault { String uuid = UUIDGenerator.getUUID(); Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(new EndpointReference(this.msgBoxEndPointReference)); opts.setMessageId(uuid); opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "createMsgBox"); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); ServiceClient client = new ServiceClient(); try { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); if (logger.isDebugEnabled()) logger.debug("Addressing module engaged"); } catch (AxisFault e) { if (logger.isDebugEnabled()) logger.debug("Addressing module not engaged :" + e); } client.setOptions(opts); return client; }
private ServiceClient createServiceClient() throws AxisFault { String uuid = UUIDGenerator.getUUID(); Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(msgBoxEndPointReference); opts.setMessageId(uuid); opts.setAction(NameSpaceConstants.MSG_BOX.getNamespaceURI() + "/" + "storeMessages"); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); ServiceClient client = new ServiceClient(); try { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); if (logger.isDebugEnabled()) logger.debug("Addressing module engaged"); } catch (AxisFault e) { if (logger.isDebugEnabled()) logger.debug("Addressing module not engaged :" + e); } client.setOptions(opts); return client; } }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { String uuid = UUIDGenerator.getUUID(); Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(msgBoxEndPointReference); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); ServiceClient client = new ServiceClient(); try { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); if (logger.isDebugEnabled()) logger.debug("Addressing module engaged"); } catch (AxisFault e) { if (logger.isDebugEnabled()) logger.debug("Addressing module not engaged :" + e); } client.setOptions(opts); return client; } }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { String uuid = UUIDGenerator.getUUID(); Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(msgBoxEndPointReference); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); ServiceClient client = new ServiceClient(); try { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); if (logger.isDebugEnabled()) logger.debug("Addressing module engaged"); } catch (AxisFault e) { if (logger.isDebugEnabled()) logger.debug("Addressing module not engaged :" + e); } client.setOptions(opts); return client; } }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { String uuid = UUIDGenerator.getUUID(); ServiceClient client = new ServiceClient(); if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); } else { SOAPHeaderBlock msgId = soapfactory.createSOAPHeaderBlock("MessageID", NameSpaceConstants.WSA_NS); msgId.setText(uuid); SOAPHeaderBlock to = soapfactory.createSOAPHeaderBlock("To", NameSpaceConstants.WSA_NS); to.setText(opts.getTo().getAddress()); SOAPHeaderBlock action = soapfactory.createSOAPHeaderBlock("Action", NameSpaceConstants.WSA_NS); action.setText(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); client.addHeader(action); client.addHeader(msgId); client.addHeader(to); } opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); client.setOptions(opts); return client; }
private MessageContext getNewMessageContextUsingAxis2Info(CreateSequenceMessage createSequenceMessage) throws AxisFault, RMMessageBuildingException { MessageContext messageContext = new MessageContext(); messageContext.setServiceContext(this.axis2Info.getServiceContext()); messageContext.setEnvelope(createSequenceMessage.toSOAPEnvelope()); messageContext.setMessageID(UUIDGenerator.getUUID()); messageContext.setTransportIn(this.axis2Info.getTransportIn()); messageContext.setTransportOut(this.axis2Info.getTransportOut()); messageContext.setReplyTo(this.ackToEpr); messageContext.setProperty(MercuryConstants.PROCESS_RM_CONTROL_MESSAGE, Constants.VALUE_TRUE); messageContext.setOptions(new Options()); // set the correct options messageContext.getOptions().setTo(this.axis2Info.getOptions().getTo()); messageContext.getOptions().setUseSeparateListener(this.axis2Info.getOptions().isUseSeparateListener()); messageContext.setServerSide(this.axis2Info.isServerSide()); return messageContext; }
public static void setHeaders(String soapAction, String destination, ServiceClient client, OMElement... customHeaders) throws AxisFault { SOAPFactory soapfactory = OMAbstractFactory.getSOAP11Factory(); SOAPHeaderBlock msgId = soapfactory.createSOAPHeaderBlock("MessageID", NameSpaceConstants.WSA_NS); msgId.setText(UUIDGenerator.getUUID()); SOAPHeaderBlock to = soapfactory.createSOAPHeaderBlock("To", NameSpaceConstants.WSA_NS); to.setText(destination); SOAPHeaderBlock action = soapfactory.createSOAPHeaderBlock("Action", NameSpaceConstants.WSA_NS); action.setText(soapAction); client.addHeader(action); client.addHeader(msgId); client.addHeader(to); for (OMElement h : customHeaders) { try { client.addHeader(org.apache.axiom.om.util.ElementHelper.toSOAPHeaderBlock(h, soapfactory)); } catch (Exception e) { throw AxisFault.makeFault(e); } } } }