本文整理汇总了Java中org.apache.axiom.util.UIDGenerator.generateURNString方法的典型用法代码示例。如果您正苦于以下问题:Java UIDGenerator.generateURNString方法的具体用法?Java UIDGenerator.generateURNString怎么用?Java UIDGenerator.generateURNString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axiom.util.UIDGenerator
的用法示例。
在下文中一共展示了UIDGenerator.generateURNString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processMessageID
import org.apache.axiom.util.UIDGenerator; //导入方法依赖的package包/类
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);
}
}
示例2: fillServiceContextAndServiceGroupContext
import org.apache.axiom.util.UIDGenerator; //导入方法依赖的package包/类
private static ServiceContext fillServiceContextAndServiceGroupContext(AxisService axisService,
ConfigurationContext configurationContext)
throws AxisFault {
String serviceGroupContextId = UIDGenerator.generateURNString();
ServiceGroupContext serviceGroupContext =
configurationContext.createServiceGroupContext(axisService.getAxisServiceGroup());
serviceGroupContext.setId(serviceGroupContextId);
configurationContext.addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
return serviceGroupContext.getServiceContext(axisService);
}
示例3: setMessageID
import org.apache.axiom.util.UIDGenerator; //导入方法依赖的package包/类
/**
* Create a message ID for the given message context if needed. If user gives an option with
* MessageID then just copy that into MessageContext , and with that there can be multiple
* message with same MessageID unless user call setOption for each invocation.
* <p/>
* If user want to give message ID then the better way is to set the message ID in the option and
* call setOption for each invocation then the right thing will happen.
* <p/>
* If user does not give a message ID then the new one will be created and set that into Message
* Context.
*
* @param mc the message context whose id is to be set
*/
protected void setMessageID(MessageContext mc) {
// now its the time to put the parameters set by the user in to the
// correct places and to the
// if there is no message id still, set a new one.
String messageId = options.getMessageId();
if (messageId == null || "".equals(messageId)) {
messageId = UIDGenerator.generateURNString();
}
mc.setMessageID(messageId);
}