You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Paul Spencer <pa...@apache.org> on 2018/08/16 15:53:05 UTC
CORS Not added headers in REST Response from CXF and Karaf 4.2.0.
Why?
Karaf 4.2.0, Java 8, CXF 3.2.6
I am trying to enable CORS in my restful service based on the example in
https://cxf.apache.org/docs/jax-rs-cors.html, but the header
"Access-Control-Allow-Origin: *" is not in the response. The only variation
from the example is the definition of the providers. The example used <ref
bean="cors-filter"> and I am using <ref component-id="cors-filter" />.
What am I not doing?
***
* Supporting information
***
** Request and Response
sparrow:~ paul$ curl -i -H "Accept:text/plain" -X get
http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
HTTP/1.1 200 OK
Content-Type: text/plain
Date: Thu, 16 Aug 2018 15:46:44 GMT
Transfer-Encoding: chunked
Server: Jetty(9.4.6.v20170531)
Hello
sparrow:~ paul$
** From Karaf.log
16:46:44.259 INFO [qtp1158074324-166] Inbound Message
----------------------------
ID: 3
Address: http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
Http-Method: GET
Content-Type:
Headers: {Accept=[text/plain], Content-Type=[null],
Host=[192.168.212.130:8181], User-Agent=[curl/7.54.0]}
--------------------------------------
16:46:44.263 INFO [qtp1158074324-166] Outbound Message
---------------------------
ID: 3
Response-Code: 200
Content-Type: text/plain
Headers: {Content-Type=[text/plain], Date=[Thu, 16 Aug 2018 15:46:44 GMT]}
Payload: Hello
--------------------------------------
** From blueprint.xml
<jaxrs:server id="service" address="/rest">
<jaxrs:serviceBeans>
<ref component-id="cors-server" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref component-id="cors-filter" />
</jaxrs:providers>
</jaxrs:server>
** From Karaf
karaf@root()> list -t 1 | grep CXF
76 │ Active │ 40 │ 3.2.6 │ Apache CXF Core
77 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime JAX-RS
Frontend
78 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime Management
79 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Client
80 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
Providers
81 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
Search
82 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
JSON Basic
83 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Service
Description
84 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime HTTP
Transport
85 │ Active │ 40 │ 3.2.6 │ Apache CXF Karaf Commands
125 │ Active │ 40 │ 3.2.6 │ Apache CXF RS Cross-Origin
Resource Sharing
karaf@root()>
Paul Spencer
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: CORS Not added headers in REST Response from CXF and Karaf
4.2.0. Why?
Posted by Paul Spencer <pa...@apache.org>.
JB,
Based on the example
https://github.com/jbonofre/karaf/blob/DEV_GUIDE/examples/karaf-rest-example/karaf-rest-example-provider/src/main/resources/OSGI-INF/blueprint/rest.xml
I tried the following, which allowed the endpoint to start but the CORS
header where absent from the response.
<jaxrs:server id="service" address="/rest">
<jaxrs:serviceBeans>
<ref component-id="cors-server" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean
class="org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter" />
</jaxrs:providers>
</jaxrs:server>
***
* Below is the beginning of blueprint.xml
***
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
xmlns:cxf="http://cxf.apache.org/blueprint/core"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.org/blueprint/jaxrs
http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
http://cxf.apache.org/blueprint/core
http://cxf.apache.org/schemas/blueprint/core.xsd
">
Paul Spencer
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: CORS Not added headers in REST Response from CXF and Karaf
4.2.0. Why?
Posted by Paul Spencer <pa...@apache.org>.
JB,
The following caused the stacktrace, so I am not sure what is meant by 'I
mean <bean ref=""/> '
<jaxrs:server id="service" address="/rest">
<jaxrs:serviceBeans>
<ref bean="cors-server"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="cors-filter"/>
</jaxrs:providers>
</jaxrs:server>
Paul Spencer
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: CORS Not added headers in REST Response from CXF and Karaf 4.2.0.
Why?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Sorry Paul
I mean <bean ref=""/>
That should work.
Regards
JB
On 16/08/2018 19:20, Paul Spencer wrote:
> François and JB,
> Using <ref bean="..."/> causes the following stack trace:
>
> org.osgi.service.blueprint.container.ComponentDefinitionException: Element
> ref must have a valid component-id attribute
> at org.apache.aries.blueprint.parser.Parser.parseRef(Parser.java:1307)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.parser.Parser.parseValueGroup(Parser.java:1273)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.parser.Parser.parseCollection(Parser.java:830)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at org.apache.aries.blueprint.parser.Parser.parseElement(Parser.java:453)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.parser.ParserContextImpl.parseElement(ParserContextImpl.java:74)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseListData(AbstractBPBeanDefinitionParser.java:88)
> ~[?:?]
> at
> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.mapElement(JAXRSServerFactoryBeanDefinitionParser.java:102)
> ~[?:?]
> at
> org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseChildElements(AbstractBPBeanDefinitionParser.java:309)
> ~[?:?]
> at
> org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser.parse(SimpleBPBeanDefinitionParser.java:61)
> ~[?:?]
> at
> org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.parse(JAXRSServerFactoryBeanDefinitionParser.java:136)
> ~[?:?]
> at
> org.apache.cxf.jaxrs.blueprint.JAXRSBPNamespaceHandler.parse(JAXRSBPNamespaceHandler.java:63)
> ~[?:?]
> at
> org.apache.aries.blueprint.parser.Parser.parseCustomElement(Parser.java:1369)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at org.apache.aries.blueprint.parser.Parser.loadComponents(Parser.java:427)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at org.apache.aries.blueprint.parser.Parser.populate(Parser.java:331)
> ~[65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:351)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
> [65:org.apache.aries.blueprint.core:1.9.0]
> at
> org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)
> [?:?]
> at
> org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)
> [?:?]
> at
> org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)
> [?:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [?:?]
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [?:?]
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [?:?]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260)
> [9:org.apache.felix.fileinstall:3.6.4]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233)
> [9:org.apache.felix.fileinstall:3.6.4]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
> [9:org.apache.felix.fileinstall:3.6.4]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
> [9:org.apache.felix.fileinstall:3.6.4]
> at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
> [9:org.apache.felix.fileinstall:3.6.4]
>
>
> ***
> * From blueprint.xml
> ***
> <jaxrs:server id="service" address="/rest">
> <jaxrs:serviceBeans>
> <ref bean="cors-server" />
> </jaxrs:serviceBeans>
> <jaxrs:providers>
> <ref bean="cors-filter" />
> </jaxrs:providers>
> </jaxrs:server>
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: CORS Not added headers in REST Response from CXF and Karaf
4.2.0. Why?
Posted by Paul Spencer <pa...@apache.org>.
François and JB,
Using <ref bean="..."/> causes the following stack trace:
org.osgi.service.blueprint.container.ComponentDefinitionException: Element
ref must have a valid component-id attribute
at org.apache.aries.blueprint.parser.Parser.parseRef(Parser.java:1307)
~[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.parser.Parser.parseValueGroup(Parser.java:1273)
~[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.parser.Parser.parseCollection(Parser.java:830)
~[65:org.apache.aries.blueprint.core:1.9.0]
at org.apache.aries.blueprint.parser.Parser.parseElement(Parser.java:453)
~[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.parser.ParserContextImpl.parseElement(ParserContextImpl.java:74)
~[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseListData(AbstractBPBeanDefinitionParser.java:88)
~[?:?]
at
org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.mapElement(JAXRSServerFactoryBeanDefinitionParser.java:102)
~[?:?]
at
org.apache.cxf.configuration.blueprint.AbstractBPBeanDefinitionParser.parseChildElements(AbstractBPBeanDefinitionParser.java:309)
~[?:?]
at
org.apache.cxf.configuration.blueprint.SimpleBPBeanDefinitionParser.parse(SimpleBPBeanDefinitionParser.java:61)
~[?:?]
at
org.apache.cxf.jaxrs.blueprint.JAXRSServerFactoryBeanDefinitionParser.parse(JAXRSServerFactoryBeanDefinitionParser.java:136)
~[?:?]
at
org.apache.cxf.jaxrs.blueprint.JAXRSBPNamespaceHandler.parse(JAXRSBPNamespaceHandler.java:63)
~[?:?]
at
org.apache.aries.blueprint.parser.Parser.parseCustomElement(Parser.java:1369)
~[65:org.apache.aries.blueprint.core:1.9.0]
at org.apache.aries.blueprint.parser.Parser.loadComponents(Parser.java:427)
~[65:org.apache.aries.blueprint.core:1.9.0]
at org.apache.aries.blueprint.parser.Parser.populate(Parser.java:331)
~[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:351)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
[65:org.apache.aries.blueprint.core:1.9.0]
at
org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)
[?:?]
at
org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730)
[?:?]
at
org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485)
[?:?]
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [?:?]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [?:?]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [?:?]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260)
[9:org.apache.felix.fileinstall:3.6.4]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233)
[9:org.apache.felix.fileinstall:3.6.4]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520)
[9:org.apache.felix.fileinstall:3.6.4]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
[9:org.apache.felix.fileinstall:3.6.4]
at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
[9:org.apache.felix.fileinstall:3.6.4]
***
* From blueprint.xml
***
<jaxrs:server id="service" address="/rest">
<jaxrs:serviceBeans>
<ref bean="cors-server" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="cors-filter" />
</jaxrs:providers>
</jaxrs:server>
--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: CORS Not added headers in REST Response from CXF and Karaf 4.2.0.
Why?
Posted by Francois Papon <fr...@openobject.fr>.
Hi,
Why using component-id instead of bean like the CXF example ?
regards,
François Papon
fpapon@apache.org
On 16/08/2018 19:53, Paul Spencer wrote:
> Karaf 4.2.0, Java 8, CXF 3.2.6
> I am trying to enable CORS in my restful service based on the example in
> https://cxf.apache.org/docs/jax-rs-cors.html, but the header
> "Access-Control-Allow-Origin: *" is not in the response. The only variation
> from the example is the definition of the providers. The example used <ref
> bean="cors-filter"> and I am using <ref component-id="cors-filter" />.
>
> What am I not doing?
>
> ***
> * Supporting information
> ***
>
> ** Request and Response
> sparrow:~ paul$ curl -i -H "Accept:text/plain" -X get
> http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
> HTTP/1.1 200 OK
> Content-Type: text/plain
> Date: Thu, 16 Aug 2018 15:46:44 GMT
> Transfer-Encoding: chunked
> Server: Jetty(9.4.6.v20170531)
>
> Hello
> sparrow:~ paul$
>
> ** From Karaf.log
> 16:46:44.259 INFO [qtp1158074324-166] Inbound Message
> ----------------------------
> ID: 3
> Address: http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
> Http-Method: GET
> Content-Type:
> Headers: {Accept=[text/plain], Content-Type=[null],
> Host=[192.168.212.130:8181], User-Agent=[curl/7.54.0]}
> --------------------------------------
> 16:46:44.263 INFO [qtp1158074324-166] Outbound Message
> ---------------------------
> ID: 3
> Response-Code: 200
> Content-Type: text/plain
> Headers: {Content-Type=[text/plain], Date=[Thu, 16 Aug 2018 15:46:44 GMT]}
> Payload: Hello
> --------------------------------------
>
> ** From blueprint.xml
> <jaxrs:server id="service" address="/rest">
> <jaxrs:serviceBeans>
> <ref component-id="cors-server" />
> </jaxrs:serviceBeans>
> <jaxrs:providers>
> <ref component-id="cors-filter" />
> </jaxrs:providers>
> </jaxrs:server>
>
> ** From Karaf
>
> karaf@root()> list -t 1 | grep CXF
> 76 │ Active │ 40 │ 3.2.6 │ Apache CXF Core
> 77 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime JAX-RS
> Frontend
> 78 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime Management
> 79 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Client
> 80 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> Providers
> 81 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> Search
> 82 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> JSON Basic
> 83 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Service
> Description
> 84 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime HTTP
> Transport
> 85 │ Active │ 40 │ 3.2.6 │ Apache CXF Karaf Commands
> 125 │ Active │ 40 │ 3.2.6 │ Apache CXF RS Cross-Origin
> Resource Sharing
> karaf@root()>
>
>
> Paul Spencer
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Re: CORS Not added headers in REST Response from CXF and Karaf 4.2.0.
Why?
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Paul,
why not using <ref bean=""/> ?
Let me check how it parses. Does it work with <ref bean=""/> ?
Regards
JB
On 16/08/2018 17:53, Paul Spencer wrote:
> Karaf 4.2.0, Java 8, CXF 3.2.6
> I am trying to enable CORS in my restful service based on the example in
> https://cxf.apache.org/docs/jax-rs-cors.html, but the header
> "Access-Control-Allow-Origin: *" is not in the response. The only variation
> from the example is the definition of the providers. The example used <ref
> bean="cors-filter"> and I am using <ref component-id="cors-filter" />.
>
> What am I not doing?
>
> ***
> * Supporting information
> ***
>
> ** Request and Response
> sparrow:~ paul$ curl -i -H "Accept:text/plain" -X get
> http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
> HTTP/1.1 200 OK
> Content-Type: text/plain
> Date: Thu, 16 Aug 2018 15:46:44 GMT
> Transfer-Encoding: chunked
> Server: Jetty(9.4.6.v20170531)
>
> Hello
> sparrow:~ paul$
>
> ** From Karaf.log
> 16:46:44.259 INFO [qtp1158074324-166] Inbound Message
> ----------------------------
> ID: 3
> Address: http://192.168.212.130:8181/cxf/rest/annotatedGet/Hello
> Http-Method: GET
> Content-Type:
> Headers: {Accept=[text/plain], Content-Type=[null],
> Host=[192.168.212.130:8181], User-Agent=[curl/7.54.0]}
> --------------------------------------
> 16:46:44.263 INFO [qtp1158074324-166] Outbound Message
> ---------------------------
> ID: 3
> Response-Code: 200
> Content-Type: text/plain
> Headers: {Content-Type=[text/plain], Date=[Thu, 16 Aug 2018 15:46:44 GMT]}
> Payload: Hello
> --------------------------------------
>
> ** From blueprint.xml
> <jaxrs:server id="service" address="/rest">
> <jaxrs:serviceBeans>
> <ref component-id="cors-server" />
> </jaxrs:serviceBeans>
> <jaxrs:providers>
> <ref component-id="cors-filter" />
> </jaxrs:providers>
> </jaxrs:server>
>
> ** From Karaf
>
> karaf@root()> list -t 1 | grep CXF
> 76 │ Active │ 40 │ 3.2.6 │ Apache CXF Core
> 77 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime JAX-RS
> Frontend
> 78 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime Management
> 79 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Client
> 80 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> Providers
> 81 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> Search
> 82 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Extensions:
> JSON Basic
> 83 │ Active │ 40 │ 3.2.6 │ Apache CXF JAX-RS Service
> Description
> 84 │ Active │ 40 │ 3.2.6 │ Apache CXF Runtime HTTP
> Transport
> 85 │ Active │ 40 │ 3.2.6 │ Apache CXF Karaf Commands
> 125 │ Active │ 40 │ 3.2.6 │ Apache CXF RS Cross-Origin
> Resource Sharing
> karaf@root()>
>
>
> Paul Spencer
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com