我在CRM Dynamics中通过REST进行身份验证时遇到问题。只有在我尝试连接时才会出现此问题 来自使用CentOS的机器(在Ubuntu和Windows中工作)。
2012-10-31 14:55:00,940 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_NTLM challenge scheme.
2012-10-31 14:55:01,005 ERROR [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Can't get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ (response's status: Unauthorized (401) - Unauthorized)
2012-10-31 14:55:01,007 INFO [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ at http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/$metadata
2012-10-31 14:55:01,010 INFO [org.restlet.ext.net.HttpClientHelper] (schedulerFactoryBean_Worker-1) Starting the HTTP client
2012-10-31 14:55:01,156 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_Negotiate challenge scheme.
2012-10-31 14:55:01,158 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_NTLM challenge scheme.
2012-10-31 14:55:01,161 ERROR [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Can't get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ (response's status: Unauthorized (401) - Unauthorized)
2012-10-31 14:55:01,163 INFO [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ at http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/$metadata
2012-10-31 14:55:01,167 INFO [org.restlet.ext.net.HttpClientHelper] (schedulerFactoryBean_Worker-1) Starting the HTTP client
2012-10-31 14:55:01,317 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_Negotiate challenge scheme.
2012-10-31 14:55:01,319 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_NTLM challenge scheme.
2012-10-31 14:55:01,322 ERROR [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Can't get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ (response's status: Unauthorized (401) - Unauthorized)
2012-10-31 14:55:01,325 INFO [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ at http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/$metadata
2012-10-31 14:55:01,328 INFO [org.restlet.ext.net.HttpClientHelper] (schedulerFactoryBean_Worker-1) Starting the HTTP client
2012-10-31 14:55:01,512 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_Negotiate challenge scheme.
2012-10-31 14:55:01,514 WARNING [org.restlet.engine.security.AuthenticatorUtils] (schedulerFactoryBean_Worker-1) Couldn't find any helper support the HTTP_NTLM challenge scheme.
2012-10-31 14:55:01,517 ERROR [com.zenvia.wrapper.ServiceWrapper] (schedulerFactoryBean_Worker-1) Can't get the metadata for http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/ (response's status: Unauthorized (401) - Unauthorized)
2012-10-31 14:55:01,519 WARNING [org.restlet.ext.odata.Query] (schedulerFactoryBean_Worker-1) Can't parse the content of http://<HOST>:5555/zenvia/xrmservices/2011/OrganizationData.svc/zenvia_operacaoSet?$filter=statuscode/Value eq 1 and zenvia_tipoOperacao/Value eq 300000005: java.lang.Exception: Can't execute the query without the service's metadata.
有人知道这些警告(“无法找到任何助手支持HTTP_Negotiate质询计划。” 和“无法找到任何帮助支持HTTP_NTLM挑战方案。”)?
Client: CentOS 5.6
Client: Windows 7 SP1
Server AD: Windows Server 2008 R2
CRM Dynamics 2011
Restlet 2.1
JBoss 7.1.1
Java SE 6
Tiago Martins
答案 0 :(得分:0)
您应该使用网络连接器并致电:
// Create your own authenticator
Authenticator a = new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return (new PasswordAuthentication("<your account>", "<your password>".toCharArray()));
}
};
// Sets the default Authenticator
Authenticator.setDefault(a);
此处提供说明: http://wiki.restlet.org/docs_2.0/13-restlet/27-restlet/46-restlet/112-restlet/364-restlet.html