camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Vunnava <anil.vunn...@gmail.com>
Subject RE: How do I call a NTLM secured webservice using Camel-cxf?
Date Wed, 28 Jan 2015 11:48:41 GMT
Bharadwaj, You are removing all the headers before sending to endpoint.

Observe the snippet in your code.
<camel:removeHeaders pattern="*"/>

Regards,
Anil Vunnava.

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

Anil, may be in the given code snippet header is missing but we have set the header for operation
name.


On Wed, Jan 28, 2015 at 5:05 PM, Anil Vunnava [via Camel] <[hidden email]> wrote:

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


From: [hidden email]
Sent: ‎28-‎01-‎2015 04:40 PM
To: [hidden email]
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="<a href='http://schemas.microsoft.com/xrm/2011/test/Services"'
target="_top" rel="nofollow" link="external">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 [hidden email] 
To unsubscribe from Camel, click here.
NAML 





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-tp5762172p5762177.html

To unsubscribe from How do I call a NTLM secured webservice using Camel-cxf?, click here.
NAML 







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-tp5762172p5762179.html

To start a new topic under Camel - Users, email ml-node+s465427n465428h32@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-tp5762172p5762180.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message