REST API with PUT Request to JSON format

Clovertech Forums Cloverleaf REST API with PUT Request to JSON format

  • Creator
    Topic
  • #119714
    Bill Pitts
    Participant

      Hi

      Trying to execute a PUT request via REST API to a vendor.   ADT translated from HL7 to JSON via tclproc.   Outbound thread setup to be java/ws-rawclient (config in attachment)

      ———————————————————————-

      Message sent: (Test – no PHI)

      [pd :thrd:DBUG/3:xxxxxx_JavaRaw:–/–/—- –:–:–] message : ‘{first_name=KEVIN&middle=&last=GRAND%20CENTRAL&mrn=202979&dob=01/23/1974&bed_id=LED-D31-D31&encounter_id=2002273077}’

      Warning Msg in logfile:

      [java:java:WARN/1:xxxxxxxx_JavaRaw_0:05/10/2022 15:47:53] com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf:WARNING: caught exception using webClient to call https://xxxxxxxx-test.xxxxxxxx.com/api/v1/adt/update

      **************************************************************

      http Response from Vendor:
      {httpResponseInfo Unauthorized} {httpResponseHeaders {{Strict-Transport-Security max-age=15552000\;\ includeSubDomains} {transfer-encoding chunked} {Cache-Control no-cache} {X-Request-Id f114229d-bc12-476a-9866-b3b16b471ac0} {X-Runtime 0.008174} {connection keep-alive} {content-type application/json\;\ charset=utf-8} {Set-Cookie ahoy_visitor=5961c21d-965b-4b15-a768-2788155981ea\;\ domain=.xxxxxxxxx.com\;\ path=/\;\ expires=Fri,\ 10\ May\ 2024\ 19:47:53\ -0000\;\ secure} {Date Tue,\ 10\ May\ 2022\ 19:47:53\ GMT}}} {httpResponseCode 401}

      [pd :pdtd:INFO/3:xxxxxx_JavaRaw:–/–/—- –:–:–] message : ‘{“error”:{“tenant”:[“token unauthorized to access”]}}’

      ***********************************************

      Vendor feedback is “PUT” is not being sent

      We’re able to execute the “PUT” via POSTMAN, see in attached file.

      Thoughts/tips?

      Thanks

       

       

      Attachments:
      You must be logged in to view attached files.
    Viewing 12 reply threads
    • Author
      Replies
      • #119716
        Paul Stein
        Participant

          Hey Bill – are you able to verify in a message dump or keylget of the request headers that Cloverleaf is sending the ‘PUT’?

        • #119718
          Bill Pitts
          Participant

            Not seeing output in msgdump , just message.

            Tclproc code:

            catch [set newMsg $JSONmsg]]
            msgset $mh $newMsg

            #### —————————————————————
            keylget args MSGID mh
            keylget args CONTEXT context

            echo “message id: $mh”
            set INmsg [msgget $mh]

            echo “message body: $INmsg”
            echo \n\n$context Dump:

            msgdump $mh
            echo \n\n

            ### ——————————————————————–

            lappend dispList “CONTINUE $mh”

            *****************************************************************************

            ****************************************************************************

             

            Output in Log:

            [tcl :out :INFO/0: websrv_xlate:05/11/2022 11:14:34] JSONmsg update?%20{first_name=KEVIN&middle=&last=GRAND%20CENTRAL&mrn=202979&dob=01/23/1974&bed_id=LED-D31-D31&encounter_id=2002273077}
            [tcl :out :INFO/0: websrv_xlate:05/11/2022 11:14:34] “message id: message0”
            [tcl :out :INFO/0: websrv_xlate:05/11/2022 11:14:34] “message body: update?%20{first_name=KEVIN&middle=&last=GRAND%20CENTRAL&mrn=202979&dob=01/23/1974&bed_id=LED-D31-D31&encounter_id=2002273077}”
            [tcl :out :INFO/0: websrv_xlate:05/11/2022 11:14:34]
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–]
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] xlt_raw Dump:
            [tcl :out :INFO/0: websrv_xlate:05/11/2022 11:14:34] msg: 0xefff6d28
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgType : DATA
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgClass : ENGINE
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgState : Unknown: 0 (0)
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgPriority : 5120
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgRecoveryDbState: Log:new (2)
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgFlags : 0x8202
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgMid : [0.0.421889]
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgSrcMid : [0.0.421887]
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgSrcMidGroup : midNULL
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgHostId : 3747252104
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgOrigSrcThread : 1_x_sandbox_ADT
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgOrigDestThread : AngelEye_JavaRaw
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgSrcThread : 1_x_sandbox_ADT
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgDestThread : AngelEye_JavaRaw
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgXlateThread :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgSkipXlate : 0
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgSepChars :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgNumRetries : 0
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgGroupId : 0
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgDriverControl : {_TRXID_ _HCI_static_route_}
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgRecordFormat :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgRoutes :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgUserData :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgStaticIsDirty : 1
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgVariableIsDirty: 1
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgRetryTimes :
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgTimeStartIb : 1652282074.093
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgTimeStartOb : 1652282074.093
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgTimeCurQueStart: 0.000
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgTimeTotalQue : 0.007
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgTimeRecovery : 1652282074.102
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgEoConfig : 0x0
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] msgData (BO) : 0xefff6e30
            [tcl :out :INFO/0: websrv_xlate:–/–/—- –:–:–] message : ‘update?%20{first_name=KEVIN&middle=&last=GRAND%20CENTRAL&mrn=202979&dob=01/23/1974&bed_id=LED-D31-D31&encounter_id=2002273077}’

          • #119719
            Paul Stein
            Participant

              Can you turn on Message Logging Enabled in the Bus? I am not using a WS Raw Client, but it should at least display something similar to below in the log file. This would at least verify the driver is sending the PUT method

               

              java:java:INFO/1:test_out_0:05/11/2022 13:40:39] org.apache.cxf.services.DocumentRepository_Service.DocumentRepository_Port_Soap12.DocumentRepository_PortType:INFO: Outbound Message
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] —————————
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] ID: 1
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Address: https://ihe.net:20000/repository
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Encoding: UTF-8
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Http-Method: POST
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Content-Type: application/soap+xml; action=”urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b”
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Headers: {Accept=[*/*], Connection=[close]}
              [java:java:INFO/1:test_out_0:–/–/—- –:–:–] Payload: <soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope”><soap:Header>xxxxxxxxxxxxxx

              • #119727
                Bill Pitts
                Participant

                  Message logging enabled worked – let me see output, etc.  Thanks for that tip .. wasn’t aware of that feature

                  Got this working, worked through some auth then payload issues w vendor.

                  Now I need to figure out how to make the url dynamic – update vs discharge based on specific HL7 functions

                  example:

                  https://test.com/api/v1/adt/update     vs       https://test.com/api/v1/adt/discharge

                   

                  LogOutput:

                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] ID: 1
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Address: https://test.com/api/v1/adt/update
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Http-Method: PUT
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Content-Type: application/json
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Headers: {Authorization=[********], Content-Type=[application/json], Accept=[*/*], Connection=[Keep-Alive]}
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Payload: {“first”:”KEVIN”,”middle”:””,”last”:”GRAND CENTRAL”,”mrn”:”202979″,”dob”:”01/23/1974″,”bed_id”:”LED-D31-D31″,”encounter_id”:”2002273077″}
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] ————————————–
                  [java:java:INFO/1:_JavaRaw_0:05/12/2022 16:23:30] org.apache.cxf.interceptor.LoggingInInterceptor:INFO: Inbound Message
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] —————————-
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] ID: 1
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Response-Code: 200
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Encoding: ISO-8859-1
                  [java:java:INFO/1:_JavaRaw_0:–/–/—- –:–:–] Content-Type: application/json

                   

                   

              • #119729
                Paul Stein
                Participant

                  Check out this thread – should do what you need. Update the key for httpRequestInfo either on route or OB thread.

                   

                  https://usspvlclovertch2.infor.com/forums/topic/trying-to-send-dynamic-address-to-a-fhir-connection-using-ws-rawclient-protocol/

                  • #119733
                    Bill Pitts
                    Participant

                      Hi

                      I was monitoring that thread, implemented some code but getting the BADDATA error

                      1st tclproc on route – formats data to JSON format,  sets USERData to value that will be appended to url

                      2nd tclproc – on tps Outbound tab of WS-JavaRaw Client thread;  pulls USERData, sets url with appended value, resets UserData

                      Looks to be setting this correctly but get error for the BADDATA in logfile:

                      Logfile:
                      [pd :thrd:INFO/0:_JavaRaw:05/13/2022 12:30:52] Processing OB-Data message queue
                      [msg :Msg :DBUG/0:_JavaRaw:05/13/2022 12:30:52] msg_Alloc new message 0xefff7028
                      [msg :Msg :DBUG/0:_JavaRaw:05/13/2022 12:30:52] msgCopy from 0xefff6d28 [0.0.422112] to 0xefff7028 midNULL
                      [pd :thrd:DBUG/3:_JavaRaw:05/13/2022 12:30:52] [0.0.422112] OB message in encoding conversion
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msg: 0xefff7028
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgType : DATA
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgClass : PROTOCOL
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgState : OB in prewrite (17)
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgPriority : 5120
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecoveryDbState: Log:off (1)
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgFlags : 0x8206
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgMid : [0.0.422112]
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMid : [0.0.422110]
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMidGroup : midNULL
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgHostId : 3747252104
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigSrcThread : 1_x_sandbox_ADT
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigDestThread : _JavaRaw
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcThread : 1_x_sandbox_ADT
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDestThread : _JavaRaw
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgXlateThread :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSkipXlate : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSepChars :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgNumRetries : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgGroupId : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDriverControl : {_TRXID_ _HCI_static_route_}
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecordFormat :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRoutes :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgUserData : {httpRequestInfo {requestURL https://general-test.cameras.com/api/v1/adt/update}}
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgStaticIsDirty : 1
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgVariableIsDirty: 1
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRetryTimes :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartIb : 1652459452.850
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartOb : 1652459452.858
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeCurQueStart: 0.000
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeTotalQue : 0.002
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeRecovery : 1652459452.862
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgEoConfig : 0x0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgData (BO) : 0xefff7130
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] message : ‘{“first”:”KEVIN”,”middle”:””,”last”:”GRAND CENTRAL”,”mrn”:”202979″,”dob”:”01/23/1974″,”bed_id”:”LED-D31-D31″,”encounter_id”:”2002273077″}’
                      [pd :thrd:DBUG/3:_JavaRaw:05/13/2022 12:30:52] [0.0.422112] Nothing happened during the pre-write process, using the original message
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msg: 0xefff6d28
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgType : DATA
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgClass : PROTOCOL
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgState : OB post-SMS (11)
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgPriority : 5120
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecoveryDbState: Log:update (3)
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgFlags : 0x8206
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgMid : [0.0.422112]
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMid : [0.0.422110]
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMidGroup : midNULL
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgHostId : 3747252104
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigSrcThread : 1_x_sandbox_ADT
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigDestThread : _JavaRaw
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcThread : 1_x_sandbox_ADT
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDestThread : _JavaRaw
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgXlateThread :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSkipXlate : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSepChars :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgNumRetries : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgGroupId : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDriverControl : {_TRXID_ _HCI_static_route_}
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecordFormat :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRoutes :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgUserData : {httpRequestInfo {requestURL https://general-test.cameras.com/api/v1/adt/update}}
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgStaticIsDirty : 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgVariableIsDirty: 0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRetryTimes :
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartIb : 1652459452.850
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartOb : 1652459452.858
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeCurQueStart: 0.000
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeTotalQue : 0.002
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeRecovery : 1652459452.853
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgEoConfig : 0x0
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgData (BO) : 0xefff6e30
                      [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] message : ‘{“first”:”KEVIN”,”middle”:””,”last”:”GRAND CENTRAL”,”mrn”:”202979″,”dob”:”01/23/1974″,”bed_id”:”LED-D31-D31″,”encounter_id”:”2002273077″}’
                      [msg :Msg :DBUG/0:_JavaRaw:05/13/2022 12:30:52] msgFree 0xefff7028 refCnt 1
                      [pd :pdtd:INFO/0:_JavaRaw:05/13/2022 12:30:52] [0.0.422112] Writing message to Protocol Driver java
                      [pd :pdtd:INFO/1:_JavaRaw:05/13/2022 12:30:52] [0.0.422112] Writing message PARTIALLY complete
                      [pd :pdtd:INFO/1:_JavaRaw:05/13/2022 12:30:52] [0.0.422112] Setup callback function for writing partial message
                      [pti :sche:INFO/1:_JavaRaw:05/13/2022 12:30:52] Thread has 0 ready events left.
                      [pti :sche:INFO/2:_JavaRaw:05/13/2022 12:30:52] Performing apply callback for thread 3
                      [msi :msi :DBUG/1:_JavaRaw:05/13/2022 12:30:52] msiExportStats: export for thread: _JavaRaw
                      [java:java:ERR /1:_JavaRaw_0:05/13/2022 12:30:53] com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf:SEVERE: Caught exception trying to process message from Cloverleaf
                      [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] Catch Execption:
                      [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] java.lang.ClassCastException: java.lang.String incompatible with java.util.Map
                      [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] at com.infor.cloverleaf.gjdws.WSRawClient.processMessageFromCloverleaf(WSRawClient.java:132)
                      [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] at com.lawson.cloverleaf.driver.FromCloverleafLink.doMsg(FromCloverleafLink.java:46)
                      [java:wrte:ERR /0:_JavaRaw_0:05/13/2022 12:30:53] Call to “doMsg” returned error string “BADDATA caught exception trying to processMessageFromCloverleaf: caught exception trying to process message from Cloverleaf”. Returning bad send to engine.
                      [pti :sche:DBUG/2:_JavaRaw:05/13/2022 12:30:53] Thread 3 has been enabled
                      [pti :sche:INFO/1:_JavaRaw:05/13/2022 12:30:53] Thread has 1 ready events.
                      [pti :even:DBUG/0:_JavaRaw:05/13/2022 12:30:53] Processing SOCKET (Java protocol thread Eng Event) event 0x35de83d8
                      [pti :even:DBUG/1:_JavaRaw:05/13/2022 12:30:53] Calling cb 0x300d5054
                      [pd :pdtd:INFO/1:_JavaRaw:05/13/2022 12:30:53] Executing callback function for writing partial message
                      [pd :pdtd:INFO/1:_JavaRaw:05/13/2022 12:30:53] [0.0.422112] Writing message completed
                      [pd :pdtd:INFO/0:_JavaRaw:05/13/2022 12:30:53] NOW AWAITING A REPLY!
                      [pd :pdtd:INFO/3:_JavaRaw:05/13/2022 12:30:53] Thread(1_x_sandbox_ADT) will expect incoming reply
                      [diag:leak:DBUG/0:_JavaRaw:05/13/2022 12:30:53] diag ev alloc 0x34314228
                      [diag:leak:DBUG/0:_JavaRaw:05/13/2022 12:30:53] diag dqe alloc 0x34ee8228
                      [pti :even:DBUG/0:_JavaRaw:05/13/2022 12:30:53] tiRegistering TIMER (<no description>) event 0x34314228 for tid 3
                      [pti :even:DBUG/0:_JavaRaw:05/13/2022 12:30:53] evRegistering TIMER (<no description>) event 0x34314228 for tid 3
                      [dbi :rlog:DBUG/3:_JavaRaw:05/13/2022 12:30:53] [0.0.422113] Looking for mid in recovery db
                      [dbi :dbi :DBUG/1:_JavaRaw:05/13/2022 12:30:53] (0) ‘cl_keyfindlock: About to do d_keylock’
                      [dbi :dbi :DBUG/1:_JavaRaw:05/13/2022 12:30:53] (1000) ‘cl_keyfindlock: About to do d_keyfind, keyval:’
                      [msg :Mid :DBUG/3:_JavaRaw:05/13/2022 12:30:53] Assigned mid [0.0.422113] to msg efff7028
                      [msg :Msg :DBUG/0:_JavaRaw:05/13/2022 12:30:53] msg_Alloc new message 0xefff7028
                      [msg :Msg :DBUG/0:_JavaRaw:05/13/2022 12:30:53] msgCopy from 0xefff6d28 [0.0.422112] to 0xefff7028 [0.0.422113]
                      [pd :thrd:INFO/0:_JavaRaw:05/13/2022 12:30:53] [0.0.422112] Saving to error database(BADDATA)

                      Tclproc (to set dynamic url):

                      proc DynamicURL { args } {

                      global HciSite
                      set processing_id [gvgetvar PROCESSING_ID]

                      keylget args MODE mode ;# Fetch mod

                      # Initialize variables
                      set userData “”

                      # Variables for setting url
                      set url “”
                      set urlBase “”
                      set urlBaseTest “https://general-test.cameras.com/api/v1/adt/&#8221;
                      set urlBaseProd “https://general.cameras.com/api/v1/adt/&#8221;
                      set urlExtension “”

                      set dispList {} ;# Nothing to return

                      switch -exact — $mode {
                      start {
                      # Perform special init functions
                      # N.B.: there may or may not be a MSGID key in args
                      }

                      run {

                      # ‘run’ mode always has a MSGID; fetch and process it
                      keylget args MSGID mh
                      keylget args CONTEXT context

                      set msg [msgget $mh]

                      catch [set userData [msgmetaget $mh USERDATA]] ;# set in previous script on route that formats msg, valued to either “update” or “discharge”

                      if {$processing_id eq “P”} {
                      catch [set urlBase $urlBaseProd]
                      } else {
                      if {$processing_id eq “T”} {
                      catch [set urlBase $urlBaseTest]
                      }
                      }

                      catch [set urlExtension $userData]
                      }
                      }

                      catch [set url [concat $urlBase$urlExtension]]

                      catch [set userData “{httpRequestInfo {requestURL $url}}”]

                      msgmetaset $mh USERDATA $userData

                      lappend dispList “CONTINUE $mh”

                      }
                      }
                      time {
                      # Timer-based processing
                      # N.B.: there may or may not be a MSGID key in args
                      }

                      shutdown {
                      # Doing some clean-up work
                      }

                      default {
                      error “Unknown mode ‘$mode’ in tpsDynamicURL”
                      }
                      }

                       

                      return $dispList
                      }

                  • #119735
                    Charlie Bursell
                    Participant

                      I am not that familiar with the web processing you are attempting, but I am familiar with Tcl.

                      Why are you using catch with all of your set statements?  You use catch but then do not catch the error.  If there is an error with any of these statements the catch will hide it and you will not see it.

                      For example:  catch [set userData “{httpRequestInfo {requestURL $url}}”]
                      would hide a possible error from the call to  httpRequestInfo.

                      Just my $0.02 worth and that is overvalued 🙂

                      • #119738
                        Bill Pitts
                        Participant

                          Hi Charlie

                          Took the “catch” statements out, got more detail on error in log:

                          [java:java:WARN/1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.validation.MessageValidation printWarnings:WARNING: Message validation has detected 1 warning
                          [java:java:WARN/1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.validation.MessageValidation printWarnings:WARNING: The key ‘httpRequestInfo’ is expected to be a map, but it is not. Cast exception is: java.lang.String incompatible with java.util.Map
                          [java:java:ERR /1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf:SEVERE: Caught exception trying to process message from Cloverleaf
                          [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] Catch Execption:

                          From Log:

                          [pd :thrd:DBUG/3:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Nothing happened during the pre-write process, using the original message
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msg: 0xefff6d28
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgType : DATA
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgClass : PROTOCOL
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgState : OB post-SMS (11)
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgPriority : 5120
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecoveryDbState: Log:update (3)
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgFlags : 0x8206
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgMid : [0.0.422162]
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMid : [0.0.422160]
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcMidGroup : midNULL
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgHostId : 3747252104
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigSrcThread : 1_x_sandbox_ADT
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgOrigDestThread : _JavaRaw
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSrcThread : 1_x_sandbox_ADT
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDestThread : _JavaRaw
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgXlateThread :
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSkipXlate : 0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgSepChars :
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgNumRetries : 0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgGroupId : 0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgDriverControl : {_TRXID_ _HCI_static_route_}
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRecordFormat :
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRoutes :
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgUserData : {httpRequestInfo {requestURL https://general-test.cameras.com/api/v1/adt/update}}
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgStaticIsDirty : 0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgVariableIsDirty: 0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgRetryTimes :
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartIb : 1652723349.354
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeStartOb : 1652723349.365
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeCurQueStart: 0.000
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeTotalQue : 0.003
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgTimeRecovery : 1652723349.358
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgEoConfig : 0x0
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] msgData (BO) : 0xefff6e30
                          [pd :thrd:DBUG/3:_JavaRaw:–/–/—- –:–:–] message : ‘{“first”:”KEVIN”,”middle”:””,”last”:”GRAND CENTRAL”,”mrn”:”202979″,”dob”:”01/23/1974″,”bed_id”:”LED-D31-D31″,”encounter_id”:”2002273077″}’
                          [msg :Msg :DBUG/0:_JavaRaw:05/16/2022 13:49:09] msgFree 0xefff7028 refCnt 1
                          [pd :pdtd:INFO/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Writing message to Protocol Driver java
                          [pd :pdtd:INFO/1:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Writing message PARTIALLY complete
                          [pd :pdtd:INFO/1:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Setup callback function for writing partial message
                          [pti :sche:INFO/1:_JavaRaw:05/16/2022 13:49:09] Thread has 0 ready events left.
                          [pti :sche:INFO/2:_JavaRaw:05/16/2022 13:49:09] Performing apply callback for thread 3
                          [msi :msi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] msiExportStats: export for thread: _JavaRaw
                          [java:java:WARN/1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.validation.MessageValidation createWarningsList:WARNING: Message Validation is enabled. This should generally only be used in DEVELOPMENT/TEST systems for performance reasons, although it may be acceptable in production systems with low throughput requirements. NOTE: this warning will only be printed on the first message.
                          [java:java:WARN/1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.validation.MessageValidation printWarnings:WARNING: Message validation has detected 1 warning
                          [java:java:WARN/1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.validation.MessageValidation printWarnings:WARNING: The key ‘httpRequestInfo’ is expected to be a map, but it is not. Cast exception is: java.lang.String incompatible with java.util.Map
                          [java:java:ERR /1:_JavaRaw_0:05/16/2022 13:49:09] com.infor.cloverleaf.gjdws.WSRawClient processMessageFromCloverleaf:SEVERE: Caught exception trying to process message from Cloverleaf
                          [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] Catch Execption:
                          [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] java.lang.ClassCastException: java.lang.String incompatible with java.util.Map
                          [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] at com.infor.cloverleaf.gjdws.WSRawClient.processMessageFromCloverleaf(WSRawClient.java:132)
                          [java:java:ERR /1:_JavaRaw_0:–/–/—- –:–:–] at com.lawson.cloverleaf.driver.FromCloverleafLink.doMsg(FromCloverleafLink.java:46)
                          [java:wrte:ERR /0:_JavaRaw_0:05/16/2022 13:49:09] Call to “doMsg” returned error string “BADDATA caught exception trying to processMessageFromCloverleaf: caught exception trying to process message from Cloverleaf”. Returning bad send to engine.
                          [pti :sche:DBUG/2:_JavaRaw:05/16/2022 13:49:09] Thread 3 has been enabled
                          [pti :sche:INFO/1:_JavaRaw:05/16/2022 13:49:09] Thread has 1 ready events.
                          [pti :even:DBUG/0:_JavaRaw:05/16/2022 13:49:09] Processing SOCKET (Java protocol thread Eng Event) event 0x35deda98
                          [pti :even:DBUG/1:_JavaRaw:05/16/2022 13:49:09] Calling cb 0x300d5054
                          [pd :pdtd:INFO/1:_JavaRaw:05/16/2022 13:49:09] Executing callback function for writing partial message
                          [pd :pdtd:INFO/1:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Writing message completed
                          [pd :pdtd:INFO/0:_JavaRaw:05/16/2022 13:49:09] NOW AWAITING A REPLY!
                          [pd :pdtd:INFO/3:_JavaRaw:05/16/2022 13:49:09] Thread(1_x_sandbox_ADT) will expect incoming reply
                          [diag:leak:DBUG/0:_JavaRaw:05/16/2022 13:49:09] diag ev alloc 0x343141f8
                          [diag:leak:DBUG/0:_JavaRaw:05/16/2022 13:49:09] diag dqe alloc 0x3489cde8
                          [pti :even:DBUG/0:_JavaRaw:05/16/2022 13:49:09] tiRegistering TIMER (<no description>) event 0x343141f8 for tid 3
                          [pti :even:DBUG/0:_JavaRaw:05/16/2022 13:49:09] evRegistering TIMER (<no description>) event 0x343141f8 for tid 3
                          [dbi :rlog:DBUG/3:_JavaRaw:05/16/2022 13:49:09] [0.0.422163] Looking for mid in recovery db
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘cl_keyfindlock: About to do d_keylock’
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (1000) ‘cl_keyfindlock: About to do d_keyfind, keyval:’
                          [msg :Mid :DBUG/3:_JavaRaw:05/16/2022 13:49:09] Assigned mid [0.0.422163] to msg efff7028
                          [msg :Msg :DBUG/0:_JavaRaw:05/16/2022 13:49:09] msg_Alloc new message 0xefff7028
                          [msg :Msg :DBUG/0:_JavaRaw:05/16/2022 13:49:09] msgCopy from 0xefff6d28 [0.0.422162] to 0xefff7028 [0.0.422163]
                          [pd :thrd:INFO/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Saving to error database(BADDATA)
                          [dbi :rlog:INFO/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Transitioning msg to error db w/state 419
                          [dbi :rlog:INFO/1:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Update msg in recovery db to state OB post-SMS
                          [dbi :log :DBUG/2:_JavaRaw:05/16/2022 13:49:09] log context: type 1, dbn 1, msgRec 10001, mdRec 10002, bodyRec 10003
                          [dbi :log :DBUG/2:_JavaRaw:05/16/2022 13:49:09] state 11, mode 1
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘cl_lock: Trying to lock database ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘type=w, rec=10001
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (1) ‘type=w, rec=10002
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (2) ‘type=w, rec=10003
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘cl_lock: Succeeded in locking database ‘
                          [dbi :log :DBUG/2:_JavaRaw:05/16/2022 13:49:09] update var MD, upd 1, dirty 0
                          [dbi :elog:INFO/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Write message to error database, edbState 419 rdbState 11
                          [dbi :elog:INFO/1:_JavaRaw:05/16/2022 13:49:09] Creating prepared statements for insert in /hci/cis19.1/integrator/sandbox_t/exec/databases/elog.elogdb
                          [dbi :elog:DBUG/1:_JavaRaw:05/16/2022 13:49:09] sizeof qry = 1024, len=545, qry:INSERT INTO elog_msgs (MessageContent, DataLen, DestConn, OrigDestConn, DataFmt, SepChars, DriverCtl, UserData, MidDomain, MidHub, MidNum, SrcMidDomain, SrcMidHub, SrcMidNum, Type, SourceConn, OrigSourceConn, Priority, Class, Flags, EdbState, GroupMidDomain, GroupMidHub, GroupMidNum, XltThread, OwnerThread, Retries, MidsAreNull, SkipXlt, GroupID, TimeIn, TimeXlt, TimeOut, TimeQCur, TimeQTot, TimeRec, ErrorString, RdbState) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?, ?)
                          [dbi :elog:DBUG/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Insert message successful
                          [dbi :rlog:INFO/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] Delete message from recovery database
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘cl_lock: Trying to lock database ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘type=w, rec=10001
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (1) ‘type=w, rec=10002
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (2) ‘type=w, rec=10003
                          [dbi :dbi :DBUG/1:_JavaRaw:–/–/—- –:–:–] ‘
                          [dbi :dbi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] (0) ‘cl_lock: Succeeded in locking database ‘
                          [pd :pdtd:DBUG/0:_JavaRaw:05/16/2022 13:49:09] [0.0.422162] check reserved OBmsg 0xefff6d28/0xefff6d28
                          [msg :Msg :DBUG/0:_JavaRaw:05/16/2022 13:49:09] msgFree 0xefff6d28 refCnt 1
                          [pd :pdtd:INFO/0:_JavaRaw:05/16/2022 13:49:09] Shutting down await reply mode
                          [pd :pdtd:DBUG/0:_JavaRaw:05/16/2022 13:49:09] Reply mode clean-up.
                          [msg :Msg :DBUG/0:_JavaRaw:05/16/2022 13:49:09] msgFree 0xefff7028 refCnt 1
                          [pti :even:DBUG/0:_JavaRaw:05/16/2022 13:49:09] tiUnregistering TIMER (<no description>) event 0x343141f8 for tid 3
                          [pti :even:DBUG/0:_JavaRaw:05/16/2022 13:49:09] evUnregister TIMER (<no description>) event 0x343141f8 for tid 3
                          [diag:leak:DBUG/0:_JavaRaw:05/16/2022 13:49:09] diag dqe free 0x3489cde8
                          [diag:leak:DBUG/0:_JavaRaw:05/16/2022 13:49:09] diag ev free 0x343141f8
                          [pti :sche:INFO/1:_JavaRaw:05/16/2022 13:49:09] Thread has 0 ready events left.
                          [pti :sche:INFO/2:_JavaRaw:05/16/2022 13:49:09] Performing apply callback for thread 3
                          [msi :msi :DBUG/1:_JavaRaw:05/16/2022 13:49:09] msiExportStats: export for thread: _JavaRaw

                      • #119741
                        Paul Stein
                        Participant

                          Bill -I usually get bad data errors when resending the message form smat or if the reply doesn’t have an endpoint. Try to send the message from the thread it will be routed from using an external client, like HL7Spy or SOAPUI.  Basically, if the IB message that is routing the message is trying to send a reply but doesn’t have any where to send to since it was resent via SMAT

                        • #119742
                          Charlie Bursell
                          Participant

                            It looks like the operative error is:

                            WARNING: The key ‘httpRequestInfo’ is expected to be a map, but it is not. Cast exception is: java.lang.String incompatible with java.util.Map

                            You need to echo out the parameters toe httpRequestInfo and make sure it is set properly.

                            I am not sure when it means when it says “expected to be a map”.

                            Maybe now you have enough error info that those wit more experience with this type of interface can help.

                          • #119743
                            Bill Pitts
                            Participant

                              Getting feedback from Infor support that USERDATA can’t be passed as “dispatch” for this and must be passed as “webClientFactory” (if I understood them correctly)

                              Does anyone know the syntax for passing webClientFactory NAME(s) for a java/ws-rawclient outbound thread?

                              I’m not sure if these are passed in the USERDATA as an override or if it’s a combination of setting up multiple Raw_Consumers and then passing the USERDATA

                              CAA-WS guide is confusing on this

                            • #119744
                              Bill Pitts
                              Participant

                                Added raw_consumer to java/ws-rawclient thread protocol properties

                                1 – for updates, 2 – for discharges

                                Sent webClientFactory name in USERDATA

                                msgUserData       : {webClientFactory AngelEyeUpdateLGH} {httpRequestInfo {requestURL https://lowellgeneral-test.angeleyecameras.com/api/v1/adt/update}}

                                Got below error:

                                [java:java:WARN/1:AngelEye_JavaRaw2_0:05/19/2022 08:21:51] com.infor.cloverleaf.gjdws.validation.MessageValidation printWarnings:WARNING: Unknown key in overrides ‘webClientFactory’, it will be ignored.  Valid keys at this level are [dispatch, httpRequestHeaders, httpRequestInfo, trxid]

                                 

                                Switched to sending ‘dispatch’ in USERDATA:

                                msgUserData       : {dispatch AngelEyeUpdateLGH} {httpRequestInfo {requestURL https://lowellgeneral-test.angeleyecameras.com/api/v1/adt/update}}

                                Then got this error:
                                org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type ‘com.infor.cloverleaf.gjdws.utils.WebClientFactory’ available: expected single matching bean but found 2: AngelEyeUpdateLGH,AngelEyeDischargeLGH

                                <hr />

                                So, guessing I’m either:
                                1) sending the keys incorrectly  (Infor support seems to indicate I need to send webClientFactory and not dispatch)

                                or

                                2)  webClientFactory needs to be defined as an allowable key – possibly in a java config file

                                or

                                3)  something not quite right with the Raw_Consumer setup

                                ************************************************************

                                Anyone know how to correctly pass the webClientFactory key?

                                Attached file has netconfig of thread and latest logfile errors

                                Attachments:
                                You must be logged in to view attached files.
                              • #119746
                                Bill Pitts
                                Participant

                                  Think we got this working!

                                  Had to set the webClientFactoryKey

                                  keylset uData webClientFactory $webClientFactoryName
                                  msgmetaset $mh USERDATA $uData

                                  Have two Raw_Consumers on outbound java/ws-rawclient protocol config.

                                  One pointing to update url; other pointing to discharge url

                                  webClientFactory key passes name of Raw_Consumer , based on logic in tclproc

                                  Appears to be working; throwing one warning error in log that I’m checking and  tclprocs need lots of cleanup … but very encouraging at this point

                                  • #120065
                                    Mike Taylor
                                    Participant

                                      Hi Bill,

                                      I am working with this vendor and have it configure to send out information to them successfully.  My first attempt at sending to api with Cloverleaf.  With this being sent to https server for the api in the conduit did you do any configuration for TLS in regards to truststore and keystore?

                                       

                                      Thank you,

                                      Mike

                                  • #119835
                                    MiteshBhatt
                                    Participant

                                      Hi Bill – Looks like we are doing similar, can we connect? or can you send me a copy of NetConfig to see if I can mimic your work?

                                      Mitesh.Bhatt@Wolterskluwer.com

                                    • #119836
                                      MiteshBhatt
                                      Participant

                                        Hi Bill, We have to send a payLoad to a FHIR server to fetch a patient resource (from ADT) similar to your work. And I am new to Cloverleaf world. Would like to know how to setup a WS-Client to go out and fetch the resource in JSON.

                                        Step 2 will be using basic or token authorization.

                                        If you can help share the Config. then i can load and tweak according to my needs.

                                        Thanks for your help in advance!

                                      • #119912
                                        Feda Birani
                                        Participant

                                          Hi Bill,

                                          I noticed your setting the webClientFactory key in USERDATA. Your not putting this in httpRequestInfo, so assuming its not cloverleaf that requires it? Are you using it so you can reference it from your tcl logic? I’m having issues on my end and trying to decipher whether I need it for my 1 raw_consumer or not.

                                          I’m having an issue setting up a rawclient/post that has CA certificates in a keystore located in a file/directory .  I’ve added a conduit to set tls tab with the keystore/truststore location/password. msgdump shows that my USERDATA has the httpRequestInfo with url, post and content-type etc that i need. However, when the JSON message is trying to send, i receive the below errors

                                          {exception {{level send} {cause No\ message\ body\ writer\ has\ been\ found\ for\ class\ java.io.ByteArrayInputStream,\ ContentType:\ application/xml} {stackTrace javax.ws.rs.ProcessingException:\ org.apache.cxf.interceptor.Fault:\ No\ message\ body\ writer\ has\ been\ found\ for\ class\ java.io.ByteArrayInputStream,\ ContentType:\ application/xml\r\n\tat\ org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1149)\r\n\tat\ org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1094)\r

                                          inaryDataProvider.copyInputToOutput(BinaryDataProvider.java:194)\r\n\tat\ org.apache.cxf.jaxrs.provider.BinaryDataProvider.writeTo(BinaryDataProvider.java:154)\r\n\tat\ org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1381)\r\n\tat\ org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:477)\r\n\t…\ 10\ more\r\nCaused\ by:\ sun.security.validator.ValidatorException:\ PKIX\ path\ building\ failed:\ sun.security.provider.certpath.SunCertPathBuilderException:\ unable\ to\ find\ valid\ certification\ path\ to\ requested\ target\r\n\tat\ sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:397)\r\n\tat\ sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)\r\n\tat\ sun.security.validator.Validator.validate(Validator.java:262)\r\n\tat\ sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)\r\n\tat\ sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)\r\n\tat\

                                          PKI certs added and I’m able to send a successful json message through soapui, so it has to be my thread setups that is the issue. Any help would be appreciated.

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