小编Zig*_*ust的帖子

XSD对属性的限制

我想我已经搜索了很多关于这一点但仍然没有去.

将不胜感激任何帮助.

我试图限制具有空内容的元素的属性."color"应限制为仅保持3位数或minLength = 3且maxLength = 3.它不应该有任何内容.

<?xml version="1.0" encoding="utf-8"?>
  <items xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="">
  <product id="" name="">
    <article id="1001">
      <umbrella color="100"/>
      <umbrella color="101"/>
    </article>
    <article id="1002">
      <umbrella color="110"/>
    </article>
  </product>
</items>
Run Code Online (Sandbox Code Playgroud)

编辑:我知道如何对simpleType进行XSD限制.但我不知道如何将它与一个具有ComplexType的实体结合起来.

如果您能提供更详细(或完整)的解决方案,我会很高兴.

顺便说一句,"颜色"不限于xs:整数.它实际上是一个xs:string.

attributes xsd restriction

19
推荐指数
1
解决办法
3万
查看次数

将用户添加到 ActiveMQ Artemis 失败

我需要一些有关向 ActiveMQ Artemis 添加新用户和角色的帮助。版本是2.16。

将 ActiveMQ Artemis 从 2.9.0 和 2.10.1 更新到 2.16 后,我们无法添加新用户。也许有更新的安全协议或其用法?

我们使用PropertiesLoginModule.

activemq {
   org.apache.activemq.artemis.spi.core.security.jaas.PropertiesLoginModule requisite
       debug=false
       reload=true
       org.apache.activemq.jaas.properties.user="artemis-users.properties"
       org.apache.activemq.jaas.properties.role="artemis-roles.properties";
};
Run Code Online (Sandbox Code Playgroud)

通常我们这样做是为了添加新用户

./artemis user add --user newUser --password newPassword --role Apps,newUser
Run Code Online (Sandbox Code Playgroud)

但升级到 2.16 后,我们在 CLI 中收到后续问题:
--user-command-user
--user-command-password

我尝试在其中添加管理员用户名/密码。但仍然是同样的异常。

我收到以下安全异常:

Connection failed::AMQ229031: Unable to validate user from /<IPAddress>:48000. Username: newUser; SSL certificate subject DN: unavailable
Exception in thread "main" ActiveMQSecurityException[errorType=SECURITY_EXCEPTION message=AMQ229031: Unable to validate user from /<IPAddress>:48002. Username: newUser; SSL certificate subject DN: unavailable]
        at …
Run Code Online (Sandbox Code Playgroud)

activemq-artemis

3
推荐指数
1
解决办法
4485
查看次数

Mule中的XML XSD验证和路由

我是Mule的新手,但使用了其他有关集成的产品.

从文件入站端点接收XML后,我想针对XSD验证它.如果验证失败,我想将其发送到JMS/VM队列,否则只需继续我的其他已经工作的流程.

我已经能够使用过滤器,它按预期工作.那些不合规的人会被网络空间抛弃.但我想处理这些并返回响应.

那么我可以选择其他什么方法呢?

是否有可以使用验证的XML/XSD路由器?

谢谢.

java xsd mule xsd-validation

2
推荐指数
1
解决办法
1307
查看次数

为 ActiveMQ Artemis 中的特定记录器启用 TRACE

如何设置logging.properties记录转移artemis.log

我明白TRACE应该用于org.apache.activemq.artemis.core.server.impl.DivertImpl

我该如何设置它etc/logging.properties

activemq-artemis

1
推荐指数
1
解决办法
523
查看次数