2011-02-10 3 views
1

IFD를 통해 노출 된 MS CRM에 액세스하려고하는데 인증 문제가 있습니다.루비 및 MS Dynamics CRM 인증

SOAP 끝점은 내가 액세스 할 수있는 NTLM 뒤에 있습니다. 문제는 다음과 같은 요청을 전달할 때 401 응답을받습니다.

<?xml version="1.0" encoding="utf-8"?> 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <soap:Body> 
     <Execute xmlns="http://schemas.microsoft.com/crm/2007/CrmDiscoveryService"> 
      <Request xsi:type="RetrieveCrmTicketRequest"> 
       <OrganizationName>#{CRM_CONFIG[:org_name]}</OrganizationName> 
       <UserId>#{CRM_CONFIG[:username]}</UserId> 
       <Password>#{CRM_CONFIG[:password]}</Password> 
      </Request> 
     </Execute> 
    </soap:Body> 
</soap:Envelope> 

서버에서 디버깅 할 수있는 방법이 있습니까? 더 의미있는 오류 메시지를 확인할 수있는 모든 로그?

<?xml version=\"1.0\" encoding=\"utf-8\"?> 
<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> 
    <soap:Header> 
    <CrmAuthenticationToken xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"> 
     <AuthenticationType xmlns=\"http://schemas.microsoft.com/crm/2007/CoreTypes\">2</AuthenticationType> 
     <OrganizationName xmlns=\"http://schemas.microsoft.com/crm/2007/CoreTypes\">#{CRM_CONFIG[:org_name]}</OrganizationName> 
     <CallerId xmlns=\"http://schemas.microsoft.com/crm/2007/CoreTypes\">#{TOUCH}</CallerId> 
    </CrmAuthenticationToken> 
    </soap:Header> 
    <soap:Body> 
    <RetrieveMultiple xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"> 
     <query xmlns:q1=\"http://schemas.microsoft.com/crm/2006/Query\" xsi:type=\"q1:QueryExpression\"> 
     <q1:EntityName>contact</q1:EntityName> 
     </query> 
    </RetrieveMultiple> 
    </soap:Body> 
</soap:Envelope> 

답변

2

좋아, 문제는 설치의 오해

<CrmAuthenticationToken xmlns=\"http://schemas.microsoft.com/crm/2007/WebServices\"> 
    <AuthenticationType xmlns=\"http://schemas.microsoft.com/crm/2007/CoreTypes\">0</AuthenticationType> 
    <OrganizationName xmlns=\"http://schemas.microsoft.com/crm/2007/CoreTypes\">#{CRM_CONFIG[:org_name]}</OrganizationName> 
</CrmAuthenticationToken> 

주 그 발신 번호 표시 요소가 필요하지 않습니다.

0

당신은 by hand 추적 서버 측에서 또는 tool으로 설정할 수 있습니다 :합니다 (CrmService.asmx 엔드 포인트에이 시간) 다음과 같은 요청을 시도 할 때

또한 401를 얻고있다. C : \ Program Files \ Microsoft Dynamics CRM \ Trace에서 추적 파일을 찾습니다. 추적 파일을 쉽게 보려면 CRM Trace Log Viewer을 사용하는 것이 좋습니다.

call Dynamics CRM web services from JavaScript에 대한 기사가 많이 있습니다. 나는 그것들이 유용 할 것이라고 상상할 수있다.

내 경험상 웹 요청 및 응답을 추적하려면 Fiddler, 웹 서비스 테스트 및 디버깅을 위해서는 SoapUI을 사용하십시오.

또한 Dynamics CRM 2011에는 SOAP 기반 이외의 REST 기반 서비스가 제공되므로 비회원 제품에서 CRM 웹 서비스 사용을 크게 단순화 할 것입니다. CrmAuthenticationToken이처럼 보였다해야한다는 것을 의미

NTLM을 사용하여 Active Directory 인증이 사용됩니다 :