What's the "cause" of the exception? You are using an https url, but no
https configuration of certificates and such. That may not be an issue if
the target service has a signed cert that the JDK can validate, but I do
want to mention it.
Next thing to try:
Can you call:
Authenticator.setDefault(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
System.out.println("Getting password");
return super.getPasswordAuthentication();
}
});
prior to calling any CXF code and then see if that method gets called? In
theory, it SHOULD be calling back there to get the authentication stuff it
needs. I'd like to make sure it's at least getting there.
Actually, after doing that, you could do something like:
URL url = new URL("https:.....?wsdl");
url.openConnection().getInputStream();
and see if that works and calls the above method or not.
Dan
On Tuesday, March 27, 2012 01:36:32 PM ross.oreto wrote:
> I removed the jcifs calls and the update code looks like this:
>
> String listsUrl =
> "https://int.vanderbilt.edu/research/mcgdev/live/_vti_bin/Lists.asmx"
> JaxWsProxyFactoryBean factoryBean = new
JaxWsProxyFactoryBean()
>
> factoryBean.setServiceClass(com.microsoft.schemas.sharepoint.soap.ListsSoa
> p.class) factoryBean.setAddress(listsUrl)
> factoryBean.setUsername(username)
> factoryBean.setPassword(password)
>
> port = (ListsSoap) factoryBean.create()
>
> Client client = ClientProxy.getClient(port)
> HTTPConduit http = client.getConduit()
> HTTPClientPolicy httpClientPolicy = new
HTTPClientPolicy()
> httpClientPolicy.setConnectionTimeout(36000)
> httpClientPolicy.setAllowChunking(false)
> httpClientPolicy.setReceiveTimeout(32000)
> httpClientPolicy.setAutoRedirect(true)
> http.setClient(httpClientPolicy)
>
> // AuthorizationPolicy policy = new
> AuthorizationPolicy()
> // policy.setUserName(username)
> // policy.setPassword(password)
> // http.setAuthorization(policy)
>
> GetListItemsResponse.GetListItemsResult result =
> port.getListItems("AboutUs", null, null, null,
> null,
null, null)
>
> I am still receiving the 'Cannot send message exception'. I have tried
> supplying username password credentials to the factoryBean and to the
> AuthorizationPolicy, neither seem to get authenticated. Is there somewhere
> else I should be supplying credentials to?
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-Client-NTLM-Authentication-with-Share
> Point-Server-tp5598272p5598853.html Sent from the cxf-user mailing list
> archive at Nabble.com.
--
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com