Object types is case sensitive in TenantWebServiceCollection

Last week while I was working on an integration project, I wanted to call a Business Central function from Azure Logic Apps. I had few options with APIs but I went ahead with creating a CodeUnit with a function and expose it as a web service.
 
Rather than exposing the CodeUnit by manually inserting an entry in the Web Service table, I used the new TenantWebServiceCollection option. I created below XML under my extension repo and published the extension with the expectation to see a ManageBCWSCall web service on the published web service page.
 <?xml version="1.0" encoding="utf-8"?>  
 <ExportedData>  
   <TenantWebServiceCollection>  
     <TenantWebService>  
       <ObjectType>Codeunit</ObjectType>  
       <ObjectID>50000</ObjectID>  
       <ServiceName>ManageBCWSCall</ServiceName>  
       <Published>true</Published>  
     </TenantWebService>  
   </TenantWebServiceCollection>  
 </ExportedData>  
Things didn’t go well with me on that day and adding more to that I could not find my published Web Service. 

After a few minutes, my colleague (Can Ates) suggests that object type might be case sensitive. To try out his theory we change the object type to “CodeUnit” and published the extension. This time it worked. 

 <?xml version="1.0" encoding="utf-8"?>  
 <ExportedData>  
   <TenantWebServiceCollection>  
     <TenantWebService>  
       <ObjectType>CodeUnit</ObjectType>  
       <ObjectID>50000</ObjectID>  
       <ServiceName>ManageBCAPICall</ServiceName>  
       <Published>true</Published>  
     </TenantWebService>  
   </TenantWebServiceCollection>  
 </ExportedData>  
Thank you Can Ates. 

Keep in mind that object type in the TenantWebServiceCollection is case sensitive. 

Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?