Hi, I have searched and searched for answers to this and have come up with nothing. We are trying to talk to MS-CRM 4's web services via Java and have hit on several brick walls. The closest match we have found on the Net is this blog post:
http://rabout.com/?q=ms_dynamics_crm_3_api_axis2 But that is written against MS-CRM version 3 and does not work. We have tried to adapt it to MS CRM 4, but we keep getting: "org.apache.axis2.AxisFault: Transport error: 401 Error: Unauthorized" Here is the code that generates that error: public static void main(java.lang.String[] args) { try { String endpointURL = "http://crmdev01:5555/mscrmservices/2007/crmservice.asmx"; String ntlmUserName = "********"; String ntlmPassword = "********"; String host = "10.203.60.59"; String domain = "*********"; com.microsoft.schemas.crm._2007.webservices.CrmServiceStub stub = new com.microsoft.schemas.crm._2007.webservices.CrmServiceStub(endpointURL); Options options = stub._getServiceClient().getOptions(); HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); List<String> authSchemes = new ArrayList<String>(); authSchemes.add(HttpTransportProperties.Authenticator.NTLM); auth.setAuthSchemes(authSchemes); auth.setUsername(ntlmUserName); auth.setPassword(ntlmPassword); auth.setHost(host); auth.setDomain(domain);//<--- this is Active Directory domain right???? auth.setPort(5555); auth.setPreemptiveAuthentication(false); options.setProperty(HTTPConstants.AUTHENTICATE, auth); options.setUserName(ntlmUserName); options.setPassword(ntlmPassword); com.microsoft.schemas.crm._2007.webservices.RetrieveDocument retrieve78 = null; stub.Retrieve(retrieve78,null,null,null); } catch (Exception e) { System.out.println ("Err - " + e ); } finally { } } -- View this message in context: http://www.nabble.com/Need-help-ponnecting-to-MS-CRM-4.0-via-Java-and-Axis2-%281.4%29-tp22119370p22119370.html Sent from the Axis - User mailing list archive at Nabble.com.
