Skip to main content

Custom service testing using Postman

In this post we will see how to test a custom service class through Postman.

I created a simple service class which returns "Hello world". Hence i don't need the contract class in this case.

I created a new Service 'TestSOAPService' which refers the class of the same name.
A service operation which refers the method 'HelloWorld' is created.



Then i created a new service group TestSOAPServiceGroup. This group has the service TestSOAPService. The AutoDeploy property is set to 'Yes'.

After the build, this Custom service is available through two service endpoint.

The OData endpoint is : https://[].dynamics.com/api/services/TestSOAPServiceGroup/TestSOAPService/HelloWorld
The SOAP endpoint is : https://[].dynamics.com/SOAP/services/TestSOAPServiceGroup/TestSOAPService/HelloWorld?wsdl

Here we will test the OData service endpoint using Postman.

Fill the Postman parameters as shown below.
The OAuth token generated from the previous request is saved in the global variable BearerToken.
We get our response "Hello world" in the response window.

Once the access token expires, we can regenerate it from our earlier request.

Comments