cvc-complex-type.2.4.d:找到以元素' sslCertificateAlias'开头的无效内容。此时不会有子元素

时间:2015-12-04 07:36:07

标签: ibm-mobilefirst worklight-adapters mobilefirst-adapters

当我在adapter.xml中启用SSL元素时。我收到了错误

cvc-complex-type.2.4.d:找到以元素' sslCertificateAlias'开头的无效内容。此时不会有子元素。

有什么方法可以解决这个问题吗?

我的xml结构如下所示。

<displayName>Test525Adapter</displayName>
    <description>Test525Adapter</description>
    <connectivity>
        <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
            <protocol>https</protocol>
            <domain>docs.oracle.com</domain>
            <port>443</port>
        <connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
            <socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
        <maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
            <sslCertificateAlias></sslCertificateAlias> 
            <sslCertificatePassword></sslCertificatePassword>
        </connectionPolicy>
    </connectivity>

1 个答案:

答案 0 :(得分:2)

这是由于元素的顺序。将其更改为以下内容,它应该没问题:

<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
            <protocol>https</protocol>
            <domain>developer.ibm.com</domain>
            <port>443</port>
            <connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
            <socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
            <sslCertificateAlias>...</sslCertificateAlias> 
            <sslCertificatePassword>...</sslCertificatePassword>
            <maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
        </connectionPolicy>