Hi Bharadwaj,

May I know the web methods (operations) in your web service..?

If there are more than one operations we either need to set header on exchange 
CxfConstants.OPERATION_NAME.

Regards,
Anil Vunnava

-----Original Message-----
From: "bharadwaj [via Camel]" <ml-node+s465427n5762172...@n5.nabble.com>
Sent: ‎28-‎01-‎2015 04:40 PM
To: "Anil Vunnava" <anil.vunn...@gmail.com>
Subject: How do I call a NTLM secured webservice using Camel-cxf?

<cxf:cxfEndpoint id="TestService" 
                address="${TestServiceServiceUrl}" 
endpointName="test:CustomBindingService" 
                serviceName="test:OrgService" 
                xmlns:crm="http://schemas.microsoft.com/xrm/2011/test/Services";
                wsdlURL="Artifacts/wsdl/testService.wsdl" 
                
serviceClass="com.microsoft.schemas.xrm._2011.test.services.OrgService">        
        
                <cxf:properties>
                        <entry key="dataFormat" value="PAYLOAD" />
                        <entry key="receiveTimeout" value="15000" />
                        <entry key="connectionTimeout" value="2000" />
                        <entry key="loggingFeatureEnabled" value="true" />
                </cxf:properties>
                <cxf:inInterceptors>
                        <ref bean="gzipInterceptor" />
                        <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://schemas.microsoft.com/xrm/2011/test/Services}SecureConnection.http-conduit";>
        <http:client 
                AllowChunking="false" 
                MaxRetransmits="11" 
                Connection="Keep-Alive" 
                ReceiveTimeout="60000" 
                CacheControl="No-Cache" 
                />

        <http:authorization>
            <sec:UserName>testlabs\\admin</sec:UserName>            
            <sec:Password>test</sec:Password>
            <sec:Authorization>NTLM</sec:Authorization>            
        </http:authorization>

    </http:conduit>

        <camel:routeContext id="TestServiceRoutes">
            <camel:route>            
                        <camel:from 
uri="cxf:bean:mimicTestService?dataFormat=PAYLOAD" />
                        
                        
                        <camel:log logName="Test" loggingLevel="INFO" 
message="TestService request recieved ${body}"/>
                        
                        <camel:removeHeaders pattern="*"/>                      
  
                        
                        <camel:to 
uri="cxf:bean:TestService?dataFormat=PAYLOAD"/>
                        <camel:log logName="Test" loggingLevel="INFO" 
message="TestService response recieved ${body}"/>
                </camel:route>  
        </camel:routeContext>
        



error 
----------- 

        16:30:15,079 | DEBUG | test/Services | SendProcessor                    
| 157 - org.apache.camel.camel-core - 2.10.0.redhat-60024 | >>>> 
Endpoint[cxf://bean:realDcrmService?dataFormat=PAYLOAD] Exchange[Message: 
[com.microsoft.schemas.xrm._2011.test.QueryExpression@58a5fa2e]] 
16:30:15,079 | DEBUG | test/Services | CxfProducer                      | 221 - 
org.apache.camel.camel-cxf - 2.10.0.redhat-60024 | Try to find a default 
operation. You should set 'operationName' in header. 
16:30:15,081 | DEBUG | test/Services | DefaultErrorHandler              | 157 - 
org.apache.camel.camel-core - 2.10.0.redhat-60024 | Failed delivery for 
(MessageId: ID-M-6QPB102-63418-1422441664194-20-2 on ExchangeId: 
ID-M-6QPB102-63418-1422441664194-20-1). On delivery attempt: 0 caught: 
org.apache.camel.InvalidPayloadException: No body available of type: 
org.apache.camel.component.cxf.CxfPayload but has value: 
[com.microsoft.schemas.xrm._2011.contracts.QueryExpression@58a5fa2e] of type: 
java.util.ArrayList on: Message: 
[com.microsoft.schemas.xrm._2011.contracts.QueryExpression@58a5fa2e]. Caused 
by: No type converter available to convert from type: java.util.ArrayList to 
the required type: org.apache.camel.component.cxf.CxfPayload with value 
[com.microsoft.schemas.xrm._2011.test.QueryExpression@58a5fa2e]. 
Exchange[Message: 
[com.microsoft.schemas.xrm._2011.contracts.QueryExpression@58a5fa2e]]. Caused 
by: [org.apache.camel.NoTypeConversionAvailableException - No type converter 
available to convert from type: java.util.ArrayList to the required type: 
org.apache.camel.component.cxf.CxfPayload with value 
[com.microsoft.schemas.xrm._2011.test.QueryExpression@58a5fa2e]] 


Thanks in Advance!!! 




If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/How-do-I-call-a-NTLM-secured-webservice-using-Camel-cxf-tp5762172.html
 
To start a new topic under Camel - Users, email 
ml-node+s465427n465428...@n5.nabble.com 
To unsubscribe from Camel, click here.
NAML 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-do-I-call-a-NTLM-secured-webservice-using-Camel-cxf-tp5762172p5762177.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to