Hi sorry for a delay
On Fri, Aug 27, 2010 at 3:38 PM, gilgal <[email protected]> wrote: > > When cxf generates my WADL I get references to objects in the grammar > section, but if it is a primitive type it has a comment of what the > primitive type is but no element attribute set. Is there a way to get what > is in the comment into the element attribute of the representation tag? > Here are two examples. > References the object in the grammar: > <resource path="/optout/individual/{individualId}"> > > <method name="GET"> > <request/> > <response> > <representation mediaType="application/xml" element="prefix1:indOptOut"/> > <representation mediaType="application/json"/> > </response> > </method> > </resource> > Has only a comment that it is xs:boolean: > <resource path="/ministering/remove/{unitNbr}/{individualId}"> > > > <method name="DELETE"> > <request/> > <response> > <!-- Primitive type : xs:boolean --> > <representation mediaType="application/xml"/> > <!-- Primitive type : xs:boolean --> > <representation mediaType="application/json"/> > </response> > </method> > </resource> > > Thanks, > Gil > > This might be done in principle. I'm not sure though what it will mean. XML schema does have datatypes such as xs:boolean, etc. But those datatypes are meant to be used by schemas defining new custom (complex or simple) types and elements, the XML ones. So if we have say a text/plain representation, then saying that a it's of type xsd: integer for example, using @element attribute, seems a bit strange. But may be it could be just to do with reusing existing well-known datatypes, so <representation mediaType="text/plain" element="xsd:boolean"/> is kind of ok... I'll think about it. In meantime, if you could ask for some clarifications on the WADL list then it would really help. Ask if using @element="xsd:boolean" for non xml representations is acceptable thanks, Sergey -- > View this message in context: > http://cxf.547215.n5.nabble.com/WADL-generation-question-tp2740129p2740129.html > Sent from the cxf-user mailing list archive at Nabble.com. >
