Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to call procedure of Codeunit published as web service?

(0) ShareShare
ReportReport
Posted on by 65

Hello. I created Codeunit with public procedure and published this Codeunit as a WebService(SOAP).

Unfortunatelly - I cant Access this procedure via URL.

Main URL to this CU (like Cronus/Codeunit/WSCodeunit) works correctly.

When I try to Access to created procedure (Cronus/Codeunit/WSCodeunit/WSProcedure) I get error:

Service Codeunit/WSCodeunit/WSProcedure was not found!

This procedure appears as a element in XML response of the main URL of this Codeunit.

What is problem? I need to do something more to Access to CU procedures?

(Same problem when i try to Access to procedure Approve od standard web service CU: 1544

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 74,115 Super User 2024 Season 2 on at
  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 on at
    RE: How to call procedure of Codeunit published as web service?

    hi

    look this

    community.dynamics.com/.../calling-codeunit-web-service-soap-using-rest-api

    DAniele

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: How to call procedure of Codeunit published as web service?

    Hi,

    Did you try like below?

    URL - api.businesscentral.dynamics.com/.../WSServiceName

    Content-Type - application/xml

    SoapAction - urn:microsoft-dynamics-schemas/codeunit/WSServiceName:FunctionName

    Authorization - Key

    Body -

    <Envelope xmlns="schemas.xmlsoap.org/.../">

       <Body>

           <FunctionaName xmlns="urn:microsoft-dynamics-schemas/codeunit/WSServiceName">

               <Parameter1>Value</document>

               <Parameter2>Value</document>

           </FunctionaName>

       </Body>

    </Envelope>

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans