locked
Authentication Using Java CRM CRUD Example - CRM 2011 RRS feed

  • Question

  • I am trying to run the Java example in the Walkthrough for CRM 2011, and the request is failing when attempting to retrieve the Online Authentication Policy (using the class OnlineAuthenticationPolicy). I added debug to see what exactly was happening, and when we attempt to retrieve the Policy Node (from the Discovery Service WSDL), we get back the following XML (after searching for the wsp.All node:

    <ms-xrm:AuthenticationPolicy xmlns:ms-xrm="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
       <ms-xrm:Authentication>ActiveDirectory</ms-xrm:Authentication>
    </ms-xrm:AuthenticationPolicy>
    <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
       <wsp:Policy>
          <sp:ProtectionToken>
             <wsp:Policy>
                <sp:SpnegoContextToken
                 sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
                   <wsp:Policy>
                      <sp:RequireDerivedKeys/>
                   </wsp:Policy>
                </sp:SpnegoContextToken>
             </wsp:Policy>
          </sp:ProtectionToken>
          <sp:AlgorithmSuite>
             <wsp:Policy>
                <sp:Basic256/>
             </wsp:Policy>
          </sp:AlgorithmSuite>
          <sp:Layout>
             <wsp:Policy>
                <sp:Strict/>
             </wsp:Policy>
          </sp:Layout>
          <sp:IncludeTimestamp/>
          <sp:EncryptSignature/>
          <sp:OnlySignEntireHeadersAndBody/>
       </wsp:Policy>
    </sp:SymmetricBinding>
    <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
       <wsp:Policy/>
    </sp:Wss11>
    <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
       <wsp:Policy>
          <sp:MustSupportIssuedTokens/>
          <sp:RequireClientEntropy/>
          <sp:RequireServerEntropy/>
       </wsp:Policy>
    </sp:Trust10>
    <wsaw:UsingAddressing/>]
    
    

    The code then attempts to search for the "appliesTo", "policy", and "issuerUri" nodes in this XML, but cannot find them since the nodes the code is looking for do not exist. We are using an "On Premises" server (the CRM version is running on our server), but when I attempt to point to the server in the sample code (https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc), that service does have the correct nodes (but then authentication fails since we are not defined on that server). Is this due to how we have our authentication structure configured in our server?

    Any help would be greatly appreciated.

    Tuesday, December 17, 2013 10:39 PM