/** * @param messageId */ public void setMessageID(String messageId) { options.setMessageId(messageId); }
/** * @param messageId */ public void setMessageID(String messageId) { options.setMessageId(messageId); }
public void setWSAMessageId(String messageID) { options.setMessageId(messageID); }
public void setWSAMessageId(String messageID) { options.setMessageId(messageID); }
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; }
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() 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 void makeMessageReadyForReinjection(MessageContext messageContext) { messageContext.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, null); messageContext.getOptions().setMessageId(null); messageContext.getOptions().setTo(null); messageContext.getOptions().setAction(null); messageContext.setProperty(Sandesha2Constants.APPLICATION_PROCESSING_DONE, Sandesha2Constants.VALUE_TRUE); }
private void processMessageID() { String messageID = messageContextOptions.getMessageId(); //Check whether we want to force a message id to be sent. if (messageID == null && includeOptionalHeaders) { messageID = UIDGenerator.generateURNString(); messageContextOptions.setMessageId(messageID); } if (messageID != null && !isAddressingHeaderAlreadyAvailable(WSA_MESSAGE_ID, false)) {//optional ArrayList attributes = (ArrayList)messageContext.getLocalProperty( AddressingConstants.MESSAGEID_ATTRIBUTES); createSOAPHeaderBlock(messageID, WSA_MESSAGE_ID, attributes); } }
private void extractMessageIDInformation(SOAPHeaderBlock soapHeaderBlock, MessageContext messageContext) throws AxisFault { messageContext.getOptions().setMessageId(soapHeaderBlock.getText()); ArrayList attributes = extractAttributesFromSOAPHeaderBlock(soapHeaderBlock); if (attributes != null) { messageContext.setProperty(AddressingConstants.MESSAGEID_ATTRIBUTES, attributes); } soapHeaderBlock.setProcessed(); }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { ServiceClient client = new ServiceClient(); String uuid = UUIDGenerator.getUUID(); 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.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/generateEvent"); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); client.setOptions(opts); return client; }
private ServiceClient createServiceClient(OMElement message) throws AxisFault { ServiceClient client = new ServiceClient(); String uuid = UUIDGenerator.getUUID(); 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.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/generateEvent"); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); 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 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 ServiceClient createServiceClient(OMElement message) throws AxisFault { String uuid = UUIDGenerator.getUUID(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); 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); } 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.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setMessageId(uuid); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); client.setOptions(opts); return client; }