Как включить SSL/TLS в службе Jboss Fuse REST (JAX-RS)?

Я создал службу REST с помощью JBossFuse JAX-RS, файл XML выглядит следующим образом. Может ли кто-нибудь помочь мне включить SSL/TLS для этой службы?

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:camel="http://camel.apache.org/schema/spring"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:jaxrs="http://cxf.apache.org/jaxrs"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd               http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd         http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd         http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
    <jaxrs:server address="http://localhost:9000/employee" id="EmplRestService">
        <jaxrs:serviceBeans>
            <ref bean="EmplService"/>
        </jaxrs:serviceBeans>  
    </jaxrs:server>
    <bean id="EmplService" class="com.sample.beans.EmployeeServiceResource"/>     
</beans>

Спасибо


person dush88c    schedule 28.12.2017    source источник
comment
Я успешно подключил SSL/TLS в службе REST, следуя инструкциям из приведенной ниже ссылки cxf.apache.org/docs/secure-jax-rs-services.html   -  person dush88c    schedule 03.01.2018


Ответы (1)


Поскольку вы используете абсолютный адрес address="http://localhost:9000/employee"

Вам необходимо настроить httpj:engine-factory, как описано здесь[1] [1]http://cxf.apache.org/docs/standalone-http-transport.html

person Freeman Fang    schedule 28.12.2017
comment
Я получил хороший совет по вашей ссылке и привел меня к правильному пути. Но есть некоторые проблемы. Но я разрешил их по следующей ссылке. Спасибо за ваш комментарий. cxf.apache.org/docs/secure-jax-rs-services. html - person dush88c; 03.01.2018