Call a SOAP service which is using NTLM authentication using Apache Camel in blueprint.xml.
Issue
- In the fuse environment I need to call a SOAP service which is using NTLM authentication.
- I have implemented below cxf endpoint and http:conduit
<camelcxf:cxfEndpoint id="remoteDomainEndPoint"
address="${domainEndpointAddress}" endpointName="tns:BasicHttpBinding_SampleService"
serviceName="tns:SampleService" wsdlURL="path/to/wsdl/SampleService.wsdl"
xmlns:tns="http://www.sampleservice.com/agility/services/sdk">
<camelcxf:properties>
<entry key="dataFormat" value="PAYLOAD" />
<entry key="schema-validation-enabled" value="false" />
</camelcxf:properties>
<camelcxf:inInterceptors>
<ref component-id="loggingInInterceptor" />
</camelcxf:inInterceptors>
<camelcxf:outInterceptors>
<!--<ref component-id="wss4jOutInterceptor" />-->
<ref component-id="loggingOutInterceptor" />
</camelcxf:outInterceptors>
</camelcxf:cxfEndpoint>
<http:conduit name="{http://www.sampleservice.com/agility/services/sdk}SampleService.http-conduit">
<http:client
AllowChunking="false"
MaxRetransmits="11"
Connection="Keep-Alive"
ReceiveTimeout="60000"
CacheControl="No-Cache"
/>
<http:authorization>
<sec:UserName>***</sec:UserName>
<sec:Password>****** (</sec:Password>
<sec:Authorization>NTLM</sec:Authorization>
</http:authorization>
</http:conduit>
- But I am getting the below exception when invoke the service.
org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied.
at org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyImpl.java:172)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:146)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:142)
at org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:584)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:313)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:294)
at org.apache.cxf.ws.policy.PolicyDataEngineImpl.getClientEndpointPolicy(PolicyDataEngineImpl.java:61)
at org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.java:317)
at org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.java:337)
at org.apache.cxf.transport.http.HTTPConduit.getClient(HTTPConduit.java:860)
at org.apache.cxf.transport.http.HTTPConduit.configureConduitFromEndpointInfo(HTTPConduit.java:359)
at org.apache.cxf.transport.http.HTTPConduit.finalizeConfig(HTTPConduit.java:439)
at org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:242)
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:222)
at org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:229)
at org.apache.cxf.endpoint.AbstractConduitSelector.createConduit(AbstractConduitSelector.java:145)
at org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:107)
at org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
at org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:853)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:511)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:418)
at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:116)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:139)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.interceptor.TraceInterceptor.proces
Environment
- Red Hat Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.