Camel
  1. Camel
  2. CAMEL-5243

jt400: program call should support binary format

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.2
    • Fix Version/s: 2.10.0
    • Component/s: None
    • Labels:
    • Environment:

      AS/400 system

    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      Data queue message exchange supports both text and binary formats and so should the remote program call exchange. The specification is the same as the one for the data queue.

      Additionally, this patch supports the concept of ommiting a parameter. This is achieved by passing null as the parameter value.

      Implementation note:
      Since I don't know Camel's policy regarding API breaking, I opted to refer to Jt400DataQueueEndpoint.Format; but Format should now be a top-level class, since the concept is the same for data queues and programs.

      1. patch.txt
        9 kB
        João Loureiro

        Activity

        Hide
        Claus Ibsen added a comment -

        Thx updated

        Show
        Claus Ibsen added a comment - Thx updated
        Hide
        João Loureiro added a comment -

        Sorry I forgot about the text description:

        (There is also the detail of the possibility "omitting" a parameter, which is an AS/400 concept). The text under "Remote program call (Camel 2.7)" can then be rephrased thus:

        This endpoint expects the input to be either a String array or byte[] array (depending on format) and handles all the CCSID handling through the native jt400 library mechanisms. A parameter can be omitted by passing null as the value in its position (the remote program has to support it). After the program execution the endpoint returns either a String array or byte[] array with the values as they were returned by the program (the input only parameters will contain the same data as the beginning of the invocation)
        This endpoint does not implement a provider endpoint!

        The "Remote program call example (Camel 2.7)" text remains valid because the default format is "text".

        Show
        João Loureiro added a comment - Sorry I forgot about the text description: (There is also the detail of the possibility "omitting" a parameter, which is an AS/400 concept). The text under "Remote program call (Camel 2.7)" can then be rephrased thus: This endpoint expects the input to be either a String array or byte[] array (depending on format) and handles all the CCSID handling through the native jt400 library mechanisms. A parameter can be omitted by passing null as the value in its position (the remote program has to support it). After the program execution the endpoint returns either a String array or byte[] array with the values as they were returned by the program (the input only parameters will contain the same data as the beginning of the invocation) This endpoint does not implement a provider endpoint! The "Remote program call example (Camel 2.7)" text remains valid because the default format is "text".
        Hide
        Claus Ibsen added a comment -

        Thanks I have updated the documentation.

        Show
        Claus Ibsen added a comment - Thanks I have updated the documentation.
        Hide
        João Loureiro added a comment -

        Hi Claus,

        Thanks for applying the patch. I think the options table for Program Call should include "format" (and "guiAvailable" is missing too). The specification for those options is the same as the one for the data queue exchange.

        Show
        João Loureiro added a comment - Hi Claus, Thanks for applying the patch. I think the options table for Program Call should include "format" (and "guiAvailable" is missing too). The specification for those options is the same as the one for the data queue exchange.
        Hide
        Claus Ibsen added a comment -

        Joao,

        Thanks for the patch. I have applied it to trunk. Do you have any points for improving the docs with this change?
        http://camel.apache.org/jt400

        Show
        Claus Ibsen added a comment - Joao, Thanks for the patch. I have applied it to trunk. Do you have any points for improving the docs with this change? http://camel.apache.org/jt400

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            João Loureiro
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development