[SWS-396] @Endpoint with method having any other annotation then @PayloadRoot is not mapped Created: 11/Jul/08  Updated: 04/May/12  Resolved: 17/Jul/08

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.5.3
Fix Version/s: 1.5.4

Type: Bug Priority: Major
Reporter: Martin Vanek Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

spring 2.5.5, spring-ws 1.5.3, spring-security 2.0.3

Attachments: Zip Archive spring-ws-mapping.zip    


I've got @PayloadRoot annotated methods of @Endpoint and some methods also has @RolesAllowed from spring security. Today after upgrading from spring-ws 1.5.2 PayloadRootAnnotationMethodEndpointMapping stopped to processed this endpoint. I've also tried another (my custom @Log AOP annotation) annotation with same (bad) result.
So now after last test, when any @Endpoint method has any other annotation then @PayloadRoot, it is not mapped.

Comment by Arjen Poutsma [ 13/Jul/08 ]

I am having issues trying to reproduce this

Could you please attach an application context that reproduces this issue, or (better yet) a test case?


Comment by Martin Vanek [ 14/Jul/08 ]

Got it. It is because AOP.
When Endpoint method is like:
@PayloadRoot(localPart = "controlBatch", namespace = "http://www.komix.cz/sis/nssis/internal/types")
public ControlBatchResponse controlBatch(ControlBatch in)

{ System.err.println("controlBatch " + in); return new ControlBatchResponse(); }

and spring configuration contains

<aop:aspect ref="Log4jAspect">
<aop:pointcut id="loggedMethodPointcut" expression="@annotation(test.Log) and @annotation(log)"/>
<aop:around pointcut-ref="loggedMethodPointcut" method="log"/>

<bean id="Log4jAspect" class="test.Log4jAspect"/>

then mapping works in 1.5.2 but not in 1.5.3.
When I comment out aop configuration or remove @Log annotation from method, it works in both versions.

Comment by Arjen Poutsma [ 14/Jul/08 ]

Ok, thanks for that. This information really helps .

Comment by Arjen Poutsma [ 14/Jul/08 ]

I still can't reproduce this bug. I've created a sample logging aspect as part of the PayloadRootAnnotationMethodEndpointMappingTest, and all works fine. You can find it here:

Could you please check out the source of Spring-WS (see http://static.springframework.org/spring-ws/sites/1.5/source-repository.html), and look at the tests of the core-tiger module, to see what I'm missing?

Comment by Martin Vanek [ 16/Jul/08 ]

I've dig out little bit lame test case (XyzEndpoint is main class)

Comment by Arjen Poutsma [ 17/Jul/08 ]


This was related to CGLIB subclasses being created by Spring AOP, which do not have the @Endpoint or @PayloadRoot annotations. The current implementation is consistent with Spring MVC's @Controller and @RequestMapping logic, which seems to solve this bug.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sat May 26 12:11:41 UTC 2018 using JIRA 7.9.0#79000-sha1:3ca552e944c2fe83b21589bc06f155b9b428cc2b.