web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

(0) ShareShare
ReportReport
Posted on by 442

Hi All,

   I'm trying to create and publish webservice using Xml definition. After publishing the AL code , new web service not created, any one have idea why it is not created, do I need to change any setup or wrong in my code?

I'm using  D365BC wave 2, on premises. 

<?xml version="1.0" encoding="UTF-8"?>
<ExportedData>
    <TenantWebServiceCollection>
        <TenantWebService>
            <ObjectType>Page</ObjectType>
            <ServiceName>CustomersWS</ServiceName>
            <ObjectID>21</ObjectID>
            <Published>True</Published>
        </TenantWebService>
    </TenantWebServiceCollection>
</ExportedData>

I have the same question (0)
  • Mohamad Vajid Profile Picture
    Microsoft Employee on at

    Hi,

    Do you get an error on publishing? Have you specified the correct server/instance in your launch.json file?

    Are you able to publish a page extension successfully?

  • Marshal Profile Picture
    442 on at

    Hi Thanks for your Response,

    I did not get any error when publishing ,  report, table, page extensions are working fine. launch file parameters also fine.

    Do I need to add any addition parameter in launch file to create webservice using xml definition ? below is my launch file setup

    pastedimage1575871767096v1.png

    Thanks 

    Marshal

  • Verified answer
    Renato Fajdiga Profile Picture
    1,855 on at

    Hi,

    have you tried to type "true" in published tag instead of "True"? Also, did you copy/paste this code to WebService.xml file or used snippet (twebservices)?

    I  am using this configuration and it works for me

    <?xml version="1.0" encoding="UTF-8"?>

    <ExportedData>

       <TenantWebServiceCollection>

           <TenantWebService>

               <ObjectType>Page</ObjectType>

               <ServiceName>serviceName</ServiceName>

               <ObjectID>objectId</ObjectID>

               <Published>true</Published>

           </TenantWebService>

       </TenantWebServiceCollection>

    </ExportedData>

    Best regards,

    Renato

  • Marshal Profile Picture
    442 on at

    Thank you Renato,

    It is working now after changing to <Published>true</Published>  From  <Published>True</Published>.

  • Mohamad Vajid Profile Picture
    Microsoft Employee on at

    I just tested as well with true instead of True and that is indeed the solution.

  • Suggested answer
    Olister Rumao Profile Picture
    4,009 on at

    Hi Marshal,

    I have tried this approach and it worked perfectly fine for me

    www.cloudfronts.com/.../

    I have not tried using webservices.xml but I think using twebservice snippet in VS Code should resolve the issue as you are probably missing something!

  • Marshal Profile Picture
    442 on at

    I used snippet twebservices, default value for <Published> is false, when I modified this parameter I mistakenly used True instead of true;

  • Suggested answer
    Renato Fajdiga Profile Picture
    1,855 on at

    Small change for you, but big for BC.

    Glad that this resolved your issue :)

    Br,

    Renato

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,028 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,366 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 1,175 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans