You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by cannykanna <ca...@gmail.com> on 2013/07/12 11:18:22 UTC

Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Hi
I am using the camel-cxf example and created a project in eclipse.
In src/main/java 
org.apache.camel.example.Provider package, I created my own Client which
talks to end application.
I used this client in my CamelCxfExample.java Class and modified the tester
bean as well. 
Now I modified the CamelCXFProviderRouteConfig.xml in the same project.

Now when I run   mvn exec:java -PWebServiceProvider command from eclipse, I
am getting below stack of error:
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO]
------------------------------------------------------------------------
[INFO] Building Camel :: Example :: CXF 2.11.0
[INFO]
------------------------------------------------------------------------
[INFO] 
[INFO] >>> exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
>>>
[INFO] 
[INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @
camel-example-cxf ---
[INFO] 
[INFO] <<< exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
<<<
[INFO] 
[INFO] --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
---
[rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO 
Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@6b5b5783:
startup date [Fri Jul 12 12:35:44 IST 2013]; root of context hierarchy
[rovider.CamelCxfExample.main()] XmlBeanDefinitionReader        INFO 
Loading XML bean definitions from class path resource
[META-INF/spring/CamelCXFProviderRouteConfig.xml]
[rovider.CamelCxfExample.main()] XmlBeanDefinitionReader        INFO 
Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
[rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO  Bean
'cxf' of type [class org.apache.cxf.bus.spring.SpringBus] is not eligible
for getting processed by all BeanPostProcessors (for example: not eligible
for auto-proxying)
[rovider.CamelCxfExample.main()] DefaultListableBeanFactory     INFO 
Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@3da997a:
defining beans
[bridgePropertyPlaceholder,cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,testBean,soapMessageEndpoint,template,consumerTemplate,test_context:beanPostProcessor,test_context];
root of factory hierarchy
[rovider.CamelCxfExample.main()] CamelContextFactoryBean        INFO 
Bridging Camel and Spring property placeholder configurer with id:
bridgePropertyPlaceholder
[rovider.CamelCxfExample.main()] SpringCamelContext             INFO  Apache
Camel 2.11.0 (CamelContext: test_context) is starting
[rovider.CamelCxfExample.main()] ManagementStrategyFactory      INFO  JMX
enabled.
[rovider.CamelCxfExample.main()] DefaultTypeConverter           INFO  Loaded
196 type converters
[rovider.CamelCxfExample.main()] ReflectionServiceFactoryBean   INFO 
Creating Service {http://www.service-now.com/incident}ServiceNow_incident
from WSDL: wsdl/incident.do.wsdl
[rovider.CamelCxfExample.main()] SpringCamelContext             INFO  Apache
Camel 2.11.0 (CamelContext: test_context) is shutting down
[rovider.CamelCxfExample.main()] SpringCamelContext             INFO  Uptime
0.898 seconds
[rovider.CamelCxfExample.main()] SpringCamelContext             INFO  Apache
Camel 2.11.0 (CamelContext: test_context) is shutdown in 0.004 seconds
Get the exception org.apache.camel.RuntimeCamelException:
java.lang.RuntimeException: Protocol mismatch for port 443: engine's
protocol is http, the url protocol is https

My endpoint application runs on https protocol.

Can you please help me.?



--
View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by cannykanna <ca...@gmail.com>.
Thank you William..i will follow the steps from the link U send..if I face
any problem again..i will get back to you.

Regards,
Kannaiah





--
View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568p5735649.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by Willem jiang <wi...@gmail.com>.
Hi,

If you changed the protocol form http to https, you need to add some configuration on the Jetty engine just like this[1]

[1]http://cxf.apache.org/docs/jetty-configuration.html  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, July 12, 2013 at 5:18 PM, cannykanna wrote:

> Hi
> I am using the camel-cxf example and created a project in eclipse.
> In src/main/java  
> org.apache.camel.example.Provider package, I created my own Client which
> talks to end application.
> I used this client in my CamelCxfExample.java Class and modified the tester
> bean as well.  
> Now I modified the CamelCXFProviderRouteConfig.xml in the same project.
>  
> Now when I run mvn exec:java -PWebServiceProvider command from eclipse, I
> am getting below stack of error:
> [INFO] Scanning for projects...
> [INFO]  
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Camel :: Example :: CXF 2.11.0
> [INFO]
> ------------------------------------------------------------------------
> [INFO]  
> [INFO] >>> exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> > >  
> >  
>  
>  
> [INFO]  
> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @
> camel-example-cxf ---
> [INFO]  
> [INFO] <<< exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> <<<
> [INFO]  
> [INFO] --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> ---
> [rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO  
> Refreshing
> org.springframework.context.support.ClassPathXmlApplicationContext@6b5b5783:
> startup date [Fri Jul 12 12:35:44 IST 2013]; root of context hierarchy
> [rovider.CamelCxfExample.main()] XmlBeanDefinitionReader INFO  
> Loading XML bean definitions from class path resource
> [META-INF/spring/CamelCXFProviderRouteConfig.xml]
> [rovider.CamelCxfExample.main()] XmlBeanDefinitionReader INFO  
> Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml]
> [rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO Bean
> 'cxf' of type [class org.apache.cxf.bus.spring.SpringBus] is not eligible
> for getting processed by all BeanPostProcessors (for example: not eligible
> for auto-proxying)
> [rovider.CamelCxfExample.main()] DefaultListableBeanFactory INFO  
> Pre-instantiating singletons in
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3da997a:
> defining beans
> [bridgePropertyPlaceholder,cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,testBean,soapMessageEndpoint,template,consumerTemplate,test_context:beanPostProcessor,test_context];
> root of factory hierarchy
> [rovider.CamelCxfExample.main()] CamelContextFactoryBean INFO  
> Bridging Camel and Spring property placeholder configurer with id:
> bridgePropertyPlaceholder
> [rovider.CamelCxfExample.main()] SpringCamelContext INFO Apache
> Camel 2.11.0 (CamelContext: test_context) is starting
> [rovider.CamelCxfExample.main()] ManagementStrategyFactory INFO JMX
> enabled.
> [rovider.CamelCxfExample.main()] DefaultTypeConverter INFO Loaded
> 196 type converters
> [rovider.CamelCxfExample.main()] ReflectionServiceFactoryBean INFO  
> Creating Service {http://www.service-now.com/incident}ServiceNow_incident
> from WSDL: wsdl/incident.do.wsdl
> [rovider.CamelCxfExample.main()] SpringCamelContext INFO Apache
> Camel 2.11.0 (CamelContext: test_context) is shutting down
> [rovider.CamelCxfExample.main()] SpringCamelContext INFO Uptime
> 0.898 seconds
> [rovider.CamelCxfExample.main()] SpringCamelContext INFO Apache
> Camel 2.11.0 (CamelContext: test_context) is shutdown in 0.004 seconds
> Get the exception org.apache.camel.RuntimeCamelException:
> java.lang.RuntimeException: Protocol mismatch for port 443: engine's
> protocol is http, the url protocol is https
>  
> My endpoint application runs on https protocol.
>  
> Can you please help me.?
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by cannykanna <ca...@gmail.com>.
Hi Christian, Mueller CamelCXFProviderRouteConfig.xml
<http://camel.465427.n5.nabble.com/file/n5735813/CamelCXFProviderRouteConfig.xml>  
TesterBean.java
<http://camel.465427.n5.nabble.com/file/n5735813/TesterBean.java>  

I am attaching the config xml and testerBean class. but I somehow feel,
there is no routing happening and no where camel is used. Can you check
please..?

Regards
Kannaiah




--
View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568p5735813.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by cannykanna <ca...@gmail.com>.
Thank you mueller,

Your link was very helpful. My problem got resolved.

Thanks
Kannaiah



--
View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568p5735710.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by cannykanna <ca...@gmail.com>.
Hi Mueller

I have added the following lines  
<import resource="classpath:META-INF/cxf/cxf.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
  <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml" />

before   <bean id="testBean"
class="org.apache.camel.example.cxf.provider.TesterBean"/> line

and modified cxfEndpoint as follows:
<cxf:cxfEndpoint id="soapMessageEndpoint"
                  
serviceClass="org.apache.camel.example.cxf.provider.GreeterProvider"
                   address="https://demo005.service-now.com:{{port}}/"
                   wsdlURL="wsdl/incident.do.wsdl"
                   endpointName="s:ServiceNowSoap"
                   serviceName="s:ServiceNow_incident"
                   xmlns:s="http://www.service-now.com/incident"/>



--
View this message in context: http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568p5735650.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Get the exception org.apache.camel.RuntimeCamelException: java.lang.RuntimeException: Protocol mismatch for port 443: engine's protocol is http, the url protocol is https

Posted by Christian Müller <ch...@gmail.com>.
> Now I modified the CamelCXFProviderRouteConfig.xml in the same project.

What did you modify?

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Fri, Jul 12, 2013 at 11:18 AM, cannykanna <ca...@gmail.com> wrote:

> Hi
> I am using the camel-cxf example and created a project in eclipse.
> In src/main/java
> org.apache.camel.example.Provider package, I created my own Client which
> talks to end application.
> I used this client in my CamelCxfExample.java Class and modified the tester
> bean as well.
> Now I modified the CamelCXFProviderRouteConfig.xml in the same project.
>
> Now when I run   mvn exec:java -PWebServiceProvider command from eclipse, I
> am getting below stack of error:
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Camel :: Example :: CXF 2.11.0
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] >>> exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> >>>
> [INFO]
> [INFO] --- maven-bundle-plugin:2.3.7:cleanVersions (versions) @
> camel-example-cxf ---
> [INFO]
> [INFO] <<< exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> <<<
> [INFO]
> [INFO] --- exec-maven-plugin:1.1.1:java (default-cli) @ camel-example-cxf
> ---
> [rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO
> Refreshing
> org.springframework.context.support.ClassPathXmlApplicationContext@6b5b5783
> :
> startup date [Fri Jul 12 12:35:44 IST 2013]; root of context hierarchy
> [rovider.CamelCxfExample.main()] XmlBeanDefinitionReader        INFO
> Loading XML bean definitions from class path resource
> [META-INF/spring/CamelCXFProviderRouteConfig.xml]
> [rovider.CamelCxfExample.main()] XmlBeanDefinitionReader        INFO
> Loading XML bean definitions from class path resource
> [META-INF/cxf/cxf.xml]
> [rovider.CamelCxfExample.main()] ClassPathXmlApplicationContext INFO  Bean
> 'cxf' of type [class org.apache.cxf.bus.spring.SpringBus] is not eligible
> for getting processed by all BeanPostProcessors (for example: not eligible
> for auto-proxying)
> [rovider.CamelCxfExample.main()] DefaultListableBeanFactory     INFO
> Pre-instantiating singletons in
>
> org.springframework.beans.factory.support.DefaultListableBeanFactory@3da997a
> :
> defining beans
>
> [bridgePropertyPlaceholder,cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,testBean,soapMessageEndpoint,template,consumerTemplate,test_context:beanPostProcessor,test_context];
> root of factory hierarchy
> [rovider.CamelCxfExample.main()] CamelContextFactoryBean        INFO
> Bridging Camel and Spring property placeholder configurer with id:
> bridgePropertyPlaceholder
> [rovider.CamelCxfExample.main()] SpringCamelContext             INFO
>  Apache
> Camel 2.11.0 (CamelContext: test_context) is starting
> [rovider.CamelCxfExample.main()] ManagementStrategyFactory      INFO  JMX
> enabled.
> [rovider.CamelCxfExample.main()] DefaultTypeConverter           INFO
>  Loaded
> 196 type converters
> [rovider.CamelCxfExample.main()] ReflectionServiceFactoryBean   INFO
> Creating Service {http://www.service-now.com/incident}ServiceNow_incident
> from WSDL: wsdl/incident.do.wsdl
> [rovider.CamelCxfExample.main()] SpringCamelContext             INFO
>  Apache
> Camel 2.11.0 (CamelContext: test_context) is shutting down
> [rovider.CamelCxfExample.main()] SpringCamelContext             INFO
>  Uptime
> 0.898 seconds
> [rovider.CamelCxfExample.main()] SpringCamelContext             INFO
>  Apache
> Camel 2.11.0 (CamelContext: test_context) is shutdown in 0.004 seconds
> Get the exception org.apache.camel.RuntimeCamelException:
> java.lang.RuntimeException: Protocol mismatch for port 443: engine's
> protocol is http, the url protocol is https
>
> My endpoint application runs on https protocol.
>
> Can you please help me.?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Get-the-exception-org-apache-camel-RuntimeCamelException-java-lang-RuntimeException-Protocol-mismatcs-tp5735568.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>