<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.method.me/cs/utility/FeedStylesheets/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>Method:API Q&amp;A</title><link>http://forums.method.me/cs/forums/15.aspx</link><description>Ask questions specific to the MethodAPI from the Method Team and other Method users.</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP2 (Build: 31113.47)</generator><item><title>Re: 'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35858.aspx</link><pubDate>Wed, 12 Sep 2018 18:52:37 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35858</guid><dc:creator>Method_Hossein</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35858.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35858</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;I see where the confusion comes from. This page is automcally generated by the tech stack that we are using, but on our servers, the direct GET and POST feature is disabled. We will investigate ways to either change the generated samp&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;span id="mce_2_start" style="overflow:hidden;"&gt;&lt;/span&gt;le &lt;span id="mce_2_end" style="overflow:hidden;"&gt;&lt;/span&gt;page or enable the POST request, but for now you best aproach is to use SOAP.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;Good luck with your integration!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;Hossein&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;span id="mce_3_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: 'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35857.aspx</link><pubDate>Wed, 12 Sep 2018 18:25:05 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35857</guid><dc:creator>hdemirev</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35857.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35857</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;Okay, I&amp;#39;ll definitely try that. I was initally confused because on the info page for this method&lt;span id="mce_2_start" style="overflow:hidden;"&gt; (https://www.methodintegration.com/MethodAPI/service.asmx?op=MethodAPIInsertV2)&lt;/span&gt;, you have the SOAP examples first, and then what seems to be a regular HTTP GET/POST.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: 'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35856.aspx</link><pubDate>Wed, 12 Sep 2018 17:29:58 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35856</guid><dc:creator>Method_Hossein</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35856.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35856</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;This endpoint is not a RESTful endpoint. You need to wrap your request in a SOAP envelope, which can be done via a post request, but it is &lt;span id="mce_1_start" style="overflow:hidden;"&gt;bette&lt;/span&gt;r to use a battle tested SOAP library.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;/span&gt;This article will give you more context and introduces three different SOAP package for node.js:&lt;/p&gt;
&lt;p&gt;https://medium.com/@caleblemoine/how-to-perform-soap-requests-with-node-js-4a9627070eb6&lt;/p&gt;
&lt;p&gt;Hope that helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Hossein&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description></item><item><title>Re: 'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35854.aspx</link><pubDate>Wed, 12 Sep 2018 15:37:54 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35854</guid><dc:creator>hdemirev</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35854.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35854</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m using an HTTP post. Not using a SOAP package, just a standard request library (https://www.npmjs.com/package/request).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;Here&amp;#39;s the request code:&amp;nbsp;&lt;span id="mce_6_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;span id="mce_2_start" style="overflow:hidden;"&gt;&lt;span id="mce_3_start" style="overflow:hidden;"&gt;&lt;span id="mce_4_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;request.post({&lt;span id="mce_7_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;br /&gt; url: `https://www.methodinte&lt;span id="mce_5_start" style="overflow:hidden;"&gt;&lt;/span&gt;gration.com/MethodAPI/service.asmx/MethodAPIInsertV2`,&lt;br /&gt; form: {&lt;br /&gt; strCompanyAccount: process.env.METHOD_ACCOUNT,&lt;br /&gt; strLogin: process.env.METHOD_USERNAME,&lt;br /&gt; strPassword: process.env.METHOD_PASS,&lt;br /&gt; strSessionID: &amp;#39;&amp;#39;,&lt;br /&gt; strTable: &amp;#39;Contacts&amp;#39;,&lt;br /&gt; arrInsertFieldsArray: [&amp;#39;FirstName&amp;#39;, &amp;#39;LastName&amp;#39;],&lt;br /&gt; arrInsertValuesArray: [&amp;#39;TestFirst&amp;#39;, &amp;#39;TestLast&amp;#39;]&lt;br /&gt; },&lt;br /&gt; headers: {&lt;br /&gt; &amp;#39;Content-Type&amp;#39;: &amp;#39;application/x-www-form-urlencoded&amp;#39;&lt;br /&gt; }&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_2_end" style="overflow:hidden;"&gt;&lt;span id="mce_3_end" style="overflow:hidden;"&gt;&lt;span id="mce_4_end" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: 'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35853.aspx</link><pubDate>Wed, 12 Sep 2018 15:33:31 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35853</guid><dc:creator>Method_Hossein</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35853.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35853</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;How a&lt;span id="mce_1_start" style="overflow:hidden;"&gt;re you calling the method? Are you using any SOAP package in node?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;&lt;span id="mce_1_start" style="overflow:hidden;"&gt;&lt;/span&gt;&lt;/span&gt;If you share snippet of&amp;nbsp;&lt;span id="mce_2_start" style="overflow:hidden;"&gt;your code, we might be able to troubleshoot that for you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="overflow:hidden;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>'Object reference not set to an instance of an object.' error with MethodAPIInsertV2 endpoint</title><link>http://forums.method.me/cs/forums/thread/35852.aspx</link><pubDate>Wed, 12 Sep 2018 14:13:55 GMT</pubDate><guid isPermaLink="false">3393c1ec-311b-4812-96cb-ad8c611bba4f:35852</guid><dc:creator>hdemirev</dc:creator><slash:comments>0</slash:comments><comments>http://forums.method.me/cs/forums/thread/35852.aspx</comments><wfw:commentRss>http://forums.method.me/cs/forums/commentrss.aspx?SectionID=15&amp;PostID=35852</wfw:commentRss><description>&lt;p&gt;&lt;span id="mce_0_start" style="overflow:hidden;"&gt;Hi,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m getting this very vague error when trying to create a contact through the API. I think it might have something to do with how I&amp;#39;m sending in the field and value arrays, but I&amp;#39;ve tried everything and can&amp;#39;t figure out what the issue might be.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What&amp;#39;s the correct way to send those arrays in Node.js? Is there some sort of other issue going on?&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>