Skip to main content
Published: November 11 2009, 5:52:00 PMUpdated: September 26 2022, 8:50:06 AM

I'm getting, "ClosedNameSpace tag error", Error Code 21916516 as below:

<ShortMessage>ClosedNameSpace tag error.</ShortMessage>

  <LongMessage>Invalid tag value(s) in ClosedNameSpace tag(s) Größe.</LongMessage>

Why am I getting this error?

When you use Item Specifics or Variations, you need to ensure that if the recommended Name that you are using has SelectionMode set to SelectionOnly, then you should one of the recommended values.  The values are essentially a closed set and you cannot specify your own value. 

For example, if we make the following GetCategorySpecifics request using category 3020, as follows:

<?xml version="1.0" encoding="utf-8"?>
<GetCategorySpecificsRequest xmlns="urn:ebay:apis:eBLBaseComponents"> 
  <CategoryID>3020</CategoryID>
</GetCategorySpecificsRequest>

We see the following in the response.

<NameRecommendation>
      <Name>Farbe</Name>
      <ValidationRules>
        <MaxValues>1</MaxValues>
        <SelectionMode>SelectionOnly</SelectionMode>
      </ValidationRules>
      <ValueRecommendation>
        <Value>Beige</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Blau</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Braun</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Bronze</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Gelb</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Gold</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Grau</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Grün</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Lila</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Orange</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Pink</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Rosa</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Rot</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Schwarz</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Silber</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Türkis</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Weiß</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Transparent</Value>
      </ValueRecommendation>
      <ValueRecommendation>
        <Value>Bunt</Value>
      </ValueRecommendation>
    </NameRecommendation>

This means that for the Item recommendation Name "Farbe", the recommended values for the field "Value" are Beige, Blau, Braun, Bronze, etc. and you can specify only one of these values in your AddItem request.

Please note that this this particular error is encountered only for the item specific has SelectionMode as SelectionOnly.

If your AddItem request contains a value outside of those returned in the GetCategorySpecifics response, you will encounter this error.

ShortMessage>ClosedNameSpace tag error.</ShortMessage>

  <LongMessage>Invalid tag value(s) in ClosedNameSpace tag(s) Größe.</LongMessage>

Please make sure that the values passed in the VarationSpecificsSet and the VariationsSpecifics NameValueList matches the response of GetCategorySpecifics.

How well did this answer your question?
Answers others found helpful