if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) {
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) {
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) { brokerLocationEPR.addReferenceParameter(topicExpressionEl); client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING);
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); } else {
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 { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(brokerEndPointReference); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); opts.setMessageId(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(UUIDGenerator.getUUID()); 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 { Options opts = new Options(); opts.setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); opts.setTo(brokerEndPointReference); opts.setAction(message.getNamespace().getNamespaceURI() + "/" + message.getLocalName()); opts.setTimeOutInMilliSeconds(getTimeoutInMilliSeconds()); opts.setMessageId(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(UUIDGenerator.getUUID()); 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 { 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; }
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); } else {
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; }
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; }
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; }
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) {
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) {
public void destroy() throws AxisFault { String uuid = UUIDGenerator.getUUID(); opts.setMessageId(uuid); OMElement message = factory.createOMElement("Destroy", NameSpaceConstants.WSRL_NS); 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(this.resourceEndpointReference.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); client.sendRobust(message); }
if (client.getAxisConfiguration().getModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING) != null) { client.engageModule(WsmgCommonConstants.AXIS_MODULE_NAME_ADDRESSING); } else {
public void destroy() throws AxisFault { String uuid = UUIDGenerator.getUUID(); opts.setMessageId(uuid); OMElement message = factory.createOMElement("Destroy", NameSpaceConstants.WSRL_NS); 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(this.resourceEndpointReference.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); try { client.sendRobust(message); } catch (AxisFault axisFault) { axisFault.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. }finally { client.cleanup(); client.cleanupTransport(); } }