在我的Camel (2.13)流程中,我想使用Camel-CXF调用CXF服务。webservice是使用NTLM保护的。我确实发现CXF本身支持NTLM,但我在Camel-CXF上找不到任何东西。当然,我确实尝试了参数username和password,但这不起作用。Ik看起来像是Camel-CXF不支持它。对如何解决这个问题有什么想法吗?
我使用的是java6,所以我想我不需要jcifs。
罗尔德
发布于 2014-11-20 18:59:13
<cxf:cxfEndpoint id="sharepointQueryEndpoint"
address="http://yourhostwithpathtowsdl/_vti_bin/search.asmx"
serviceClass="com.somewhere.special.generated.QueryServiceSoap"
endpointName="ssp:SecureConnection"
xmlns:ssp="http://microsoft.com/webservices/OfficeServer/QueryService"
>
<cxf:properties>
<entry key="dataFormat" value="POJO"/>
<entry key="loggingFeatureEnabled" value="true" />
</cxf:properties>
<cxf:inInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:cxfEndpoint>
<http:conduit name="{http://microsoft.com/webservices/OfficeServer/QueryService}SecureConnection.http-conduit">
<http:client
AllowChunking="false"
MaxRetransmits="11"
Connection="Keep-Alive"
ReceiveTimeout="60000"
CacheControl="No-Cache"
/>
<http:authorization>
<sec:UserName>Domain\Username</sec:UserName>
<sec:Password>Password</sec:Password>
<sec:Authorization>NTLM</sec:Authorization>
</http:authorization>
</http:conduit>cxfEndpoint配置中的属性serviceClass指向由wsdl2java生成的接口。enter code here注意:当此配置从基于Windows的计算机运行时,它不起作用。在握手期间,它将用当前登录用户的凭证替换http-conduit中配置的用户名/密码。有关更多信息,请参阅Can Java's 'single sign-on' (use credentials from 'Credential Manager') on Windows be disabled?
https://stackoverflow.com/questions/26612039
复制相似问题