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
 faultCode: {}HTTP
 faultString: (401)Unauthorized 

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

<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
 <Execute xmlns="">
  <Request xsi:type="ns1:RetrieveOrganizationsRequest" xmlns:ns1="">
  <UserId xsi:type="xsd:string">Domain\userUserId>
  <Password xsi:type="xsd:string">passwdPassword>

-------------------------------------------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