<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CIM error: Root element is missing in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17346#M9704</link>
    <description>&lt;P&gt;Yes, we looked the asp classic sample and&amp;nbsp;we tried sending the string directly but get the same error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2011 03:41:43 GMT</pubDate>
    <dc:creator>cimuser22</dc:creator>
    <dc:date>2011-09-27T03:41:43Z</dc:date>
    <item>
      <title>CIM error: Root element is missing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17306#M9684</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to integrate via Customer Information Manager (CIM). We have a code written in transact SQL (MS SQL Server 2000) using .NET objects,&amp;nbsp; which sends the XML but we are receiving the same error all the time (Root element is missing.)&amp;nbsp; We know that&amp;nbsp;there are better ways to accomplish it (asp.net page, etc) but now we need specifically to do it via SQL Server. We know this is a very particular scenario but maybe someone can give us any idea.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have changed the code to try in different ways but all the time we get the same error. We appreciate any help. This is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;declare @strXML varchar(8000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select @strXML =&lt;BR /&gt;'&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;BR /&gt;&amp;lt;createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;&lt;BR /&gt;&amp;lt;merchantAuthentication&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;xxx&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;transactionKey&amp;gt;yyy&amp;lt;/transactionKey&amp;gt;&lt;BR /&gt;&amp;lt;/merchantAuthentication&amp;gt;&lt;BR /&gt;&amp;lt;transaction&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;profileTransAuthOnly&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;amount&amp;gt;34&amp;lt;/amount&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;shipping&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;amount&amp;gt;0.00&amp;lt;/amount&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;free shipping&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Free ground based 5 to 10 day shipping&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/shipping&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;lineItems&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;itemId&amp;gt;ITEM00001&amp;lt;/itemId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;name of item sold&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;Description of item sold&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;quantity&amp;gt;1&amp;lt;/quantity&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;unitPrice&amp;gt;32&amp;lt;/unitPrice&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;taxable&amp;gt;true&amp;lt;/taxable&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/lineItems&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customerProfileId&amp;gt;11111&amp;lt;/customerProfileId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customerPaymentProfileId&amp;gt;22222&amp;lt;/customerPaymentProfileId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customerShippingAddressId&amp;gt;33333&amp;lt;/customerShippingAddressId&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;order&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;invoiceNumber&amp;gt;INV000001&amp;lt;/invoiceNumber&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;description&amp;gt;description of transaction&amp;lt;/description&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/order&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/profileTransAuthOnly&amp;gt;&lt;BR /&gt;&amp;lt;/transaction&amp;gt;&lt;BR /&gt;&amp;lt;/createCustomerProfileTransactionRequest&amp;gt;'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Declare @Url as Varchar(8000)&lt;BR /&gt;select @Url = '&lt;A target="_blank" href="https://apitest.authorize.net/xml/v1/request.api'"&gt;https://apitest.authorize.net/xml/v1/request.api'&lt;/A&gt;&lt;BR /&gt;Declare @Object as Int;&lt;BR /&gt;Declare @ResponseText as Varchar(8000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--==&lt;BR /&gt;--Build XML&lt;/P&gt;&lt;P&gt;Declare @objXML int&lt;/P&gt;&lt;P&gt;Exec sp_OACreate 'MSXML2.DOMDocument' , @objXML OUT&lt;/P&gt;&lt;P&gt;Exec sp_OASetProperty @objXML, 'async', 'false'&lt;/P&gt;&lt;P&gt;Exec sp_OAMethod @objXML, 'loadXML', NULL, @strXML&lt;/P&gt;&lt;P&gt;--==&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exec sp_OACreate 'MSXML2.ServerXMLHTTP', @Object OUT--, 4&lt;BR /&gt;Exec sp_OAMethod @Object, 'open', NULL, 'POST', @Url, 'false'&lt;BR /&gt;Exec sp_OAMethod @Object, 'setRequestHeader', NULL, 'Content-Type' ,'text/xml'&lt;BR /&gt;Exec sp_OAMethod @Object, 'send', NULL, @objXML&lt;BR /&gt;Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select @ResponseText&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*&lt;BR /&gt;Error received:&lt;BR /&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&amp;lt;ErrorResponse xmlns:xsi="&lt;A target="_blank" href="http://www.w3.org/2001/XMLSchema-instance"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/A&gt;" xmlns:xsd="&lt;A target="_blank" href="http://www.w3.org/2001/XMLSchema"&gt;http://www.w3.org/2001/XMLSchema&lt;/A&gt;" xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;&amp;lt;messages&amp;gt;&amp;lt;resultCode&amp;gt;Error&amp;lt;/resultCode&amp;gt;&amp;lt;message&amp;gt;&amp;lt;code&amp;gt;E00003&amp;lt;/code&amp;gt;&amp;lt;text&amp;gt;Root element is missing.&amp;lt;/text&amp;gt;&amp;lt;/message&amp;gt;&amp;lt;/messages&amp;gt;&amp;lt;/ErrorResponse&amp;gt;&lt;BR /&gt;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2011 03:09:15 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17306#M9684</guid>
      <dc:creator>cimuser22</dc:creator>
      <dc:date>2011-09-26T03:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: CIM error: Root element is missing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17310#M9686</link>
      <description>&lt;P&gt;What the @objXML﻿ look like before you send it?&lt;/P&gt;&lt;P&gt;Also, did you look at the CIM - ASP Classic sample code? It look very similar except it send the @strXML﻿ directly without convert it to a MSXML2.DOMDocument first﻿ before sending it(util.asp).&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2011 11:38:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17310#M9686</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-09-26T11:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: CIM error: Root element is missing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17346#M9704</link>
      <description>&lt;P&gt;Yes, we looked the asp classic sample and&amp;nbsp;we tried sending the string directly but get the same error...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2011 03:41:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17346#M9704</guid>
      <dc:creator>cimuser22</dc:creator>
      <dc:date>2011-09-27T03:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: CIM error: Root element is missing</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17352#M9707</link>
      <description>&lt;P&gt;Try adding Content-Length﻿ RequestHeader and send@strXML﻿ directly without convert it to a DOMDocument﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;declare @strXMLLength nvarchar(8)﻿&lt;/P&gt;&lt;P&gt;set @strXMLLength = len(@strXML)﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EXEC sp_OAMethod @Object﻿, 'setRequestHeader', NULL, 'Content-Length', @strXMLLength ﻿&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2011 12:25:48 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/CIM-error-Root-element-is-missing/m-p/17352#M9707</guid>
      <dc:creator>RaynorC1emen7</dc:creator>
      <dc:date>2011-09-27T12:25:48Z</dc:date>
    </item>
  </channel>
</rss>

