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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Custom service error - ContractFilter mismatch at the EndpointDispatcher.

(0) ShareShare
ReportReport
Posted on by

Hi ,

I have downloaded Services Sample from Github at https://github.com/microsoft/Dynamics-AX-Integration/tree/master/ServiceSamples. I want to use D365FO custom soap service from Visual Studio.

I made SoapConsoleApplication  as startup project in the solution in Visual Studio and run it with User session info. I provided all the values required for App client id , username, password and tenant. This is my UAT environment (D365FO).

It worked fine.

However, I have my custom service developed and i am facing below error on line

response = ((MyCustomService)channel).myCustomServiceMethod(new  myCustomServiceMethod(context, myItemId));

myCustomServiceMethod has ItemId parameter hence i am passing it here. Not sure if it's a right way.

Below is the error i am facing. Please help me find the root cause. Not sure why one service works fine and other isn't.

System.ServiceModel.ActionNotSupportedException
HResult=0x80131501
Message=The message with Action 'tempuri.org/.../MyCustomActionMethod' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
Source=mscorlib
StackTrace:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at SoapUtility.MyCustomServiceReference.MyCustomService.MyCustomActionMethod(MycustomActionMethod request)
at SoapConsoleApplication.Program.myCustomActionMethod() in C:\Dynamics-AX-Integration-master\ServiceSamples\SoapConsoleApplication\Program.cs:line 46
at SoapConsoleApplication.Program.Main(String[] args) in C:\Dynamics-AX-Integration-master\ServiceSamples\SoapConsoleApplication\Program.cs:line 17

I have the same question (0)
  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Vikky,

    Looks like a service reference url doesn't match to service client.

    There is a constant "UserSessionServiceName" ServiceSamples\SoapConsoleApplication\Programm.cs. Have you changed it to match your service group?

  • VRD Profile Picture
    on at

    Hi Sergei,

    Thank you very much for your help on this. I really missed that variable change.

    ~ Vikky

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 456 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans