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

Glen Mazza commented on CXF-2866:
---------------------------------

Hmm.  Well, obviously, if you do WSDL-first (starting, if you wish, from a WSDL 
generated from the Java-first scenario), you can make whatever modifications to 
the Message element name desired.  (Or, use WSDL 2.0 which doesn't have message 
elements at all. :)

I guess there's no standard to the message names, just to the elements they 
point to is important.  W3Schools uses "in" and "out" for its message names in 
its example: http://www.w3schools.com/webservices/tempconvert.asmx?WSDL

Two advantages I can see of not appending "Request" as we do "Response" to the 
message name is that it takes care of the 1-way message exchange pattern (we 
wouldn't see a bunch of "-Request" named messages that don't have a "-Response" 
object) and "Request" and "Response" look pretty similar and as the number of 
operations increases it's harder to distinguish between the two when reading 
the WSDL ("getFoo" and "getFooResponse" is clearer than "getFooRequest" and 
"getFooResponse" and hence takes less time for the eye to distinguish).
                
> add "Request" as suffix for getInputMessageName()
> -------------------------------------------------
>
>                 Key: CXF-2866
>                 URL: https://issues.apache.org/jira/browse/CXF-2866
>             Project: CXF
>          Issue Type: Wish
>          Components: JAX-WS Runtime
>    Affects Versions: 2.2.5
>            Reporter: nathanleewei
>            Priority: Minor
>             Fix For: Invalid
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> in org.apache.cxf.service.factory.DefaultServiceConfiguration, there're 2 
> funtions: getInputMessageName & getOutputMessageName 
>   @Override
>     public QName getInputMessageName(OperationInfo op, Method method) {
>         return new QName(op.getName().getNamespaceURI(), 
> op.getName().getLocalPart() );
>     }
>  @Override
>     public QName getOutputMessageName(OperationInfo op, Method method) {
>         return new QName(op.getName().getNamespaceURI(), 
> op.getName().getLocalPart() + "Response");
>     }
> the getOutputMessageName will append a suffix --  "Response" by default, 
> while getInputMessageName append nothing.
> Can we append "Request" as suffix by default?
> @Override
>     public QName getInputMessageName(OperationInfo op, Method method) {
>         return new QName(op.getName().getNamespaceURI(), 
> op.getName().getLocalPart() + "Request"); /*modified by nathan*/
>     }
> So that, the generated wsdl will looks nicer :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to