You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Julio Arias <ju...@rbxglobal.com> on 2007/08/11 01:16:29 UTC

HTTPS Server

Hi,

I have a web app that has cxf web services, in our local env  
everything works fine but we just move to QA and the QA server is  
behind HTTPS and now the client throws an exception. I was looking  
into the http-conduit config but I don't quite get it (the conf goes  
in the client side or the server side????), can some one send and  
simple example.

The exception is:

Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
         at  
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage 
(MessageSenderInterceptor.java:48)
         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept 
(PhaseInterceptorChain.java:207)
         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
254)
         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
205)
         at org.apache.cxf.frontend.ClientProxy.invokeSync 
(ClientProxy.java:73)
         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke 
(JaxWsClientProxy.java:135)
         ... 45 more
Caused by: java.io.IOException: Illegal Protocol https for HTTP  
URLConnection Factory.
         at  
org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnect 
ion(HttpURLConnectionFactoryImpl.java:44)
         at org.apache.cxf.transport.http.HTTPConduit.prepare 
(HTTPConduit.java:473)
         at  
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage 
(MessageSenderInterceptor.java:46)
         ... 50 more

Thanks.



Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------


Free online Web Services course starting Aug. 24th

Posted by Glen Mazza <gl...@verizon.net>.
Hello list, just FYI in case you're interested, Sun Microsystems' free
online web services course will be starting later this week: 

http://blogs.sun.com/arungupta/entry/free_web_services_training_3rd

Glen



Re: HTTPS Server

Posted by Willem Jiang <ni...@iona.com>.
Hi,

The conduit name should be the port's Qname + ".http-conduit"

<http:conduit 
name="{http://client.webservice.crm.ecot.com/ws/student}StudentService.http-conduit"> 


In your configuration, it looks like the http:conduit's name attribute 
is set to be the service's Qname + ".http-conduit"

