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