Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8383

CXFRS Consumer processors should be able to use JAX-RS contexts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.15.0
    • camel-cxf
    • None
    • Unknown

    Description

      CXFRS consumer processors should be able to use JAX-RS Contexts, for example, instead of

      String path = exchange.getIn().getHeader(Exchange.HTTP_PATH, String.class);
      if (path.equals("/customers")) {
      //...
      } 
      

      do something like

      javax.ws.rs.core.UriInfo ui = exchange.getProperty(UriInfo.class.getName(), UriInfo.class);
      if (ui.getPath().equals("/customers")) {
      //...
      } 
      

      This will make the processor code more JAX-RS friendly. Besides UriInfo, Request, HttpHeaders and other JAX-RS contexts offer a lot of utility methods for simplifying managing an HTTP request

      Attachments

        1. patch8383.txt
          10 kB
          Sergey Beryozkin

        Activity

          People

            davsclaus Claus Ibsen
            sergey_beryozkin Sergey Beryozkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: