web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 440

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
    on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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
    440 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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,853 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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
    440 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    Thank you Renato,

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

  • Mohamad Vajid Profile Picture
    on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

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

  • Suggested answer
    Olister Rumao Profile Picture
    3,967 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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
    440 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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,853 on at
    RE: D365BC Wave 2- Unable to Create & Publish Webservice using Xml Definition

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,202

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,248

#3
Sumit Singh Profile Picture

Sumit Singh 2,893

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans