title: Communication with NAVision with SOAP API from SQL
body: <p>I have a problem with GET method from API. So, I had some code for body for GET method, and when I copy this code to postman works fine.</p>
  <pre><code>    set @requestBody = '&lt;s:Envelope xmlns:s=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
                          &lt;s:Body&gt;
                          &lt;ReadMultiple xmlns=&quot;urn:microsoft-dynamics-schemas/page/rfidtransferlines&quot;&gt;
                                  &lt;filter&gt;
                                      &lt;Field&gt;Document_No&lt;/Field&gt;
                                      &lt;Criteria&gt;PN21-001126&lt;/Criteria&gt;
                                  &lt;/filter&gt;   
                          &lt;/ReadMultiple&gt;
                          &lt;/s:Body&gt;
                          &lt;/s:Envelope&gt;'
  
      print @requestBody
  </code></pre>
  <p>Now, I want to get data from API, and I have code for GET method:</p>
  <pre><code>-- Open the connection.
  EXEC sp_OACreate 'MSXML2.ServerXMLHTTP', @token OUT;    --MSXML2.ServerXMLHTTP
  IF @ret &lt;&gt; 0 RAISERROR('Unable to open HTTP connection.', 10, 1);
  
  -- Send the request.
  EXEC sp_OAMethod @token, 'open', NULL, 'GET', @url, 'false',@username,@password;
  EXEC sp_OAMethod @token, 'setRequestHeader', NULL, 'Connection', 'keep-alive'; 
  EXEC sp_OAMethod @token, 'setRequestHeader', NULL, 'SOAPAction', 'ReadMultiple'; 
  EXEC sp_OAMethod @token, 'setRequestHeader', NULL, 'Content-type', @contentType;
  EXEC sp_OAMethod @token, 'send',NULL,@requestBody;
  
  -- Handle the response.
  EXEC sp_OAGetProperty @token, 'status', @statusCode OUT;
  EXEC sp_OAGetProperty @token, 'statusText', @statusText OUT;
  EXEC sp_OAGetProperty @token, 'responseText', @responseText OUT;
  
  -- Show the response.
  PRINT 'Status: ' + @statusCode + ' (' + @statusText + ')';
  PRINT 'Response text: ' + @responseText;
  </code></pre>
  <p>I think that problem is here :</p>
  <pre><code>EXEC sp_OAMethod @token, 'send',NULL,@requestBody;
  </code></pre>
  <p>or maybe my variable:</p>
  <pre><code> DECLARE @responseText NVARCHAR(4000); 
  </code></pre>
  <p>is set to 4000 characters, because is max for SQL Server.</p>
  <p>Can somebody help me.</p>