<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rest Service Call using httpWrite function</title><link>https://community.appian.com/discussions/f/integrations/10215/rest-service-call-using-httpwrite-function</link><description>Hi, 
 I am trying to call Rest Service, post method using httpWrite function. I am able to get call end point, using smart service but it doesn&amp;#39;t work with httpWrite function. 
 This service returns JSON response which i am supposed to capture. 
 Any</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45126?ContentTypeID=1</link><pubDate>Sat, 29 Apr 2017 00:53:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e0637876-196b-4bf2-9d3b-4fbc7886f262</guid><dc:creator>vineeta6579</dc:creator><description>Yes that was issue. Thanks Josh&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45125?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 19:24:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9a5e5ee0-c240-4de3-ad72-23ca2428b3b2</guid><dc:creator>Josh</dc:creator><description>I don&amp;amp;#x27;t know if this is the issue but I&amp;amp;#x27;ve run into an issue in the past where even though you pass the parameters in with keyword syntax, the function takes in the parameters in order. So you would want to pass in {paramNames, paramValues, headerNames, headerValues, body, user, etc}&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45124?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 19:17:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4144531-ab37-41ea-9d19-b2df3ecaa359</guid><dc:creator>vineeta6579</dc:creator><description>&lt;p&gt;I am looking for &lt;strong&gt;post&lt;/strong&gt; method which is not supported by a!httpQuery() function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45123?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 19:16:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9a977b73-df1b-4429-b5c6-3d3be0c2afbe</guid><dc:creator>vineeta6579</dc:creator><description>No, same error!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45122?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 17:47:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6be3fca4-4bf0-497b-b87a-38e2bf471a5f</guid><dc:creator>Ramesh Gudipati</dc:creator><description>We used a!httpQuery as mentioned in the below link and it is working fine for us.&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/17.1/fnc_connector_http_a_httpquery.html"&gt;docs.appian.com/.../fnc_connector_http_a_httpquery.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45121?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 16:32:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5717913c-a43e-445c-8501-791ce59f2db4</guid><dc:creator>Josh</dc:creator><description>I think you need to format your value as a dictionary. Try using this: a!toJson({value:{clientId: &amp;quot;FRA5001939&amp;quot;, invoiceType: &amp;quot;Domino&amp;amp;#x27;s Food&amp;quot;}})&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45120?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 16:06:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c7c4c463-a1bb-4ce1-bfb5-b65b91798210</guid><dc:creator>vineeta6579</dc:creator><description>&lt;p&gt;Thanks Josh, &lt;br /&gt;I am using tojason method to make request body but getting Type value error.&lt;br /&gt;&lt;br /&gt;Expression evaluation error at function &amp;amp;#x27;httppostwithresponse&amp;amp;#x27; [line 13]: Error evaluating function &amp;amp;#x27;httppostwithresponse&amp;amp;#x27; : The passed parameter(s) are of the wrong type. Received the type com.appiancorp.common.xml.JaxbConversionException: JAXB was not able to produce a value for typed value TypedValue[it=94,v={TypedValue[it=3,v=clientId]=TypedValue[it=3,v=FRA5001939], TypedValue[it=3,v=invoiceType]=TypedValue[it=3,v=Domino&amp;amp;#x27;s Food]}] as java class java.lang.Long.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Modified code:&lt;/p&gt;
&lt;p&gt;load(&lt;br /&gt;local!requestBody: a!toJson(value:{ &amp;quot;clientId&amp;quot;:&amp;quot;FRA5001939&amp;quot;, &amp;quot;invoiceType&amp;quot;:&amp;quot;Domino&amp;#39;s Food&amp;quot;}),&lt;br /&gt;httppostwithresponse(&lt;br /&gt;endpoint: &amp;quot;http://XX.XX.XX.XX:9090/ws/rest/OSA_API/getUnpaidFoodInvoicesByUnit&amp;quot;,&lt;br /&gt;paramNames: {},&lt;br /&gt;paramValues: {},&lt;br /&gt;headerNames: {},&lt;br /&gt;headerValues: {},&lt;br /&gt;user: null,&lt;br /&gt;password: null,&lt;br /&gt;domain: null,&lt;br /&gt;timeout: &amp;quot;60&amp;quot;,&lt;br /&gt;body: local!requestBody&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45114?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 12:38:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:09ea683b-a76b-448c-89ce-55c6d074bd09</guid><dc:creator>Josh</dc:creator><description>a!httpwrite() returns a writer function and will not return a result.  (&lt;a href="https://docs.appian.com/suite/help/17.1/fnc_connector_http_a_httpwrite.html)"&gt;docs.appian.com/.../fnc_connector_http_a_httpwrite.html)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
httppostwithresponse() from the shared component &amp;quot;Send HTTP Request Plug-in&amp;quot; should help you out. &lt;a href="https://forum.appian.com/suite/sites/shared-components/page/shared-components/record/lIBCLGOdlMUpdGVqW3dQaIKmclBmvvNEj8vu_cjb7T-5YiPr4Fu8ly5Yj1s09uenE4RYzA8zKyx7eiUhulE6eUk4AclBL3PFrVMtsj6VkOvb7vV/view/summary"&gt;forum.appian.com/.../summary&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rest Service Call using httpWrite function</title><link>https://community.appian.com/thread/45112?ContentTypeID=1</link><pubDate>Fri, 28 Apr 2017 11:38:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4afd053a-b02e-4e45-8ea7-d8af1bb72a14</guid><dc:creator>Jasmin</dc:creator><description>Hi vahluwalia, &lt;br /&gt;
Give try like this, Declare load variable for body part because the first blank argument will be filled with the value being saved into the variable.&lt;br /&gt;
local!body:a!toJson(&lt;br /&gt;
 {&lt;br /&gt;
 &amp;quot;clientId&amp;quot;: &amp;quot;FRA501&amp;quot;,&lt;br /&gt;
 &amp;quot;invoiceType&amp;quot;: &amp;quot;Food&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
/////////////////////////////////////&lt;br /&gt;
a!buttonWidget(&lt;br /&gt;
 label: &amp;quot;start&amp;quot;,&lt;br /&gt;
 value:local!body,&lt;br /&gt;
 saveInto:local!count&lt;br /&gt;
 )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>