Willem.
Julio Arias wrote:
> Hi -
>
> I have the following example spring config file:
>
> But still getting the same error, do I'm missing something??
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       xmlns:sec="http://cxf.apache.org/configuration/security"
>       xmlns:http="http://cxf.apache.org/transports/http/configuration"
>       xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
>       xsi:schemaLocation="
>                http://cxf.apache.org/configuration/security
>                http://cxf.apache.org/schemas/configuration/security.xsd
>                http://cxf.apache.org/transports/http/configuration
>                http://cxf.apache.org/schemas/configuration/http-conf.xsd
>                http://www.springframework.org/schema/beans
>                
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>     <bean id="studentWebServiceClient" 
> class="com.ecot.crm.webservice.client.ws.student.StudentService" 
> factory-bean="studentWebServiceClientFactory" factory-method="create"/>
>
>     <bean id="studentWebServiceClientFactory" 
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>         <property name="serviceClass" 
> value="com.ecot.crm.webservice.client.ws.student.StudentService"/>
>         <property name="address" 
> value="${webservices.url}/StudentService"/>
>     </bean>
>
>     <bean id="userWebServiceClient" 
> class="com.ecot.crm.webservice.client.ws.user.UserService"
>           factory-bean="userWebServiceClientFactory" 
> factory-method="create"/>
>
>     <bean id="userWebServiceClientFactory" 
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>         <property name="serviceClass" 
> value="com.ecot.crm.webservice.client.ws.user.UserService"/>
>         <property name="address" value="${webservices.url}/UserService"/>
>     </bean>
>
>     <bean id="teacherWebServiceClient" 
> class="com.ecot.crm.webservice.client.ws.teacher.TeacherService"
>           factory-bean="teacherWebServiceClientFactory" 
> factory-method="create"/>
>
>     <bean id="teacherWebServiceClientFactory" 
> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>         <property name="serviceClass" 
> value="com.ecot.crm.webservice.client.ws.teacher.TeacherService"/>
>         <property name="address" 
> value="${webservices.url}/TeacherService"/>
>     </bean>
>
>
>     <http:conduit 
> name="{http://client.webservice.crm.ecot.com/ws/teacher}TeacherService.http-conduit"> 
>
>     <http:tlsClientParameters>
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                
> file="/home/jperez/IdeaProjects/crm/certs/truststore.jks"/>
>       </sec:trustManagers>
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password"
>                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
>       </sec:keyManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>    </http:conduit>
>
> <http:conduit 
> name="{http://client.webservice.crm.ecot.com/ws/user}UserService.http-conduit"> 
>
>     <http:tlsClientParameters>
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                
> file="/home/jperez/IdeaProjects/crm/certs/truststore.jks"/>
>       </sec:trustManagers>
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password"
>                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
>       </sec:keyManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>    </http:conduit>
>
>     <http:conduit 
> name="{http://client.webservice.crm.ecot.com/ws/student}StudentService.http-conduit"> 
>
>     <http:tlsClientParameters>
>       <sec:trustManagers>
>           <sec:keyStore type="JKS" password="password"
>                
> file="/home/jperez/IdeaProjects/crm/certs/truststore.jks"/>
>       </sec:trustManagers>
>       <sec:keyManagers keyPassword="password">
>            <sec:keyStore type="JKS" password="password"
>                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
>       </sec:keyManagers>
>       <sec:cipherSuitesFilter>
>         <sec:include>.*_EXPORT_.*</sec:include>
>         <sec:include>.*_EXPORT1024_.*</sec:include>
>         <sec:include>.*_WITH_DES_.*</sec:include>
>         <sec:include>.*_WITH_NULL_.*</sec:include>
>         <sec:exclude>.*_DH_anon_.*</sec:exclude>
>       </sec:cipherSuitesFilter>
>     </http:tlsClientParameters>
>    </http:conduit>
>
> On Aug 10, 2007, at 8:34 PM, Jiang, Ning ((Willem)) wrote:
>
>> Hi
>>
>> You can find the exmple with the https transport in the CXF bin kit's 
>> ${CXF_HOME}/samples/hello_world_https directory.
>>
>> You need set the <http:tlsClientParameters> to let CXF init the https 
>> connection for your.
>> You can take the WibbleClient.cxf as an example.
>>
>> Willem.
>>
>>
>> -----Original Message-----
>> From: Julio Arias [mailto:julio.arias@rbxglobal.com]
>> Sent: Sat 8/11/2007 7:16
>> To: cxf-user@incubator.apache.org
>> Subject: HTTPS Server
>>
>> Hi,
>>
>> I have a web app that has cxf web services, in our local env
>> everything works fine but we just move to QA and the QA server is
>> behind HTTPS and now the client throws an exception. I was looking
>> into the http-conduit config but I don't quite get it (the conf goes
>> in the client side or the server side????), can some one send and
>> simple example.
>>
>> The exception is:
>>
>> Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
>>          at
>> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage
>> (MessageSenderInterceptor.java:48)
>>          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept
>> (PhaseInterceptorChain.java:207)
>>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:
>> 254)
>>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:
>> 205)
>>          at org.apache.cxf.frontend.ClientProxy.invokeSync
>> (ClientProxy.java:73)
>>          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke
>> (JaxWsClientProxy.java:135)
>>          ... 45 more
>> Caused by: java.io.IOException: Illegal Protocol https for HTTP
>> URLConnection Factory.
>>          at
>> org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnect
>> ion(HttpURLConnectionFactoryImpl.java:44)
>>          at org.apache.cxf.transport.http.HTTPConduit.prepare
>> (HTTPConduit.java:473)
>>          at
>> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage
>> (MessageSenderInterceptor.java:46)
>>          ... 50 more
>>
>> Thanks.
>>
>>
>>
>> Julio Arias
>> Java Developer
>> Roundbox Global : enterprise : technology : genius
>> ---------------------------------------------------------------------
>> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
>> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
>> email: julio.arias@rbxglobal.com | www.rbxglobal.com
>> ---------------------------------------------------------------------
>>
>>
>
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 011) 506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>

Re: HTTPS Server

Posted by Julio Arias <ju...@rbxglobal.com>.
Hi -

I have the following example spring config file:

But still getting the same error, do I'm missing something??

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:sec="http://cxf.apache.org/configuration/security"
       xmlns:http="http://cxf.apache.org/transports/http/configuration"
       xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
       xsi:schemaLocation="
                http://cxf.apache.org/configuration/security
                http://cxf.apache.org/schemas/configuration/security.xsd
                http://cxf.apache.org/transports/http/configuration
                http://cxf.apache.org/schemas/configuration/http- 
