Java/ws-server – data does not cross over

Clovertech Forums Cloverleaf Java/ws-server – data does not cross over

  • Creator
    Topic
  • #118584
    Jay Clements
    Participant

      Hello,

      Im not entirely sure how to word this – basically I have a java/ws-server endpoint that I am able to query against with postman and get a response. The response is generated via a TCL script on the inbound TPS. However I can’t seem to get the actual data to cross. The messages just come in empty. I am sending the request as a POST with raw json in the body. Any ideas? Or examples java/ws-server examples for an inbound endpoint to receive JSON?

       

      Thanks

      Rob

    Viewing 4 reply threads
    • Author
      Replies
      • #118585
        Paul Stein
        Participant

          Hey Rob – Is the issue in the reply back to postman or are you not able to extract the json data in the java/ws-server for downstream processing?

          I would debug by adding a ‘msgdump $mh’ in your tps temporarily to make sure you see the full handle in the log and whether or not the data is in the message or part of a keyed list in the USERDATA.

           

           

           

          • #118586
            Jay Clements
            Participant

              Paul – I am not able to extract the data. I already have a tps script that performs a msgdump and it doesn’t have any data in message or userdata. Its weird. Not sure what’s going on. Any other thoughts?

          • #118587
            Matthew Rasmussen
            Participant

              Try turning EO up all the way for the receiving thread, send the message, check the logs, and see if you’re getting the payload in non-message data.  If the data is coming in there, you might have to adjust the encoding settings on the inbound thread to accommodate your payload.  I’ve used postman to send a message into Cloverleaf before, and it seems like I had to convert the file to newline, and then reference the file in postman – rather than copy/pasting the message text straight into postman.

            • #118588
              Robert Kersemakers
              Participant

                Make sure you are sending in http header ‘Content-Length’. I had a colleague using Postman as well and I didn’t receive anything in Cloverleaf. In the end it turned out Cloverleaf needs the Content-Length or else it will not get the message.

                I used SoapUI myself which added Content-Length on its own.

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #118589
                Paul Stein
                Participant

                  Good point – in Postman you have to do more with setting the HTTP headers.

                  I had to set the content-type header to be ‘text/plain’ for my use case, then I was able to see the data in Cloverleaf.

                  May be worth looking into. I too switched to SOAPUI after that.

                • #118590
                  Jeff Dawson
                  Participant

                    If you try out Postman’s echo service do you get anything back from Cloverleaf?  I setup a PROTOCOL:java/ws-rawclient with their endpoint below

                    https://postman-echo.com/get?test=123

                    https://learning.postman.com/docs/designing-and-developing-your-api/mocking-data/mocking-with-examples/

                    I was able to receive a successful 200 response along with the payload the listed, maybe that will help rule out the CIS piece and point towards what others suggested to the Postman config side.

                     

                    Jeff

                    • This reply was modified 3 years, 9 months ago by Jeff Dawson.
                Viewing 4 reply threads
                • You must be logged in to reply to this topic.