Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8174

Incorrect service method resolution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.8, 3.3.0
    • 3.3.5, 3.2.12, 3.4.0
    • JAX-RS
    • None
    • Unknown

    Description

      Assume JAX-RS resource classes:

      public interface TestService<REQ extends com.test.BaseRequest, RES extends com.test.BaseResponse> {
              RES process(REQ request);
          }
      
          public interface MyTestService extends TestService<com.test.MyTestServiceRequest, com.test.MyTestServiceResponse> {
      
              @Override
              @POST
              @Path("record")
              @Valid
              com.test.MyTestServiceResponse process(com.test.MyTestServiceRequest request);
          }
      

      When we call MyTestService, CXF resolves method from TestService

      com.test.BaseResponse process(com.test.BaseRequest request)
      

      This causes Jackson deserialization error due to unknown properties sent in

      com.test.MyTestServiceResponse
      

      This occurs due to changes in OperationResourceInfoComparator (CXF-7946) where parameter class names are compared.

      Explicit package in the sample is due to the fact that there is an easy workaround - remove all extends from parent interface. This won't work if your package is anything after java.lang

      Attachments

        Issue Links

          Activity

            People

              reta Andriy Redko
              kopkar2 RafaƂ Kopka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m