conf.xsd
                http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring- 
beans-2.0.xsd">

     <bean id="studentWebServiceClient"  
class="com.ecot.crm.webservice.client.ws.student.StudentService"  
factory-bean="studentWebServiceClientFactory" factory-method="create"/>

     <bean id="studentWebServiceClientFactory"  
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
         <property name="serviceClass"  
value="com.ecot.crm.webservice.client.ws.student.StudentService"/>
         <property name="address" value="${webservices.url}/ 
StudentService"/>
     </bean>

     <bean id="userWebServiceClient"  
class="com.ecot.crm.webservice.client.ws.user.UserService"
           factory-bean="userWebServiceClientFactory" factory- 
method="create"/>

     <bean id="userWebServiceClientFactory"  
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
         <property name="serviceClass"  
value="com.ecot.crm.webservice.client.ws.user.UserService"/>
         <property name="address" value="${webservices.url}/ 
UserService"/>
     </bean>

     <bean id="teacherWebServiceClient"  
class="com.ecot.crm.webservice.client.ws.teacher.TeacherService"
           factory-bean="teacherWebServiceClientFactory" factory- 
method="create"/>

     <bean id="teacherWebServiceClientFactory"  
class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
         <property name="serviceClass"  
value="com.ecot.crm.webservice.client.ws.teacher.TeacherService"/>
         <property name="address" value="${webservices.url}/ 
TeacherService"/>
     </bean>


     <http:conduit name="{http://client.webservice.crm.ecot.com/ws/ 
teacher}TeacherService.http-conduit">
     <http:tlsClientParameters>
       <sec:trustManagers>
           <sec:keyStore type="JKS" password="password"
                file="/home/jperez/IdeaProjects/crm/certs/ 
truststore.jks"/>
       </sec:trustManagers>
       <sec:keyManagers keyPassword="password">
            <sec:keyStore type="JKS" password="password"
                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
       </sec:keyManagers>
       <sec:cipherSuitesFilter>
         <sec:include>.*_EXPORT_.*</sec:include>
         <sec:include>.*_EXPORT1024_.*</sec:include>
         <sec:include>.*_WITH_DES_.*</sec:include>
         <sec:include>.*_WITH_NULL_.*</sec:include>
         <sec:exclude>.*_DH_anon_.*</sec:exclude>
       </sec:cipherSuitesFilter>
     </http:tlsClientParameters>
    </http:conduit>

<http:conduit name="{http://client.webservice.crm.ecot.com/ws/user} 
UserService.http-conduit">
     <http:tlsClientParameters>
       <sec:trustManagers>
           <sec:keyStore type="JKS" password="password"
                file="/home/jperez/IdeaProjects/crm/certs/ 
truststore.jks"/>
       </sec:trustManagers>
       <sec:keyManagers keyPassword="password">
            <sec:keyStore type="JKS" password="password"
                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
       </sec:keyManagers>
       <sec:cipherSuitesFilter>
         <sec:include>.*_EXPORT_.*</sec:include>
         <sec:include>.*_EXPORT1024_.*</sec:include>
         <sec:include>.*_WITH_DES_.*</sec:include>
         <sec:include>.*_WITH_NULL_.*</sec:include>
         <sec:exclude>.*_DH_anon_.*</sec:exclude>
       </sec:cipherSuitesFilter>
     </http:tlsClientParameters>
    </http:conduit>

     <http:conduit name="{http://client.webservice.crm.ecot.com/ws/ 
student}StudentService.http-conduit">
     <http:tlsClientParameters>
       <sec:trustManagers>
           <sec:keyStore type="JKS" password="password"
                file="/home/jperez/IdeaProjects/crm/certs/ 
truststore.jks"/>
       </sec:trustManagers>
       <sec:keyManagers keyPassword="password">
            <sec:keyStore type="JKS" password="password"
                 file="/home/jperez/IdeaProjects/crm/certs/wibble.jks"/>
       </sec:keyManagers>
       <sec:cipherSuitesFilter>
         <sec:include>.*_EXPORT_.*</sec:include>
         <sec:include>.*_EXPORT1024_.*</sec:include>
         <sec:include>.*_WITH_DES_.*</sec:include>
         <sec:include>.*_WITH_NULL_.*</sec:include>
         <sec:exclude>.*_DH_anon_.*</sec:exclude>
       </sec:cipherSuitesFilter>
     </http:tlsClientParameters>
    </http:conduit>

