Getting error in Visual Studio generating WCF References

I am using VS2022/C#, to create a Service Reference to point to our newly relocated and upgraded version of Content Server. There url is https://<baseurl>/cws/ContentService.svc?wsdl

This now gives me the following error when trying to add new Connected Service:

An error occurred while attempting to find services at 'https://<baseurl>/cws/ContentService.svc?wsdl'. Duplicate attribute found. Both 'xmime:expectedContentTypes' and 'xmime:expectedContentTypes' are from the namespace 'http://www.w3.org/2005/05/xmlmime'. Line 1, position 490.

And details: Metadata contains a reference that cannot be resolved: 'https://<baseurl>/cws/ContentService.svc?xsd=xsd0'.

Any ideas, how to get around this and still generate Reference.cs file and supporting json?

Best Answer

  • GinoDivx
    GinoDivx Member
    edited July 26 #2 Answer ✓

    And this was the problem! I have worked with our OT team, looked at Web.Config in cws application in IIS, and sure enough, both endpoints were active. After we commented out non-SSL endpoints, WCF generated just fine. Thanks again.

    P.S. I have another question, but will post in a new thread :-)

Answers

  • Check the web.config for the Content Web Services on server side and that each service only has one endpoint active. Do this for each service endpoint.

    For example, below is default. Each service can only have one endpoint - so if you need SSL, be sure to disable the HTTP endpoint - i.e. only one of the bolded bits can be active at any point.

    <service behaviorConfiguration="DocumentManagementBehavior" name="OpenText.Livelink.Service.DocMan.DocumentManagement_WCF">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="DocumentManagementBinding" bindingNamespace="urn:DocMan.service.livelink.opentext.com" contract="OpenText.Livelink.Service.DocMan.IDocumentManagement_WCF" />
    <!-- SSL disabled
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="DocumentManagementBinding_SSL"
    bindingNamespace="urn:DocMan.service.livelink.opentext.com"
    contract="OpenText.Livelink.Service.DocMan.IDocumentManagement_WCF" />

    -->
    </service>

  • Thank you, I will work with our support team and report back, thanks again. And new ideas are also welcomed :-)

  • GinoDivx
    GinoDivx Member
    edited July 26 #5 Answer ✓

    And this was the problem! I have worked with our OT team, looked at Web.Config in cws application in IIS, and sure enough, both endpoints were active. After we commented out non-SSL endpoints, WCF generated just fine. Thanks again.

    P.S. I have another question, but will post in a new thread :-)