{"id":5928,"date":"2017-12-13T00:10:50","date_gmt":"2017-12-13T00:10:50","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=5928"},"modified":"2020-07-01T16:33:46","modified_gmt":"2020-07-01T23:33:46","slug":"web-service-post-call-to-wake-up-a-sleeping-queue-part-3","status":"publish","type":"post","link":"https:\/\/minisoft.com\/support\/web-service-post-call-to-wake-up-a-sleeping-queue-part-3\/","title":{"rendered":"Web Service POST call to \u201cWake Up\u201d a \u201cSleeping\u201d Queue: Part 3"},"content":{"rendered":"<p>To follow along with this guide please download the following zip, which contains WakeUpDirectoryQueue.efz and ws_accessible.cfg.<\/p>\n<p><a href=\"\/support\/wp-content\/uploads\/2017\/12\/WakeUpQueueGuide.zip\">WakeUpQueueGuide<\/a>\u00a0(Project files).<\/p>\n<p>The web service URL that we will be using is going to be set to the following:<\/p>\n<pre>http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&amp;director&amp;Host=localhost&amp;Port=9996&amp;User=minisoft&amp;Password=password&amp;ConfigurationName=ws_accessible.cfg&amp;QueueName=Test&amp;NameTemplate=data.xml&amp;ProcessData=true<\/pre>\n<p>Here is the URL broken up into sections:<\/p>\n<ul>\n<li>http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp (Base URL)<\/li>\n<li>&amp;director&amp;Host=localhost (Will be using the director on a localhost)<\/li>\n<li>&amp;Port=9996<\/li>\n<li>&amp;User=minisoft<\/li>\n<li>&amp;Password=password<\/li>\n<li>&amp;ConfigurationName=ws_accessible.cfg<\/li>\n<li>&amp;QueueName=Test<\/li>\n<li>&amp;NameTemplate=data.xml (the file extension of the data you are passing through the web call)<\/li>\n<li>&amp;ProcessData=true (web service will wake up the queue monitor (if it is sleeping) to process immediately)<\/li>\n<\/ul>\n<p>1. Create this URL by creating a variable and setting the value to that url. Here is an example with the variable \u201cWSURL\u201d. The URL is being set into the variable by the function Set to Value, which is a right click on the variable and select function \u201cSet Value\u201d. You can also use the function \u201cConcatenate\u201d, which appends that certain line to the URL, to have a better understand of what is being placed into the URL.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5930\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample.jpg\" alt=\"\" width=\"402\" height=\"179\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample.jpg 402w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample-300x134.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample-150x67.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample-250x111.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/URLExample-400x179.jpg 400w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/a><\/p>\n<p>2. Once the URL is set you will want to create variables for \u201cRequest Data\u201d, \u201cResponseData\u201d, and \u201cResponseCode\u201d.<\/p>\n<ul>\n<li>Request data \u2013 Data that is going to be sent via web service call. We currently have XML data.<\/li>\n<li>ResponseData \u2013 MIME Output Data from the web service call.<\/li>\n<li>ResponseCode \u2013 Error codes from the web service call. 500 is an error and 200 is a successfully.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5931\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample.jpg\" alt=\"\" width=\"338\" height=\"199\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample.jpg 338w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample-300x177.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample-150x88.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample-250x147.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/ProjectExample-306x180.jpg 306w\" sizes=\"(max-width: 338px) 100vw, 338px\" \/><\/a><\/p>\n<p>3. Create the webservice action.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5933\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure.jpg\" alt=\"\" width=\"352\" height=\"199\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure.jpg 352w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure-300x170.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure-150x85.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure-250x141.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebServiceProcedure-318x180.jpg 318w\" sizes=\"(max-width: 352px) 100vw, 352px\" \/><\/a><\/p>\n<p>4. The WebService Procedure uses the RequestData variable. Create an action inside of the WebService<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5934\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService.jpg\" alt=\"\" width=\"558\" height=\"513\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService.jpg 558w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-300x276.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-150x138.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-250x230.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-550x506.jpg 550w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-196x180.jpg 196w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-326x300.jpg 326w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/AddWebService-544x500.jpg 544w\" sizes=\"(max-width: 558px) 100vw, 558px\" \/><\/a><\/p>\n<p>5. Right click on the web service call action and open the properties window.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5935\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService.jpg\" alt=\"\" width=\"424\" height=\"508\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService.jpg 424w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService-250x300.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService-125x150.jpg 125w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService-150x180.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/WebService-417x500.jpg 417w\" sizes=\"(max-width: 424px) 100vw, 424px\" \/><\/a><\/p>\n<p>6. Select the Request verb POST. Select this action to use the variable that was assigned the Web Service call URL. In our example it is WSURL. Set the input data and output data to MIME. \u00ad\u00ad\u00adIn our example we are passing through XML, so the content type is set to XML. The MIME Output Data is set to the variable ResponseData.<\/p>\n<p>7. Set the variable ResponseCode. This will return error codes from the Web Service to better monitor if the service was successful.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5936\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable.jpg\" alt=\"\" width=\"532\" height=\"115\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable.jpg 532w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable-300x65.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable-150x32.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/SetVariable-250x54.jpg 250w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/a><\/p>\n<p>8. For testing purposes, add a variable (Timestamp) to check if the Web Service is being sent.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5937\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp.jpg\" alt=\"\" width=\"319\" height=\"65\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp.jpg 319w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp-300x61.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp-150x31.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp-250x51.jpg 250w\" sizes=\"(max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5938\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2.jpg\" alt=\"\" width=\"695\" height=\"405\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2.jpg 695w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-300x175.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-150x87.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-250x146.jpg 250w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-550x321.jpg 550w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-309x180.jpg 309w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Timestamp2-515x300.jpg 515w\" sizes=\"(max-width: 695px) 100vw, 695px\" \/><\/a><\/p>\n<p>9. Display Forms and Data will refresh the eFORMz forms and Data, which will create another Web Service call.<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5939\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh.jpg\" alt=\"\" width=\"339\" height=\"88\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh.jpg 339w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh-300x78.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh-150x39.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/refresh-250x65.jpg 250w\" sizes=\"(max-width: 339px) 100vw, 339px\" \/><\/a><\/p>\n<p>The ResponseCode will be set to 200. The data will have been set to the name of your queue in our example it is sent to \u201cInput\/test\u201d. The data should instantly be sent to \u201coutput\/test\u201d even though the queue is sleeping for 500 seconds. The sleeping queue has been awakened using a Web Service call<\/p>\n<p><a href=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-5940\" src=\"https:\/\/alt2.minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct.jpg\" alt=\"\" width=\"413\" height=\"99\" srcset=\"https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct.jpg 413w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct-300x72.jpg 300w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct-150x36.jpg 150w, https:\/\/minisoft.com\/support\/wp-content\/uploads\/2017\/12\/Correct-250x60.jpg 250w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To follow along with this guide please download the following zip, which contains WakeUpDirectoryQueue.efz and ws_accessible.cfg. WakeUpQueueGuide\u00a0(Project files). The web service URL that we will be using is going to be set to the following: http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp&amp;director&amp;Host=localhost&amp;Port=9996&amp;User=minisoft&amp;Password=password&amp;ConfigurationName=ws_accessible.cfg&amp;QueueName=Test&amp;NameTemplate=data.xml&amp;ProcessData=true Here is the URL broken up into sections: http:\/\/localhost:8001\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp (Base URL) &amp;director&amp;Host=localhost (Will be using the director on a [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[351,344,303,346,341,342,350],"_links":{"self":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5928"}],"collection":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=5928"}],"version-history":[{"count":6,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5928\/revisions"}],"predecessor-version":[{"id":8180,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/posts\/5928\/revisions\/8180"}],"wp:attachment":[{"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=5928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=5928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=5928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}