Integrations and APIs for Service

Get Involved. Join the Conversation.

Topic

    Billy Clark
    WSDL Woes ~ Strange error that stops development before we...
    Topic posted June 6, 2014 by Billy Clark 
    2705 Views, 8 Comments
    Title:
    WSDL Woes ~ Strange error that stops development before we can begin
    Content:

    Hello all,

     

      I have a problem when connecting to the WSDL address.  I'm using Visual Studio currently, but even SVCUTIL is giving me errors.  I'd really like to start a project where we can integrate with our Knowledgebase, and possibly leverage some of hte capabilities of RightNow.

    When I add the Service Reference in VS, I get this error:

    Warning 1 Custom tool warning: Cannot import wsdl:binding
    Detail: An exception was thrown in a call to a policy import extension.
    Extension: System.ServiceModel.Channels.SecurityBindingElementImporter
    Error: An unsupported security policy assertion was detected during the security policy import: <sp:SignedSupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
              <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
                <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                  <sp:RequestSecurityTokenTemplate>
                    <t:TokenType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
                    <t:KeyType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
                    <t:CanonicalizationAlgorithm xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">ht...
    XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding'] C:\Users\Billy\AppData\Local\Temporary Projects\RNC\Service References\ServiceReference1\Reference.svcmap 1 1 RNC
     
    Is there something wrong with our implementation?

    There is a second warning:

    Warning 2 Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:service[@name='RightNowSyncService']/wsdl:port[@name='RightNowFedAuthSyncPort'] C:\Users\Billy\AppData\Local\Temporary Projects\RNC\Service References\ServiceReference1\Reference.svcmap 1 1 RNC
     
    Any help would be appreciated.

    Comment

     

    • Mark Ericson

      Billy,

      Our WSDLs are tested against VisualStudio, so should work. 

      Are you intending to use SAML-based authentication?  There are two bindings in our WSDL, one called 'RightNowSyncBinding' the other called 'RightNowFedAuthSyncBinding',  if you are using username/password authentication you want to use the former binding.

      It has been awhile since I've used VisualStudio, but I think there is a way to specify the binding you want to use.

      Hopefully someone with more VisualStudio experience can also help out here.

      -Mark

    • Richard Morgan

      Adding a Service Reference in Visual Studio should just work.  I have done it dozens of times (just so you know it is working for at least one other person out there).  Creating the reference should not even ask you for a username/password.

      Using SvcUtil can be a bit trickier and you might be specifying the wrong serializer.

      Which version of Visual Studio?  Which .NET version?

      What URL are you using from Add Service Reference?  It should look something like: 

      https://whatever.custhelp.com/cgi-bin/whatever.cfg/services/soap?wsdl

      Finally, in desperation, you may have a conflict with an existing named class.  I don't see that error in what you posted, but read through this blog post and see if helps: http://www.lukepuplett.com/2010/07/note-to-self-don-let-wcf-svcutil-reuse.html

      A total wild guess as well is to make sure you (the user generating the proxy) have rights to create folders/files and access to things like the Temp directory.  See this post for more details: http://blogs.infosupport.com/unable-to-generate-a-wcf-proxy-using-svcutil-but-retreiving-the-wsdl-works/

    • Kurt Helfrich

      I'm getting the same error.  

      I have a little more information.

      I am running August 2012, preparing to upgrade to May 2014 (or August, depending on my timing and Oracle's).

      August 2012 works fine with my project.  When I change the URL to point to a May 2014 site I'm trying to test against, I get the error.

      Otherwise, it's the same C# project and very same instance of VS2013.

    • Richard Morgan

      After some experimentation, I could reproduce the error.

      You must target .NET 4.0 or greater.  Even the 4.0 Client Profile will work.

      When my brand new, clean project was targeting 3.5, the above warnings were shown on compile:

      Warning    1    Custom tool warning: Cannot import wsdl:binding
      Detail: An exception was thrown in a call to a policy import extension.
      Extension: System.ServiceModel.Channels.SecurityBindingElementImporter
      Error: An unsupported security policy assertion was detected during the security policy import: <sp:SignedSupportingTokens xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
                <wsp:Policy xmlns:wsp="http://www.w3.org/ns/ws-policy">
                  <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
                    <sp:RequestSecurityTokenTemplate>
                      <t:TokenType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
                      <t:KeyType xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
                      <t:CanonicalizationAlgorithm xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512">ht...
      XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding']    F:\Projects\ConsoleApplication2\ConsoleApplication2\Service References\ServiceReference1\Reference.svcmap    1    1    ConsoleApplication2

      And

      Warning    2    Custom tool warning: Cannot import wsdl:port
      Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
      XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:binding[@name='RightNowFedAuthSyncBinding']
      XPath to Error Source: //wsdl:definitions[@targetNamespace='urn:wsdl.ws.rightnow.com/v1_2']/wsdl:service[@name='RightNowSyncService']/wsdl:port[@name='RightNowFedAuthSyncPort']    F:\Projects\ConsoleApplication2\ConsoleApplication2\Service References\ServiceReference1\Reference.svcmap    1    1    ConsoleApplication2

       

    • Kurt Helfrich

      Hmm.  Mine was already targeted at .NET 4.5.  However, despite the warnings, it seems to be working.  I'm going to run it for a bit, then try to change back to the other databases again.  I'll report my findings later.

      I did find references to installing Web Service Extensions 3.0 (WSE 3.0), the precursor to Windows Communication Foundation, as a solution when I searched on "http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702", but I didn't try that.

    • Charlie Mopps

      Stumbled across this because I had the same error.

      To fix it you have to change your app.config

      Change the bindings section to something like this:

            <bindings>
              <customBinding>
                <binding name="RightNowSyncBinding"
                         sendTimeout="00:10:00"
                         receiveTimeout="00:10:00"
                         openTimeout="00:10:00"
                         closeTimeout="00:10:00"
                               >
                  <!-- The above timeouts determine how long the client will wait for a repsonse -->

                  <security defaultAlgorithmSuite="Default" authenticationMode="UserNameOverTransport"
                        requireDerivedKeys="true" securityHeaderLayout="Lax" includeTimestamp="false">
                    <localClientSettings detectReplays="false" />
                    <localServiceSettings detectReplays="false" />
                  </security>

                  <textMessageEncoding messageVersion="Soap11"  />
                  <httpsTransport maxReceivedMessageSize="524288000"/>
                  <!-- the maxReveivedMessageSize MUST be made larger for the querry to work -->
                </binding>
              </customBinding>
            </bindings>

    • Padma Prabha Varadarajan

      Hi 

       

      I am facing issue now in Visual Studio 2017. 

      When I created a new .net addin it is giving me this warning and n no.of error when i build the solution.

      Please let me know how to resolve this error. 

       

      Thanks

      Padma

    • Charlie Mopps

      I'm sorry, your error sounds unrelated to this topic. This post is over 4 years old. You're more likely to get help if you start a new thread, post your source code and the error your getting. What you have here is just too vague to really comment on.