Web Service Set Up For Dummies

Clovertech Forums Cloverleaf Web Service Set Up For Dummies

  • Creator
    Topic
  • #119044
    Jorge Medina
    Participant

      First time using the java/ws* PROTOCOLS. Is there documentation available to guide a novice thru this ordeal?

      Thanks, Jorge

    Viewing 14 reply threads
    • Author
      Replies
      • #119045
        Vince Angulo
        Participant

          I haven’t found anything useful and had to contract with Infor for implementation assistance.

          The resource I was assigned would not help me understand how to use the tools and insisted on doing the work himself at a pace that I could not keep up.

          It’s not helpful, but was my experience…

           

          • This reply was modified 3 years, 4 months ago by Vince Angulo.
        • #119052
          Paul Stein
          Participant

            There are a few different considerations depending on java/ws-server or ws-client.

            Which one are you setting up? I can give some general advise from what i have set up as i use both and have them locked down with TLS.

          • #119053
            Jorge Medina
            Participant

              I’m trying to set up a vaccination query to our state agency, Immtrac.
              I set up a ws-rawclient:

              Bus: only checked “Message Logging Enabled”
              Conduit: added proxy and enabled TLSv1.2
              Raw Consumer: filled in address; Default Method is GET; Trx ID Determination set to “VALUE”; Trx ID Value set to ‘ ‘ and only Cloverleaf Copy Driver Control is checked.

              DISCLAIMER: The configuration for the thread was derived from the Cloverleaf example RawClient thread. It’s not like I suddenly got smart and figure all this out over the weekend 🙂

              Even though the response code was a 200, the actual response message was more of a java script for building a web page, see attached. I am waiting to here from Immtrac why this type of response was generated.

              Maybe the message structure is incorrect?

              Thanks!

              Attachments:
              You must be logged in to view attached files.
            • #119055
              Paul Stein
              Participant

                Jorge – maybe we can set a screen share up if we need to go further.

                I reviewed your log file  – which had cloverleaf logs and the message handle, which appears you are sending SOAP, therefore should probably be using a PUT message. The reply in the log file appears to be an html/javascript response to a GET from their service. I would expect the health department to most likely want to use a SOAP service.

                I have never used WS-RAW, because it is pretty bare bones and you have have procs to handle almost everything in the payload.

                Do you have CAA (Cloverleaf Webservice Application Adapter) licensed? If so – I would use java/ws-client. That will allow you to let the java client handle the majority of the http and then allow you to create an XML package for xlates and SOAP payload formatting. It is pretty slick and creates the package for you when you input WSDL url in the protocol property set up.

              • #119056
                Jorge Medina
                Participant

                  Paul – yes we do have CAA. I set up a java/ws-client and am generating error:

                  msgState : Bad data (419)

                  BADDATA caught exception trying to processMessageFromCloverleaf: Caught bad data exception trying to process message from Cloverleaf

                   

                  I am definitely open to a screen share as I am getting nowhere.

                  Thank you for your help! Jorge

                • #119058
                  Paul Stein
                  Participant

                    Ok – we need to get a wsdl uri/url – and go from there.

                    Send me an email and we’ll set something up.

                    pstein@ohiponline.org

                  • #119079
                    Jim Boyd
                    Participant

                      Hello, I am working on a WS interface to send ImmTrac VXUs.  I have the wsdl, but not clear on how to configure Cloverleaf to insert an HL7 2.x VXU message into the SOAP wrapper and set credentials.  Would appreciate any tips or advice.

                      • #119081
                        Paul Stein
                        Participant

                          Jim – do you mind sharing your wsdl?  I’d like to take a look at it. You can use the OB java/ws-client to invoke the wsdl and create an xml package. That can then be used to put the message into the payload, which is wrapped by the SOAP Message xml.

                          You can also do what Jorge suggested and use a tcl proc.

                        • #119082
                          Jim Boyd
                          Participant

                            Hi Paul

                            WSDL is attached.

                            I’ve compiled to XML schemas.

                            So would you build an xlate from some format to XML to get the entire HL7 VXU in the Soap envelope?

                            I’ve tried using the WS Client with WSDL but can’t get past this error, but this is using a proc in the OB TPS to build the SOAP envelope.

                            [java:wrte:ERR /0:    ws_cair_0:08/12/2021 12:08:11] Call to “doMsg” returned error string “BADDATA caught exception trying to processMessageFromCloverleaf: Caught bad data except

                            ion trying to process message from Cloverleaf”. Returning bad send to engine.

                             

                             

                            Another test thread is using the WS Raw Client,  with the same proc to build the SOAP envelope but I get a 415 error:

                            msgUserData : {httpResponseHeaders {{Keep-Alive timeout=5,\ max=100} {X-Frame-Options DENY} {transfer-encoding chunked} {Server Apache/2.4.6\ (Red\ Hat\ Enterprise\ Linux)\ Ope
                            nSSL/1.0.2k-fips} {X-OneAgent-JS-Injection true} {X-ORACLE-DMS-ECID 19af5868-4ece-45ac-9a71-0eaaf6a8013c-00000159} {Server-Timing dtRpid\;desc=\”-1344802766\”} {connection Keep-Alive} {S
                            et-Cookie dtCookie=v_4_srv_8_sn_8A2D917FDEF50E3EE2193F627E98BB4C_perc_100000_ol_0_mul_1_app-3Abff3efc1d15036b3_1\;\ Path=/\;\ Domain=.texas.gov} {X-ORACLE-DMS-RID 0} {Date Thu,\ 12\ Aug\
                            2021\ 18:51:54\ GMT}}} {httpResponseCode 415}

                             

                             

                            Attachments:
                            You must be logged in to view attached files.
                        • #119080
                          Jorge Medina
                          Participant

                            Hi Jim –

                            There is a way to set up the WS to put the HL7 message in a soapwrapper. Unfortunately, I was not able to solve that puzzle. 🙁

                            What I ended up doing is creating a tcl and used it as a post proc at the route detail. The tcl sets headers and footers, then sets new message. Here is a snippet:

                            set msg [msgget $mh]

                            set soapheader1 {<soap:Body>}
                            set soapheader2 {<urn:submitSingleMessage>}
                            set soapfooter2 {</urn:submitSingleMessage>}
                            set soapfooter1 {</soap:Body>}

                            set newMessage $soapheader1$soapheader2$msg$soapfooter2$soapfooter1

                            Hope this helps

                            Jorge

                             

                             

                            • #119084
                              Jim Boyd
                              Participant

                                Thanks Jorge, we are trying a proc but dont seem to get either method to work.

                              • #119086
                                Paul Stein
                                Participant

                                  Yep – i actually create a single field VRL to wrap the full HL7 message into, and use the xlate to take the VRL input to the WSDL ‘input message’ part of the XML on the output. After i am done with the xlate, i place it on the route and it actually doesn’t care that the source is HL7 and not an actual VRL file

                                  For the username/passwords on the xlate, i use a hardcoded source variable in the xlate copy operation, ie:

                                  =paulstein or whatever your user name is

                                  and i then place that in the user name portion of the xml input.

                                  Same for the password.

                                   

                                  I will upload a few examples

                              • #119087
                                Paul Stein
                                Participant

                                  Ok – you can definitely send the full hl7 message in the soap body to a department of health hosting a webservice that consumes the data. The WSDL you provided is very similar to the one i am using.

                                  1. Create a single field VRL – mine is called ‘singleMessage.vrl’.
                                    1. See attachment
                                  2. Create xlate to take VRL to XML(from the invoked XML package via the SOAP wsdl)
                                    1. use hard coded variables for the username/passwords in the copy action.
                                      1. 2 separate actions
                                      2. Send to the approprate xml node in the output of the xml
                                    2. Send the whole VRL singleMessage field to the ‘submitSingleMessage subnode of ‘tns:hl7Message’ or something similar depending on public health dept wsd.
                                  3. Apply xlate to the route.
                                  4. See example screenshots.
                                  5. Also – to handle the inbound response, you can do the exact same thing in reverse.
                                    1. See attached word document on how i did that.
                                  Attachments:
                                  You must be logged in to view attached files.
                                  • #119095
                                    Jim Boyd
                                    Participant

                                      thanks for all the detail Paul.

                                      I tried this config but it looks like a partial soap envelope is created.

                                      the header is missing.  Did you have to adjust for that?

                                       

                                      message : ‘<Body xmlns=”http://www.w3.org/2003/05/soap-envelope&#8221; xmlns:WL5G3N1=”urn:cdc:iisb:2011″><WL5G3N1:submitSingleMessage><WL5G3N1:username …

                                    • #119096
                                      Paul Stein
                                      Participant

                                        Are you using java-ws/client in payload mode?

                                      • #119097
                                        Jim Boyd
                                        Participant

                                          no, service mode is set to MESSAGE

                                        • #119098
                                          Paul Stein
                                          Participant

                                            Do you have a proc on the outbound TPS by chance? I have mine set up with MESSAGE for service mode and it is sending:

                                             

                                            <Envelope xmlns=”http://www.w3.org/2003/05/soap-envelope&#8221;
                                            xmlns:tns=”urn:cdc:iisb:2011″>
                                            <Body>
                                            <tns:submitSingleMessage>
                                            <tns:username>testuser</tns:username>
                                            <tns:password>password</tns:password>
                                            <tns:hl7Message>MSH|xxxxxxxxx</tns:hl7Message>
                                            </tns:submitSingleMessage>
                                            </Body>
                                            </Envelope>

                                          • #119099
                                            Jim Boyd
                                            Participant

                                              nothing in OB TPS

                                              xlate test results also missing header

                                               

                                              MESSAGE 1
                                              SOAP-ENV:Body.WL5G3N1:submitSingleMessage.WL5G3N1:username.#text: >S…<
                                              SOAP-ENV:Body.WL5G3N1:submitSingleMessage.WL5G3N1:password.#text: >…<
                                              SOAP-ENV:Body.WL5G3N1:submitSingleMessage.WL5G3N1:facilityID.#text: >…<
                                              SOAP-ENV:Body.WL5G3N1:submitSingleMessage.WL5G3N1:hl7Message.#text: >MSH|^~\&amp;|

                                            • #119101
                                              Paul Stein
                                              Participant

                                                Interesting – I am not having that issue.

                                                Do you have time for a screenshare? email: pstein@ohiponline.org

                                                I can setup a teams meeting.

                                            • #119092
                                              Paul Stein
                                              Participant

                                                Word document attached.

                                                Attachments:
                                                You must be logged in to view attached files.
                                              • #119160
                                                Kimberly Drew
                                                Participant

                                                  Hello,

                                                  We have been asked to send immunizations VXU message to the state using SOAP and this is our first time so we are very new at using Web services.  The state provided us with URL/Endpoint information and web services credentials, but I’m not sure I really know how to proceed.  I have been reading the Infor Cloverleaf Application Adapter Web services User guide and other related articles to try to figure out what I need to do.  Should the state also provide me with the WSDL?  also not sure how to create the  soap envelope that is needed.  I am probably making this more difficult than what it is, so I apologize if I’m asking stupid questions.  Any help you can provide would be greatly appreciated.

                                                  We are 6.2.0.2, windows, and we do have web services as we have the various GUI tools and protocols that are described within the document from Infor.  I would also assume that we would use the protocol of ws-client on the outbound thread to the state.

                                                  thanks

                                                  • #119161
                                                    Paul Stein
                                                    Participant

                                                      Kim – the state should provide a wsdl url for you. In some cases, it requires you to just add ?wsdl at the end of whatever URL they provided for you to submit to.

                                                      You will want that so you can download the wsdl locally and also so you can compile the XML package from it that allows you to use xlates.

                                                      See some of my previous replies here or feel free to reach out to me. I am doing this actively for our state currently using my CAA set up.

                                                  • #119162
                                                    Kimberly Drew
                                                    Participant

                                                      Good morning,  Thank you Paul for getting right back to me.

                                                      I was able to add the ?wsdl to the URL the state provided and was able to generate the xsd files that then compiled in the xml package manager

                                                      But I must be missing something else cause when I run xlate through the testing tool not sure it looks right as I don’t see the soap header.

                                                      Also the VXU message that we are getting from the system to send to the state sends Batch headers and trailers.  So I would assume I would need to do something with those also?

                                                      I have attached the setup that I have done based on the post.

                                                      Please let me know when you would have time to chat about this.  thank you again for all of the help and patience.

                                                       

                                                       

                                                       

                                                      Attachments:
                                                      You must be logged in to view attached files.
                                                    • #119198
                                                      Jorge Medina
                                                      Participant

                                                        Hey everybody  –  finally got this moved to production, so I am posting the configuration used. Attached are the steps used to set up the thread, the tcl used to create the soap envelope and the tcl to remove the soap envelope.  As you read thru the attached, feel free to point out set up which could be improved upon.   🙂

                                                        Thanks!

                                                        Attachments:
                                                        You must be logged in to view attached files.
                                                      • #119202
                                                        Charlie Bursell
                                                        Participant

                                                          For  remove soap proc why not simply:

                                                          regexp -nocase — {^<S:Env.*?<return>(MSH.*?)</return>} $ReplyMsg  {} Hl7Msg

                                                          set Hl7Msg [string map {\n \r} $hl7Msg]\r

                                                          Should be the entire message

                                                          I did not look at other procs yet

                                                        • #119203
                                                          Jeff Dawson
                                                          Participant

                                                            Was gonna say I’ve done something similar like above above

                                                             

                                                            set hl7RequestTag {<return.*?</return>}
                                                            set hl7RequestTagInfo [regexp -all -inline -nocase — $hl7RequestTag $msg]
                                                            set hl7Msg [lindex [string map {<return> {} </return> {} \n \r “amp;” {}} $hl7RequestTagInfo] 0]

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