[
https://issues.apache.org/jira/browse/CXF-3135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933860#action_12933860
]
Sergey Beryozkin edited comment on CXF-3135 at 11/19/10 11:50 AM:
------------------------------------------------------------------
Hope you appreciate that I can not just change it to 'true' just because it
seems like the right thing to do.
As you can see from the code, a check is done if a current method is supposed
to handle form submissions or not. If yes then it uses 'false' which alongside
with some other parameters indicate to handleRepresentation() that in this case
request parameters have to be shown as parameters of the representation which
exactly what needs to be done per the WADL spec, where form parameters are
shown as query parameters. This is actually a broken way to convey it and will
be refactored but this is the way I did id awhile back.
So can you elaborate please on what exactly do you mean that @Consumes is not
checked ? If you show me a method signature then it will help. It does not have
to be the signature from the production code, but just needs to show the same
annotations that you use in the real case.
was (Author: sergey_beryozkin):
Hope you appreciate that I can not just change it to 'true' just because it
seems like the right thing to do.
As you can see from the code, a check is done if a current method is supposed
to handle form submissions or not. If yes then it uses 'false' which alongside
with some other parameters indicate to handleRepresentation() that in this case
request parameters have to be shown as parameters of the representation which
exactly what needs to be done per the WADL spec, where form parameters are
shown as query parameters. This is actually a broken way to convey it and will
be refactored but this is the way I did id awhile back.
So can you elaborate please on what exactly do you mean that @Consumes is not
checked ? If you show me a method signature then it will help. It does not be
the signature from the production code, but just needs to show the same
annotations that you use in the real case.
> WadlGenerator does not respect Consumes annotation
> --------------------------------------------------
>
> Key: CXF-3135
> URL: https://issues.apache.org/jira/browse/CXF-3135
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3.0
> Environment: any
> Reporter: Guy Dumais
> Priority: Minor
>
> {{WadlGenerator}} invokes {{handleRepresentation}} with the wrong parameter
> when creating the {{<request>}} element. The last parameter of
> {{handleRepresentation}} should be _true_ not _false_:
> {code}
> if (ori.getMethodToInvoke().getParameterTypes().length != 0) {
> sb.append("<request>");
> if (isFormRequest(ori)) {
> handleRepresentation(sb, jaxbTypes, qnameResolver, clsMap,
> ori, null, false);
> } else {
> for (Parameter p : ori.getParameters()) {
> handleParameter(sb, jaxbTypes, qnameResolver, clsMap,
> ori, p);
> }
> }
> sb.append("</request>");
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.