Subject: [ietf-provreg] defining a reason code

From: Eugenio Pinto <[email-masked]>
Date: Wed, 02 Apr 2008 12:07:21 +0100

Hi,

I have another question regarding extending response codes.

I defined the following response message:

<epp xmlns="urn:ietf:params:xml:ns:epp-1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">
  <response>
    <result code="2200">
      <msg>Authentication error</msg>
      <value>
        *<reason>5004</reason>*
      </value>
    </result>
    <trID>
      <clTRID>FCCN-12386</clTRID>
      <svTRID>TRN7063050306</svTRID>
    </trID>
  </response>
</epp>

where the reason element represents the code to a specific verified problem.

But I don't know if this is valid XML.

Can I define this this way, or I must include something with the 
namespace? like

    <result code="2200">
      <msg>Authentication error</msg>
      <value>
*        <ptdomain:panData 
xmlns:ptdomain="urn:ietf:params:xml:ns:ptdomain-1.0" 
xsi:schemaLocation="urn:ietf:params:xml:ns:ptdomain1.0 ptdomain-1.0.xsd">
      **    <ptdomain:reason>**5004**</ptdomain:reason>
**        <brdomain:panData>*
      </value>
    </result>

Thanks for your feedback.

---

From: "Hollenbeck, Scott" <[email-masked]>
Date: Wed, 2 Apr 2008 07:16:35 -0400

From section 2.6 of RFC 4930:
 
"Zero or more OPTIONAL <extValue> elements", and
 
"A <reason> element containing a human-readable message that describes
the reason for the error.  The language of the response is identified
via an OPTIONAL "lang" attribute.  If not specified, the default
attribute value MUST be "en" (English)."
 
No namespace needed, but you've got the <reason> element inside a
<value> element when it should be inside an <extValue> element.  You
should have some text in there, too.  Perhaps something like "5004:
Invalid password".

-Scott- 

________________________________

	From: Eugenio Pinto [mailto:[email-masked]] 
	Sent: Wednesday, April 02, 2008 7:07 AM
	To: [email-masked]; Hollenbeck, Scott
	Subject: defining a reason code

	Hi,

	
<http://www.w3.org/2001/XMLSchema-instance>
	        <reason>5004</reason>
	
	where the reason element represents the code to a specific
verified problem.

	
	    <result code="2200">
	      <msg>Authentication error</msg>
	      <value>
	        <ptdomain:panData
xmlns:ptdomain="urn:ietf:params:xml:ns:ptdomain-1.0"
xsi:schemaLocation="urn:ietf:params:xml:ns:ptdomain1.0
ptdomain-1.0.xsd"> 
	          <ptdomain:reason>5004</ptdomain:reason>
	        <brdomain:panData>
	      </value>
	    </result>

---

From: Eugenio Pinto <[email-masked]>
Date: Thu, 03 Apr 2008 04:34:32 +0100

Ok.

The value and reason are required elements to the extValue type, aren't 
they?

So, I need always to have the value element even if I don't need it, right?

something like

*      <extValue>
        <value/>
        **<reason>5004: you must do the login first</reason>
      </extValue>*

Best Regards,
Eugenio

Hollenbeck, Scott wrote:
>     ------------------------------------------------------------------------
>     *From:* Eugenio Pinto [mailto:[email-masked]]
>     *Sent:* Wednesday, April 02, 2008 7:07 AM
>     *To:* [email-masked]; Hollenbeck, Scott
>     *Subject:* defining a reason code
>
>     Hi,
>

---

From: "Hollenbeck, Scott" <[email-masked]>
Date: Thu, 3 Apr 2008 07:16:24 -0400

Correct, if you use <extValue> you need both <value> and <reason>.  The
<value> should be the slice of XML that's causing the error.
 
Looking at the example below, though, I don't quite see what you're
trying to do.  A 2201 error code would be more appropriate for someone
trying to execute a command before doing a <login>.  You could then use
a <value> (containing the XML command that failed, for example) after
the <msg> without using <extValue> at all.

-Scott- 

	From: Eugenio Pinto [mailto:[email-masked]] 
	Sent: Wednesday, April 02, 2008 11:35 PM
	To: Hollenbeck, Scott
	Cc: [email-masked]
	Subject: Re: defining a reason code

	Ok.
	
	The value and reason are required elements to the extValue type,
aren't they?
	
	So, I need always to have the value element even if I don't need
it, right?
	
	something like
	
	      <extValue>
	        <reason>5004: you must do the login first</reason>
	      </extValue>
	
	Best Regards,
	Eugenio

	Hollenbeck, Scott wrote: 

		 
		"A <reason> element containing a human-readable message
that describes the reason for the error.  The language of the response
is identified via an OPTIONAL "lang" attribute.  If not specified, the
default attribute value MUST be "en" (English)."
		 
		No namespace needed, but you've got the <reason> element
inside a <value> element when it should be inside an <extValue> element.
You should have some text in there, too.  Perhaps something like "5004:
Invalid password".

		-Scott- 

			From: Eugenio Pinto
[mailto:[email-masked]] 
			Sent: Wednesday, April 02, 2008 7:07 AM
			To: [email-masked]; Hollenbeck, Scott
			Subject: defining a reason code

			Hi,
			
			I have another question regarding extending
response codes.

			
			where the reason element represents the code to
a specific verified problem.

			Can I define this this way, or I must include
something with the namespace? like
			
			    <result code="2200">