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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error to call soap service in Plugin

(0) ShareShare
ReportReport
Posted on by 256

8321.plugin.png

Hi All,

I am calling soap service using plugin in Dynamics 365. 

I am using above code for calling service but i am getting "The provided URI scheme 'https' is invalid; expected 'http'.".


Please provide any proper solution. 

Thanks. 

*This post is locked for comments

  • Bhuvaneswary Rajasekaran Profile Picture
    405 on at

    Hi Ankit,

    From whatever i can see, you are trying to call a secured service i.e. https enabled, ensure security mode should be transport or transport with message credentials instead of None.

    e.g.

    binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential;

  • AnkitSinghal Profile Picture
    256 on at

    Hi Bhuvaneswary,

    Thanks for response.

    I have tried that also but i faced same issue.

  • Bhuvaneswary Rajasekaran Profile Picture
    405 on at

    i am trying to do something similar and i am able to access the service.

    3201.Error_5F00_1.png

    Thanks

    Bhuvi

  • AnkitSinghal Profile Picture
    256 on at

    I don't have any user name or password for service. I used code like you but its gives error for partial security .

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi Ankit,

     please have a look at what Bhuvaneswary suggested - that would be part of the problem.

      It would make sense to try the same code outside of the plugin (create a simple console app and see if that works)

     And, then, if it works outside of the plugin, then you have a problem with sandbox security (are you using a dns name for your web server?)

    msdn.microsoft.com/.../gg334752.aspx

    - Access to localhost (loopback) is not permitted.

    - IP addresses cannot be used. You must use a named web address that requires DNS name resolution.

  • AnkitSinghal Profile Picture
    256 on at

    Hi Alex,

    It is working in Console app. but its not working in plugin.

    Yes, I am using DNS name for web service.

  • ashlega Profile Picture
    34,477 on at

    So what error are you getting? Could you post the DNS name? ("ReturnRecords" is not a dns name)

    Also, if you are doing this in the online environment, keep in mind that your web service has to be accessible from the CRM server (which, in case with the Dynamics online, is a server in the Microsoft data center)

  • AnkitSinghal Profile Picture
    256 on at

    i am facing "The provided URI scheme 'https' is invalid; expected 'http'" error.

  • AnkitSinghal Profile Picture
    256 on at

    Hi,

    yes i am working in Dynamics 365 online. And its a third party (Doc Halo) web service.

  • ashlega Profile Picture
    34,477 on at

    >i am facing "The provided URI scheme 'https' is invalid; expected 'http'" error.

    Are you facing that error before or after (or in both cases) you have added this code:

    binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans