Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Error consuming Web Service CRM Online

Posted on by Microsoft Employee

Hi,

I'm consuming a SOAP Web service on CRM Online plugin, anytime I make the call I get an error on the Message Encoding.

How do I go about solving this? I attached an image of error and my code snippet below.

Any help would be appreciated.

ErrorBinding.PNG.

HttpBinding.PNG

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error consuming Web Service CRM Online

    I have a few questions:

    1. What is the process of using a friendly name in the service?

    2. How do I get the service verified?

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error consuming Web Service CRM Online

    Since you are using the CRM online version and the plugin is in isolation mode.

    The External service access is limited: You cannot not access via IP, you have to use friendly name, and your service have to be verified, in this case, you have to host your service in Azure server for testing.

    Please check below link for more information:

    community.dynamics.com/.../196179

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error consuming Web Service CRM Online

    Scott,

    Here is the snippet for the rest of the code:

    //Http Binding and its properties...

               var myBinding = new BasicHttpBinding();

               myBinding.Name = "BasicHttpBinding_Service";

               myBinding.BypassProxyOnLocal = false;

               myBinding.TextEncoding = UTF8Encoding.UTF8;

               myBinding.MessageEncoding = WSMessageEncoding.Mtom;

               myBinding.Security.Mode = BasicHttpSecurityMode.Transport;

                    

               var endpoint = new EndpointAddress(@"EndPointAddress");

               var request = new SomeMethod(myBinding, endpoint);

  • ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: Error consuming Web Service CRM Online

    It looks like you are not setting the basic binding on your WCF call because the error is referencing a different binding - can you post the rest of you code?

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans