The B1WebAPI web service can return the results of a query from SAP Business One in three data formats: Default QueryData XML View; Default QueryData JSON View; Microsoft.NET DataSet View.

Default QueryData XML View

The Query data element is as follows:

<querydata xmlns:b1Link="http://www.zeditsolutions.com/v1.0/b1Link"
        queryName="/query/[queryname].aspx?cardcode=[value]">
    <columns></columns>
    <data>
        <row id="1"></row>
    </data>
</querydata>

There are four major sections:

  • QueryData - This XML element is the main element that contains the other query-specific XML. It contains identifying information about the query used to execute the request.

  • Columns - This XML element contains a Column element for each Query Column specified in SAP Business One. It contains Meta Data information about the column including: name; alias; type; and a flag stating if it’s an internal key or not.

  • Data - This XML element contains a row element for each query row that is returned from the SAP Business One query.

  • Row - This XML element is created for each query row that is returned from the SAP Business One query and contains an XML element for each of the columns specified.

Default QueryData JSON View

Specifications are in progress. At a high level, JSON formatted query data contains the same data as in XML format.

Microsoft.NET DataSet View

The .NET DataSet XML representation of B1WebAPI web service XML is generally used for consumption by third party .NET controls such as the DevExpress Grid or Pivot controls. As this XML is generated by the ADO.NET DataSet, the details are outside the scope of this document.

For the full details on the XML representation of an XML dataset, visit Microsoft’s official documentation: http://msdn.microsoft.com/en-us/library/zx8h06sz(v=VS.100).aspx