You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Suganya <su...@gmail.com> on 2015/09/08 21:28:00 UTC

SSLcontextparameters in http4 component

Hi,

I am trying to invoke an endpoint url with sslContextParameters applied to
it. I am using camel-http4-2.11.3jar. Below is the code snippet,

<setHeader headerName="CamelHttpMethod">
        <constant>GET</constant>
    </setHeader>
<setHeader headerName="Authorization">
<constant>Basic YWRtaW46dGVzdHBhc3M=</constant>
</setHeader>
<setHeader headerName="uri">
<constant>https://something.com/some</constant>
</setHeader>
<sslContextParameters id="sslContextParameters"
xmlns="http://camel.apache.org/schema/spring">
    <keyManagers>
      <keyStore type="PKCS12" resource="path" password="pass" />
</keyManagers>
<trustManagers>
<keyStore resource="pass" password="bpochp@123"/>
</trustManagers>
</sslContextParameters>
<bean id="https4" ref="org.apache.camel.component.http4.HttpComponent"
method="createEndpoint(${header.uri})">
<property name="sslContextParameters" ref="sslContextParameters" />
</bean>
<to uri="https4://something.com/some"/>

but getting the below error,

 Failed delivery for (MessageId: ID-XYZ on ExchangeId: ID-XYZZZ). Exhausted
after delivery attempt: 1 caught: java.lang.NullPointerException:
java.lang.NullPointerException
	at
org.apache.camel.component.http4.HttpComponent.registerPort(HttpComponent.java:332)
[camel-http4-2.11.3.jar:2.11.3]
	at
org.apache.camel.component.http4.HttpComponent.createEndpoint(HttpComponent.java:298)
[camel-http4-2.11.3.jar:2.11.3]
	at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:119)
[camel-core-2.11.0.jar:2.11.0]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_45]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[rt.jar:1.6.0_45]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[rt.jar:1.6.0_45]
	at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_45]

Where am I going wrong? Please help me out.







--
View this message in context: http://camel.465427.n5.nabble.com/SSLcontextparameters-in-http4-component-tp5771355.html
Sent from the Camel - Users mailing list archive at Nabble.com.