{"id":7737,"date":"2019-12-10T09:54:11","date_gmt":"2019-12-10T17:54:11","guid":{"rendered":"https:\/\/minisoft.com\/support\/?p=7737"},"modified":"2021-02-04T13:38:02","modified_gmt":"2021-02-04T21:38:02","slug":"eformz-api-post-of-xml-data-to-an-accessible-queue","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/eformz-api-post-of-xml-data-to-an-accessible-queue\/","title":{"rendered":"eFORMz API: POST of XML data to an Accessible Queue"},"content":{"rendered":"\n<p>For a comprehensive resource, consult the following: <a href=\"\/support\/index.php\/eformz-api-management-developer-resources\/\">eFORMz API Management (Developer Resources) [Web Services]<\/a><\/p>\n\n\n\n<p>eFORMz can be called as a web service. We loosely refer to eFORMz calling itself as the eFORMz API (Application Programming Interface). For more details, view the following posts:<\/p>\n\n\n\n<p><a href=\"\/support\/index.php\/eformz-api\/\">eFORMz API (Called as a Web Service)<\/a><\/p>\n\n\n\n<p><a href=\"\/support\/index.php\/eformz-api-url-parameters\/\">eFORMz API URL Parameters<\/a><\/p>\n\n\n\n<p><a href=\"\/support\/index.php\/eformz-api-net-web-service-call\/\">eFORMz API .NET Web Service Call<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">VBScript sample: POST of XML data to an Accessible Queue<\/h2>\n\n\n\n<p>Below, there&#8217;s a standalone VBScript example of calling eFORMz API, specifically the POST of XML data to an Accessible Queue. This example includes the creation of the XML data using objects in place of the problematic strings.Replacing the text1 line with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">set text1 = xdoc.createTextNode(\"TITLE &amp; stuff\") <\/pre>\n\n\n\n<p>Yields the following XML data:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">TITLE &amp; stuffNAME<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">option explicit\n 'On Error Resume Next\n Function CallWebService(URL, ConfigurationName, QueueName, NameTemplate, strRequest)\n     dim strUrl\n     dim http\n     dim Cfg\n     dim Queue\n     dim Name\n <code>Cfg = \"&amp;ConfigurationName=\" &amp; ConfigurationName Queue = \"&amp;QueueName=\" + QueueName Name = \"&amp;NameTemplate=\" + NameTemplate Const EFZAPI = \"\/servlet\/com.minisoft.AppServer.AppServer?APP=com.minisoft.eformz.eFORMzApp\" Const DIRECTOR = \"&amp;director&amp;Host=localhost&amp;Port=9996&amp;User=minisoft&amp;Password=password\" Const SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056 strUrl = URL + EFZAPI + DIRECTOR + Cfg + Queue + Name set http=CreateObject(\"MSXML2.ServerXMLHTTP.3.0\") http.SetOption(2) = SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS http.open \"POST\",strUrl,false http.setRequestHeader \"Content-Type\",\"text\/xml\" http.send strRequest If http.Status = 200 Then     'WScript.Echo \"STATUS : \" &amp; http.status     'WScript.Echo \"RESPONSE : \" &amp; http.responseText else     WScript.Echo \"STATUS : \" &amp; http.status     WScript.Echo \"RESPONSE : \" &amp; http.responseText End If<\/code>\n End Function\n Function CreateXML()\n     dim xdoc\n     dim root\n     dim title\n     dim name\n     dim text1\n     dim text2\n <code>set xdoc = CreateObject(\"MSXML2.DOMDocument\") set root = xdoc.appendChild(xdoc.CreateElement(\"data\")) set title = root.appendChild(xdoc.createElement(\"title\")) set text1 = xdoc.createTextNode(\"TITLE\") title.appendChild text1 set name = root.appendChild(xdoc.createElement(\"name\")) set text2 = xdoc.createTextNode(\"NAME\") name.appendChild text2 CreateXML = xdoc.xml<\/code>\n End Function\n\n dim URL\n dim ConfigurationName\n dim QueueName\n dim NameTemplate\n dim strRequest\n\n URL = \"https:\/\/localhost:8000\"\n ConfigurationName = \"accessible.cfg\"\n QueueName = \"Accessible\"\n NameTemplate = \"data.xml\"\n strRequest = CreateXML()\n CallWebService URL, ConfigurationName, QueueName, NameTemplate, strRequest <\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a comprehensive resource, consult the following: eFORMz API Management (Developer Resources) [Web Services] eFORMz can be called as a web service. We loosely refer to eFORMz calling itself as the eFORMz API (Application Programming Interface). For more details, view the following posts: eFORMz API (Called as a Web Service) eFORMz API URL Parameters eFORMz [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1,454],"tags":[584,583,341,342,25],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/7737"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=7737"}],"version-history":[{"count":4,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/7737\/revisions"}],"predecessor-version":[{"id":8939,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/7737\/revisions\/8939"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=7737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=7737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=7737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}