本文整理汇总了Java中org.apache.axiom.util.UIDGenerator类的典型用法代码示例。如果您正苦于以下问题:Java UIDGenerator类的具体用法?Java UIDGenerator怎么用?Java UIDGenerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UIDGenerator类属于org.apache.axiom.util包,在下文中一共展示了UIDGenerator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:17,代码来源:ErrorResponseBuilder.java
示例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);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:AddressingOutHandler.java
示例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);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:PolicyInclude.java
示例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);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:PolicyInclude.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:25,代码来源:OperationContextTest.java
示例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;
}
开发者ID:wso2-extensions,项目名称:esb-connector-file,代码行数:16,代码来源:FileMoveUnitTest.java
示例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();
}
开发者ID:wso2,项目名称:carbon-registry,代码行数:35,代码来源:CarbonEventBroker.java
示例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();
}
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:8,代码来源:SwATestCase.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:OutInAxisOperation.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:PolicySubject.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:9,代码来源:OutOnlyAxisOperation.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:11,代码来源:AxisOperation.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:RobustOutOnlyAxisOperation.java
示例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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:9,代码来源:InOnlyAxisOperation.java
示例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();
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:TwoChannelAxisOperation.java
示例16: createPolicyReference
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
public static PolicyReference createPolicyReference(Policy policy) {
PolicyReference policyReference = new PolicyReference();
String key = policy.getName();
if (key == null) {
key = policy.getId();
if (key == null) {
key = UIDGenerator.generateUID();
policy.setId(key);
}
policyReference.setURI("#" + key);
} else {
policyReference.setURI(key);
}
return policyReference;
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:PolicyUtil.java
示例17: 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);
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:Utils.java
示例18: readInSchema
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
/**
* This method will read in all of the schema files that were generated
* for a given application.
*/
private HashMap<String, XmlSchema> readInSchema(String localOutputDirectory,
JAXWSCatalogManager catalogManager) throws Exception {
try {
XmlSchemaCollection schemaCollection = new XmlSchemaCollection();
if (catalogManager != null)
schemaCollection.setSchemaResolver(new CatalogURIResolver(catalogManager));
schemaCollection.setBaseUri(new File(localOutputDirectory).getAbsolutePath());
HashMap<String, XmlSchema> docMap = new HashMap<String, XmlSchema>();
// Doc factory to read schema files
DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
fac.setNamespaceAware(true);
List<File> schemaFiles = getSchemaFiles(localOutputDirectory);
for (File schemaFile : schemaFiles) {
// generate dom document for current schema file
Document parsedDoc = fac.newDocumentBuilder().parse(schemaFile.toURL().toString());
// read the schema through XmlSchema
XmlSchema doc = schemaCollection.read(parsedDoc.getDocumentElement(),
UIDGenerator.generateUID());
if (log.isDebugEnabled()) {
log.debug("Read in schema file: " + schemaFile.getName());
}
docMap.put(schemaFile.getName(), doc);
}
return docMap;
}
catch (Exception e) {
String msg = "Error occurred while attempting to read generated schema file";
log.error(msg, e);
throw new Exception(msg);
}
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:40,代码来源:JAXWSRIWSDLGenerator.java
示例19: getServiceID
import org.apache.axiom.util.UIDGenerator; //导入依赖的package包/类
private String getServiceID(Config config, AxisService service) throws Exception {
String uniqueID = config.getUniqueId();
if (uniqueID == null) {
// Get the unique id from the registry.
// Use the service to get hold of the Carbon context of the tenant
// to which the service belongs
Registry registry = (Registry) PrivilegedCarbonContext.getThreadLocalCarbonContext().
getRegistry(RegistryType.SYSTEM_CONFIGURATION);
uniqueID = DiscoveryMgtUtils.getExistingServiceIdOrUpdate(getNameForService(service),
UIDGenerator.generateURNString(), registry);
}
return uniqueID;
}
开发者ID:wso2,项目名称:carbon-commons,代码行数:15,代码来源:MessageSender.java
示例20: 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.topicManagerService.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();
}
开发者ID:wso2,项目名称:carbon-business-messaging,代码行数:35,代码来源:CarbonEventBroker.java
注:本文中的org.apache.axiom.util.UIDGenerator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论