cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5728) wadl2java plugin does not create correctly typed parameters
Date Wed, 21 May 2014 10:25:38 GMT

    [ https://issues.apache.org/jira/browse/CXF-5728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14004551#comment-14004551
] 

Sergey Beryozkin commented on CXF-5728:
---------------------------------------

No, it is not a defect, I disagree.

WADL describing JSON (or other non-XML) representations in XML schema is technically wrong,
because XML Schema tells the consumers how the payload will look like in *XML* format. 

We have a WADL Generator property "linkJsonToXMLSchema" which can have JSON representations
linked to the grammar - I only added this property because I thought that JSON schema is not
well supported (WADLGenerator can be produced as JSON if preferred with a link to an external
JSON schema if it is available), users and tools understand XML Schema. so there's a chance
that a tool like SoapUI will read WADL and will somehow handle an incoming JSON based on the
analysis of XML Schema. 

I don't know of any other media type which has no "xml" in its name that represents XML. Do
you ? We can add a WADLGenerator property that will link arbitrary media types to the grammar
- I don't want to do it by default, but only optionally.

As far as this particular issue is concerned: I've confirmed that the types will be generated
even for JSON representations, but not for individual parameters of a given representation
- it is invalid really.  I'm only keeping this issue open because may be it might make sense
to support linking rep parameters to grammars to 'describe' JSON arrays, this is the only
reason.





> wadl2java plugin does not create correctly typed parameters
> -----------------------------------------------------------
>
>                 Key: CXF-5728
>                 URL: https://issues.apache.org/jira/browse/CXF-5728
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.7.11
>            Reporter: Owen Farrell
>             Fix For: 2.7.12
>
>         Attachments: myschema.xsd, wadl2JavaTest.wadl
>
>
> When interpreting a WADL with a fully-qualified parameter type, the wadl2java plugin
converts the parameter to a String in the stubbed interface instead of the class generated
from the grammar's schema.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message