Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

CallContext between different Web Services

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi!

I have several Web Services ... and most of them have CallContext (). The problem is that for C # each of these contexts are different.

Can anyone give me some tricky way to create one global CallContext () which will fitt to all Web Services ??

I tried to cast context on a specyfic CallContext () but it does not work.

Thank you in advance !!

*This post is locked for comments

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,458 Most Valuable Professional on at
    RE: CallContext between different Web Services

    Unfortunately you didn't describe your exact scenario, therefore I don't know if my solution is exactly what you're looking for, but it should give you some idea in either case.

    1. Create one project in Visual Studio and add a service reference to the first web service.
    2. Then create another project in the same solution and add a project reference to the first one.
    3. Add a service reference to the other service. You don't have to change any settings, because the default values are what you need, but it's worth mentioning that Reuse types in referenced assemblies (under Advanced options) is crucial.
    4. When you try to call the second service, you'll see that it uses the call context class defined in the first project.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans