Key Value Map Operations policy not working as expected

I'm trying to use a key-value map in my proxy. While initializing the Key-value pair using Parameter Ref as key, it is throwing an error saying "Invalid Key Names for entries".

My code snippet:

<InitialEntries> 
  <Entry> 
    <Key> 
      <Parameter ref="key_name_variable"></Parameter> 
    </Key> 
    <Value>xx</Value> 
  </Entry> 
</InitialEntries>

But when i referred the Document :http://apigee.com/docs/api-services/reference/key-value-map-operations-policy

It contains the same format. Snippet from the Document:

<InitialEntries>
  <Entry>
    <Key>
      <Parameter>key_name_literal</Parameter>
    </Key>
    <Value>v1</Value>
  </Entry>
  <Entry>
    <Key>
      <Parameter ref="key_name_variable"></Parameter>
    </Key>
    <Value>v3</Value>
    <Value>v4</Value>
  </Entry>
</InitialEntries>

Please let me know if anyone has faced the same problem or how can it be resolved.

1 3 555
3 REPLIES 3

Not applicable

It is possible that your key contains invalid characters. Can you paste an example key value?

As for which characters are invalid; I believe slashes and colons are not valid for use in KVM key values.

adding to @sriki77, have you initialized this flow variable "key_name_variable"?, the value of the variable "key_name_variable" will be used as a key.

Not applicable

the plus sign is also invalid. "+"