On Aug 10, 2007, at 8:34 PM, Jiang, Ning ((Willem)) wrote:

> Hi
>
> You can find the exmple with the https transport in the CXF bin  
> kit's ${CXF_HOME}/samples/hello_world_https directory.
>
> You need set the <http:tlsClientParameters> to let CXF init the  
> https connection for your.
> You can take the WibbleClient.cxf as an example.
>
> Willem.
>
>
> -----Original Message-----
> From: Julio Arias [mailto:julio.arias@rbxglobal.com]
> Sent: Sat 8/11/2007 7:16
> To: cxf-user@incubator.apache.org
> Subject: HTTPS Server
>
> Hi,
>
> I have a web app that has cxf web services, in our local env
> everything works fine but we just move to QA and the QA server is
> behind HTTPS and now the client throws an exception. I was looking
> into the http-conduit config but I don't quite get it (the conf goes
> in the client side or the server side????), can some one send and
> simple example.
>
> The exception is:
>
> Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
>          at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage
> (MessageSenderInterceptor.java:48)
>          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept
> (PhaseInterceptorChain.java:207)
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:
> 254)
>          at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:
> 205)
>          at org.apache.cxf.frontend.ClientProxy.invokeSync
> (ClientProxy.java:73)
>          at org.apache.cxf.jaxws.JaxWsClientProxy.invoke
> (JaxWsClientProxy.java:135)
>          ... 45 more
> Caused by: java.io.IOException: Illegal Protocol https for HTTP
> URLConnection Factory.
>          at
> org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConne 
> ct
> ion(HttpURLConnectionFactoryImpl.java:44)
>          at org.apache.cxf.transport.http.HTTPConduit.prepare
> (HTTPConduit.java:473)
>          at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage
> (MessageSenderInterceptor.java:46)
>          ... 50 more
>
> Thanks.
>
>
>
> Julio Arias
> Java Developer
> Roundbox Global : enterprise : technology : genius
> ---------------------------------------------------------------------
> Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
> tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
> email: julio.arias@rbxglobal.com | www.rbxglobal.com
> ---------------------------------------------------------------------
>
>




Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 011) 506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------


RE: HTTPS Server

Posted by "Jiang, Ning (Willem)" <Ni...@iona.com>.
Hi

You can find the exmple with the https transport in the CXF bin kit's ${CXF_HOME}/samples/hello_world_https directory.

You need set the <http:tlsClientParameters> to let CXF init the https connection for your.
You can take the WibbleClient.cxf as an example.

Willem.


-----Original Message-----
From: Julio Arias [mailto:julio.arias@rbxglobal.com]
Sent: Sat 8/11/2007 7:16
To: cxf-user@incubator.apache.org
Subject: HTTPS Server
 
Hi,

I have a web app that has cxf web services, in our local env  
everything works fine but we just move to QA and the QA server is  
behind HTTPS and now the client throws an exception. I was looking  
into the http-conduit config but I don't quite get it (the conf goes  
in the client side or the server side????), can some one send and  
simple example.

The exception is:

Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
         at  
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage 
(MessageSenderInterceptor.java:48)
         at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept 
(PhaseInterceptorChain.java:207)
         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
254)
         at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java: 
205)
         at org.apache.cxf.frontend.ClientProxy.invokeSync 
(ClientProxy.java:73)
         at org.apache.cxf.jaxws.JaxWsClientProxy.invoke 
(JaxWsClientProxy.java:135)
         ... 45 more
Caused by: java.io.IOException: Illegal Protocol https for HTTP  
URLConnection Factory.
         at  
org.apache.cxf.transport.http.HttpURLConnectionFactoryImpl.createConnect 
ion(HttpURLConnectionFactoryImpl.java:44)
         at org.apache.cxf.transport.http.HTTPConduit.prepare 
(HTTPConduit.java:473)
         at  
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage 
(MessageSenderInterceptor.java:46)
         ... 50 more

Thanks.



Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
---------------------------------------------------------------------
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: julio.arias@rbxglobal.com | www.rbxglobal.com
---------------------------------------------------------------------