You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by Arthur Ryman <ry...@ca.ibm.com> on 2006/04/18 17:51:32 UTC

MessageLabel should be NCName

John,

I noticed that you have modelled the {message label} property as an 
enumeration, MessageLabel. This is technically incorrect since the spec 
says it's an NCName. The API should treat it as an NCName. Checking for 
specific values should be done by the validation code for each Message 
Exchange Pattern.

I created a JIRA [1]. The fix is to delete MessageLabel and use NCName. 
Agreed? Shall I make the change? Thx.

[1] http://issues.apache.org/jira/browse/WODEN-8

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca

Re: MessageLabel should be NCName

Posted by Arthur Ryman <ry...@ca.ibm.com>.
John,

My gut reaction is that MessageLabel should be replaced by NCName. In 
theory it is open-ended so I don't see how to make it a type-safe 
enumeration. Of course in practice, only In and Out are used, but the spec 
is the spec. (Maybe I should throw in a test case to check MEP 
extensibility).

Direction is limited to in and out so it should be kept as an enum in the 
component model.

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca



John Kaputin <KA...@uk.ibm.com> 
04/19/2006 06:19 AM
Please respond to
woden-dev@ws.apache.org


To
woden-dev@ws.apache.org
cc

Subject
Re: MessageLabel should be NCName






Arthur,
agreed. I created MessageLabel as an enumeration containing "In" and "Out"
early on, before realizing it had to support user-defined labels too and
prior to copying the NCName class from Axis to use in Endpoint.

I have a reminder in the wiki TaskList to change MessageLabel either
directly to an NCName or perhaps to an extensible typesafe enumeration. 
The
latter approach improves the programming model by eliminating the need for
strings or separately-defined constants for the common labels "In" and
"Out" and allows extensions to retain typesafe usage of MessageLabel
values. Such a MessageLabel class would take an NCName in it's constructor
and have a method that returns an NCName (perhaps instead of the existing
toString() method).

I think I prefer the latter approach but haven't yet had time to look into
this, so you can decide which approach to take.

BTW, the TaskList also has a ToDo to consider the other XML data types as
well (i.e. possibly refactoring the org.apache.axis.types classes into
ws-commons per Sanjiva's suggestion).

Question: Direction is defined in the component model as type xs:token, 
but
it too is defined as an enumeration in Woden. Does the same argument apply
about conforming to the component model?

John Kaputin



 
             Arthur Ryman 
             <ryman@ca.ibm.com 
             >                                                          To 

                                       woden-dev@ws.apache.org 
             18/04/2006 16:51                                           cc 

 
                                                                   Subject 

             Please respond to         MessageLabel should be NCName 
             woden-dev@ws.apac 
                  he.org 
 
 
 
 





John,

I noticed that you have modelled the {message label} property as an
enumeration, MessageLabel. This is technically incorrect since the spec
says it's an NCName. The API should treat it as an NCName. Checking for
specific values should be done by the validation code for each Message
Exchange Pattern.

I created a JIRA [1]. The fix is to delete MessageLabel and use NCName.
Agreed? Shall I make the change? Thx.

[1] http://issues.apache.org/jira/browse/WODEN-8

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca


---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org



Re: MessageLabel should be NCName

Posted by John Kaputin <KA...@uk.ibm.com>.
Arthur,
agreed. I created MessageLabel as an enumeration containing "In" and "Out"
early on, before realizing it had to support user-defined labels too and
prior to copying the NCName class from Axis to use in Endpoint.

I have a reminder in the wiki TaskList to change MessageLabel either
directly to an NCName or perhaps to an extensible typesafe enumeration. The
latter approach improves the programming model by eliminating the need for
strings or separately-defined constants for the common labels "In" and
"Out" and allows extensions to retain typesafe usage of MessageLabel
values. Such a MessageLabel class would take an NCName in it's constructor
and have a method that returns an NCName (perhaps instead of the existing
toString() method).

I think I prefer the latter approach but haven't yet had time to look into
this, so you can decide which approach to take.

BTW, the TaskList also has a ToDo to consider the other XML data types as
well (i.e. possibly refactoring the org.apache.axis.types classes into
ws-commons per Sanjiva's suggestion).

Question: Direction is defined in the component model as type xs:token, but
it too is defined as an enumeration in Woden. Does the same argument apply
about conforming to the component model?

John Kaputin



                                                                           
             Arthur Ryman                                                  
             <ryman@ca.ibm.com                                             
             >                                                          To 
                                       woden-dev@ws.apache.org             
             18/04/2006 16:51                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         MessageLabel should be NCName       
             woden-dev@ws.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           





John,

I noticed that you have modelled the {message label} property as an
enumeration, MessageLabel. This is technically incorrect since the spec
says it's an NCName. The API should treat it as an NCName. Checking for
specific values should be done by the validation code for each Message
Exchange Pattern.

I created a JIRA [1]. The fix is to delete MessageLabel and use NCName.
Agreed? Shall I make the change? Thx.

[1] http://issues.apache.org/jira/browse/WODEN-8

Arthur Ryman,
IBM Software Group, Rational Division

blog: http://ryman.eclipsedevelopersjournal.com/
phone: +1-905-413-3077, TL 969-3077
assistant: +1-905-413-2411, TL 969-2411
fax: +1-905-413-4920, TL 969-4920
mobile: +1-416-939-5063, text: 4169395063@fido.ca


---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org