I think in earlier versions if you had only aplication/json with an
element ref then it would still not generate a class like Session/etc.
But now both application/json and application/xml with element refs will
generate it.
Next, some users want to have say multiple XML representations but
pointing to different schema elements - this is a primary reason why
JAXP Source is generated in such cases.
However, there is a supportMultipleXmlReps parameter - this will need to
be deprecated and renamed now that application/json refs are also
checked, so use it and you'd get multiple methods generated - example,
you'd have
editXml(Session)
editJson(Session)
This in itself is new - now the proxies can select which format they
want to use - before, with only edit(Session) - it would always be the
format of the 1st representation - say, always XML.
However I know that there was some pushback and some users still want to
have edit(Session) even with multiple representations. So I'll spend
some time on making the old generation style supported. However, the use
of 'supportMultipleXmlReps' is needed from now on in such cases
Cheers, Sergey
On 06/10/15 11:35, Vjacheslav V. Borisov wrote:
2015-10-05 18:28 GMT+04:00 Sergey Beryozkin <sberyoz...@gmail.com>:
Done for 3.1.4-SNAPSHOT
Thanks again, we will try it. Upgrading from 3.0.4 found strange behavior
(started at 3.0.6)
When method request contains xml and json representation and both contain
"element" reference
<method name="PUT" id="edit">
<request>
<representation mediaType="application/xml"
element="cb:session"/>
<representation mediaType="application/json"
element="cb:session"/>
</request>
</method>
wadl2java generates perameter with javax.xml.transform.Source istead of
Session
but when i remove element on json representation, it generates element of
Session, so after upgrading need to remove element attribute on json
representations
<method name="PUT" id="edit">
<request>
<representation mediaType="application/xml"
element="cb:session"/>
<representation mediaType="application/json"/>
</request>
</method>
does this change made on purpose?