Using java/ws-rawclient to call a GET endpoint

Clovertech Forums Cloverleaf Using java/ws-rawclient to call a GET endpoint

  • Creator
    Topic
  • #119582
    Ken Smith
    Participant

      It seems it ought to be simple, which means I am probably just overlooking a simple step. I have configured a ws-rawclient to call a GET endpoint.I can call the endpoint from curl on the command line of the server, so I know the endpoint is reachable.

      There is a Bus, Conduit and RawConsumer. Conduit has default settings for connection timeout and receive timeout. The Name in the Conduit matches the Address in the RawConsumer. RawConsumer specifies GET.

      I have configured this thread to be the initial thread in the process, to call the GET, receive a response, and send the response (JSON formatted data) to a file (for now, just for testing). However, I can’t see any sign of the GET endpoint being called. No errors in the logging. And no response data. The logging shows this (GET_DATA_OLR is the process):

      Receiving a command
      Received command: ‘GET_DATA_OLR_xlate xrel_post’
      Doing ‘xrel_post’ command with args ‘<none>’
      Receiving a command
      Received command: ‘GET_DATA_OLR_xlate xrel_post’
      Doing ‘xrel_post’ command with args ‘<none>’
      Receiving a command
      Command client went away. Closing connection.
      Receiving a command
      Command client went away. Closing connection.
      Receiving a command
      Received command: ‘GET_DATA_OLR_xlate xrel_post’
      Doing ‘xrel_post’ command with args ‘<none>’
      Receiving a command
      Command client went away. Closing connection.

       

    Viewing 3 reply threads
    • Author
      Replies
      • #119583
        Paul Stein
        Participant

          Is this an outbound thread?

        • #119584
          Ken Smith
          Participant

            I’m not exactly sure in this context. The GET is called on the first thread in the process, the result message should get written to/passed to a second (file) thread. So in that sense it may be inbound. I’ve attached a screenshot.

            Attachments:
            You must be logged in to view attached files.
          • #119586
            Don Martin
            Participant

              Using a rawclient to make an HTTP GET call would typically be used on an outbound thread, and need to be triggered by some sort of message.  If you want the HTTP GET call to be the start of some type of flow, you could use a UPOC timer as the inbound thread to initiate the flow and route some sort of dummy message to the outbound rawclient thread.  Make sure you have message logging turned on in the rawclient bus so you can see the outgoing call and incoming response in the logs.

            • #119587
              Ken Smith
              Participant

                Thanks very much for your excellent advice. I had about reached the conclusion from examples and experiments that the rawclient would only work as the outbound thread, but couldn’t quite figure the rest.

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.