Response from web service

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Response from web service

  • Creator
    Topic
  • #48441
    Barry Sheesley
    Participant

    I have a project to call a web service, send some parameter data in XML, and then receive a response that is also XML data. I am using a Tcl proc on my outbound thread to call the web service and I am receiving the data back into a variable. My question now is, how do I get this XML data into a message that I can now send back through the Cloverleaf engine to send back to the originating system?

    Thanks.

Viewing 3 reply threads
  • Author
    Replies
    • #58642
      Mike Shoemaker
      Participant

      Hey Barry,  Have a look at this thread and see if it helps you out

      http://clovertech.infor.com/viewtopic.php?t=1061&highlight=http

      Let me know if you want to discuss this further as i have a similar process in place.

      Mike

    • #58643
      Barry Sheesley
      Participant

      Mike, thanks for the response. I did look at your code before posting my question. I don’t see where you actually pass any information retrieved from the web service back to the Quovadx engine. I’m certainly not a Tcl expert so I may be missing something. The web service I’m calling sends back data in XML form that I then need to send back through the engine to the server that originally sent the request.

    • #58644
      Mike Shoemaker
      Participant

      I see your point. My script is plain old tcl and is tied to the Outbound TPS, so it does not move data back.  There is a variable in the code that holds the server response, be it HTML or XML or HL7.  I take that as the ack/nak and feed it into a seperate tcl proc that will handle errors but i’m not feeding back into the engine. I’m sure there must be away to forward this message to another thread which could help you possibly.

    • #58645
      Barry Sheesley
      Participant

      I finally got this to work using the following:

      Created a new message using the following:

      set newmsg [msgcreate -recover -class protocol -type data $httpBody]

      msgmetaset $newmsg DESTCONN $HciConnName PRIORITY 5120 SOURCECONN $HciConnName

      The variable $httpBody contains the XML response from the web server.

      I then used the OVER disposition to send this message back to the inbound queue of this thread:

      lappend dispList “OVER $newmsg”

      This seems to work OK.  I had to use Tcl to strip some extraneous tags out of the XML since I was getting the XML back wrapped in a SOAP message. Thanks for the assistance!

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,293
Replies
34,435
Topic Tags
286
Empty Topic Tags
10