Wednesday, June 1, 2011

Unable to connect some MS CRM instance from SOAP UI tool.


The following soap request is executing well with almost all CRM4 AD instance. 

We have one customer with MSCRM 4 AD, but the following request is failed with error 401 Unauthorized access..
We have tried the following request from another language Obj C, its executed successfully and got the response

Why we are unable to connect some CRM instances from Soap UI or by java code ?

//we can provide the CRM 4 instance url privately to test to find whats the difference with others
from Java, we are using Axis to convert the java classes and to execute.
this is the error from java code
- ntlm authentication scheme selected
- Failure authenticating with NTLM @hostname:port
- Error in ezimg service.  AxisFault caught.  MessageId: null
AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode: 
 faultString: (401)Unauthorized 

Other MS CRM are connecting well after showing the  'ntlm authentication scheme selected'


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
 <Execute xmlns="http://schemas.microsoft.com/crm/2007/CrmDiscoveryService">
  <Request xsi:type="ns1:RetrieveOrganizationsRequest" xmlns:ns1="http://schemas.microsoft.com/crm/2007/CrmDiscoveryService">
  <UserId xsi:type="xsd:string">Domain\userUserId>
  <Password xsi:type="xsd:string">passwdPassword>
  Request>
 Execute>
 soapenv:Body>
soapenv:Envelope>

-------------------------------------------Added on 2011-11-01---------

The above issue is soap ui is not supporting the ntlm2 authentication.
Also the httpClient-3.1 jar is not supporting the ntlm v2 authentication

We can implement our java code by using the jcifs.jar which is handling the ntlm2 authentication.

So we can call the ntlm class of jcifs from the httpClient-3.1.jar

This process is well written in this site






No comments:

Post a Comment