SystemService (Dynamics NAV Webservices)

In Microsoft Dynamics NAV the company name is part of the URL when you access published webservices. The ‘SystemService’ webservice allows you to retrieve the names of available companies. Even when you publish no webservices in Microsoft Dynamics NAV 2017 there is still this ‘builtin’ webservice that you can access. So let’s try it out! I took a look at the WSDL (Web Services Description Language). After looking at the WSDL I constructed a SOAP request like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sys="urn:microsoft-dynamics-schemas/nav/system/">
 <soapenv:Header/>
 <soapenv:Body>
 <sys:Companies/>
 </soapenv:Body>
</soapenv:Envelope>

I did sent this SOAP request to the NAV Service which is configured to allow SOAP Services. As a response I got a list of all the NAV companies:

<Soap:Envelope xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/">
 <Soap:Body>
 <Companies_Result xmlns="urn:microsoft-dynamics-schemas/nav/system/">
 <return_value>Company A</return_value>
 <return_value>Company B</return_value>
 <return_value>Company C</return_value>
 </Companies_Result>
 </Soap:Body>
</Soap:Envelope>

You could use these company names in your webservice URL to work with specific company data.

Advertisements

Author: Ibrahiem Rasoelbaks

I'm a Technical Consultant working at 4PS.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s