本文整理汇总了Java中org.apache.axiom.util.UIDGenerator类的典型用法代码示例。如果您正苦于以下问题:Java UIDGenerator类的具体用法?Java UIDGenerator怎么用?Java UIDGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIDGenerator类属于org.apache.axiom.util包,在下文中一共展示了UIDGenerator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateErrorneousResponse
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public static String generateErrorneousResponse() {
Response response = new ResponseBuilder().buildObject();
response.setIssuer(getIssuer());
response.setStatus(buildStatus());
response.setVersion(SAMLVersion.VERSION_20);
response.setID(UIDGenerator.generateUID());
try {
return encode(marshall(response));
} catch (IdentityException e) {
if (log.isDebugEnabled()) {
log.debug("Error while encoding.", e);
}
return null;
}
}
示例2: 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);
}
}
示例3: setPolicy
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* @param policy
* @see org.apache.axis2.description.PolicySubject#attachPolicy(Policy)
* @see org.apache.axis2.description.PolicySubject#clear()
* @deprecated As of 1.4 release, replaced by
* {@link PolicySubject #attachPolicy(Policy)} Use
* {@link PolicySubject #clear()} beforehand effective policy of
* {@link AxisDescription} has to be set as the argument.
*
*/
public void setPolicy(Policy policy) {
wrapperElements.clear();
if (policy.getName() == null && policy.getId() == null) {
policy.setId(UIDGenerator.generateUID());
}
Wrapper wrapper = new Wrapper(PolicyInclude.ANON_POLICY, policy);
if (policy.getName() != null) {
wrapperElements.put(policy.getName(), wrapper);
} else {
wrapperElements.put(policy.getId(), wrapper);
}
if (description != null) {
description.getPolicySubject().clear();
description.getPolicySubject().attachPolicy(policy);
}
}
示例4: addPolicyElement
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* @deprecated As of 1.4 release, replaced by
* {@link PolicySubject #attachPolicy(Policy)}
*/
public void addPolicyElement(int type, Policy policy) {
String key;
if ((key = policy.getName()) == null && (key = policy.getId()) == null) {
policy.setId(UIDGenerator.generateUID());
}
key = (policy.getName() != null) ? policy.getName() : policy.getId();
Wrapper wrapper = new Wrapper(type, policy);
wrapperElements.put(key, wrapper);
reg.register(key, policy);
if (description != null) {
description.getPolicySubject().attachPolicy(policy);
}
}
示例5: testMEPfindingOnRelatesTO
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public void testMEPfindingOnRelatesTO() throws Exception {
AxisService axisService = new AxisService("TempSC");
configContext.getAxisConfiguration().addService(axisService);
ServiceGroupContext sgc = configContext.createServiceGroupContext(
axisService.getAxisServiceGroup());
ServiceContext sessionContext = sgc.getServiceContext(axisService);
MessageContext messageContext1 = this.getBasicMessageContext();
messageContext1.setMessageID(UIDGenerator.generateURNString());
AxisOperation axisOperation = new InOutAxisOperation(new QName("test"));
OperationContext operationContext1 = axisOperation
.findOperationContext(messageContext1, sessionContext);
axisOperation.registerOperationContext(messageContext1, operationContext1);
MessageContext messageContext2 = this.getBasicMessageContext();
messageContext2.setMessageID(UIDGenerator.generateURNString());
messageContext2.getOptions().addRelatesTo(
new RelatesTo(messageContext1.getMessageID()));
messageContext2.setAxisOperation(axisOperation);
OperationContext operationContext2 = axisOperation
.findOperationContext(messageContext2, sessionContext);
assertEquals(operationContext1, operationContext2);
}
示例6: createSynapseMessageContext
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
private MessageContext createSynapseMessageContext() throws AxisFault {
org.apache.axis2.context.MessageContext axis2MC = new org.apache.axis2.context.MessageContext();
axis2MC.setConfigurationContext(this.configContext);
ServiceContext svcCtx = new ServiceContext();
OperationContext opCtx = new OperationContext(new InOutAxisOperation(), svcCtx);
axis2MC.setServiceContext(svcCtx);
axis2MC.setOperationContext(opCtx);
Axis2MessageContext mc = new Axis2MessageContext(axis2MC, this.synapseConfig, null);
mc.setMessageID(UIDGenerator.generateURNString());
mc.setEnvelope(OMAbstractFactory.getSOAP12Factory().createSOAPEnvelope());
mc.getEnvelope().addChild(OMAbstractFactory.getSOAP12Factory().createSOAPBody());
return mc;
}
示例7: subscribe
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public String subscribe(Subscription subscription)
throws EventBrokerException {
//if there is a subscription with the same topic and event sink url then
//we think it is the same subscription.
Subscription existingSubscription = getExistingNonExpiredSubscription(subscription);
if (existingSubscription != null) {
return existingSubscription.getId();
}
if (EventBrokerHolder.getInstance().getTenantDomain() != null) {
subscription.setTenantDomain(EventBrokerHolder.getInstance().getTenantDomain());
subscription.setTenantId(EventBrokerHolder.getInstance().getTenantId());
}
// generates an id for the subscription
subscription.setId(UIDGenerator.generateUID());
this.topicManager.addTopic(subscription.getTopicName());
this.deliveryManager.subscribe(subscription);
if (subscription.getEventDispatcherName() != null) {
// we persists a subscription only if it has a event dispatcher
// name. the subscriptions with only an event dispatcher is not persisted.
this.subscriptionManager.addSubscription(subscription);
} else {
if (subscription.getEventDispatcher() == null) {
throw new EventBrokerException(" subscription url, event " +
"dispatcher name and event dispatcher is null");
}
}
return subscription.getId();
}
示例8: setUp
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
attachmentContent = new byte[8192];
random.nextBytes(attachmentContent);
contentID = UIDGenerator.generateContentId();
}
示例9: OutInAxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public OutInAxisOperation() {
super();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_IN);
}
示例10: attachPolicy
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public void attachPolicy(Policy policy) {
String key = policy.getName();
if (key == null) {
key = policy.getId();
if (key == null) {
key = UIDGenerator.generateUID();
policy.setId(key);
}
}
attachPolicyComponent(key, policy);
}
示例11: OutOnlyAxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public OutOnlyAxisOperation() {
super();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
createMessage();
setMessageExchangePattern(WSDL2Constants.MEP_URI_OUT_ONLY);
}
示例12: AxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/** Default constructor */
public AxisOperation() {
mepURI = WSDL2Constants.MEP_URI_IN_OUT;
modulerefs = new ArrayList<String>();
moduleConfigmap = new HashMap<String, ModuleConfiguration>();
faultMessages = new ArrayList<AxisMessage>();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
}
示例13: RobustOutOnlyAxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public RobustOutOnlyAxisOperation() {
super();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
setMessageExchangePattern(WSDL2Constants.MEP_URI_ROBUST_OUT_ONLY);
}
示例14: InOnlyAxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public InOnlyAxisOperation() {
super();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
createMessage();
setMessageExchangePattern(WSDL2Constants.MEP_URI_IN_ONLY);
}
示例15: TwoChannelAxisOperation
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public TwoChannelAxisOperation() {
super();
//setup a temporary name
QName tmpName = new QName(this.getClass().getName() + "_" + UIDGenerator.generateUID());
this.setName(tmpName);
createMessages();
}