Hello,
We’re trying to virtualize settings for our Splunk endpoint {splunkEndpointPort}, and when we try to save the following policy, it throws an error. The code is:
<MessageLogging name="commonLogToSplunk">
<Syslog>
<Message>{organization.name}.{apiproxy.name}.{environment.name}: {lastLogJSON}</Message>
<Host>{splunkEndpointUrl}</Host>
<Port>{splunkEndpointPort}</Port>
<Protocol>TCP</Protocol>
<SSLInfo>
<Enabled>true</Enabled>
</SSLInfo>
</Syslog>
</MessageLogging>
The error is:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.795 s
[INFO] Finished at: 2016-03-08T14:06:24-08:00
[INFO] Final Memory: 16M/232M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-ma ven-plugin:1.0.0:deploy (default-cli) on project fault-testing: MojoExecutionExc eption: 400 Bad Request
[ERROR] {
[ERROR] "code" : "rest.ValidationFailure",
[ERROR] "message" : "Error occurred while validation of bean commonLogToSplunk.x ml. Reason: - Schema validation failed. Cause : Not a number: {splunkEndpointPor t}. Line number : 5. Column number : 38. File name : commonLogToSplunk.xml..",
[ERROR] "contexts" : [ ]
[ERROR] }
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea d the following articles:
[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE](http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE) xception
I know the issue is the element is expecting a number, but if we want to virtualize this setting, it presents an issue with the XML validation it seems. Is there a work-around to circumvent the validation for this policy, or somehow cast this value to a number?
Thanks in Advance, Steve