You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Rastislav Papp (Jira)" <ji...@apache.org> on 2020/07/29 09:49:00 UTC

[jira] [Updated] (CAMEL-15348) cxfEndpoint blueprint namespace handler - problem with QName vs String

     [ https://issues.apache.org/jira/browse/CAMEL-15348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rastislav Papp updated CAMEL-15348:
-----------------------------------
    Description: 
When trying to create a {{cxfEndpoint}} in blueprint xml, using cxfEndpoint element from namespace {{http://camel.apache.org/schema/blueprint/cxf}} there is a problem with {{endpointName}} and {{serviceName}} parameters. This:
{code:xml}
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">

    <cxf:cxfEndpoint id="fooEndpoint"
                     address="${endpoint.url}"
                     serviceClass="com.foo.MyService"
                     endpointName="foo:MyService"
                     continuationTimeout="0"
                     xmlns:foo="http://abc.def">
        ...
    </cxf:cxfEndpoint>

</blueprint>
{code}
throws an exception:
{code}
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: endpointName, getter: null, setter: [class org.apache.camel.component.cxf.CxfEndpoint.setEndpointName(class java.lang.String)]
	at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:818) ~[?:?]
...
Caused by: java.lang.Exception: Unable to convert value {http://abc.def}MyService to type java.lang.String
	at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:187) ~[?:?]
{code}

I suspect the problem is with a {{org.apache.camel.component.cxf.CxfEndpoint#setEndpointName}} and {{org.apache.camel.component.cxf.CxfEndpoint#setServiceName}} methods - which previously accepted {{QName}}, but now accept {{String}}, and this change was not reflected in {{org.apache.camel.component.cxf.blueprint.EndpointDefinitionParser}}

I'm attaching a project to reproduce the behavior -  [^camel-reproducer-blueprint-cxf.zip] 

  was:
When trying to create a {{cxfEndpoint}} in blueprint xml, using cxfEndpoint element from namespace {{http://camel.apache.org/schema/blueprint/cxf}} there is a problem with {{endpointName}} and {{serviceName}} parameters. This:
{code:xml}
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">

    <cxf:cxfEndpoint id="fooEndpoint"
                     address="${endpoint.url}"
                     serviceClass="com.foo.MyService"
                     endpointName="foo:MyService"
                     continuationTimeout="0"
                     xmlns:foo="http://abc.def">
        ...
    </cxf:cxfEndpoint>

</blueprint>
{code}
throws an exception:
{code}
Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: endpointName, getter: null, setter: [class org.apache.camel.component.cxf.CxfEndpoint.setEndpointName(class java.lang.String)]
	at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:818) ~[?:?]
...
Caused by: java.lang.Exception: Unable to convert value {http://csobpoj.cz/esb/balicky/ckp/v1.0}BalickyCkpPort to type java.lang.String
	at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:187) ~[?:?]
{code}

I suspect the problem is with a {{org.apache.camel.component.cxf.CxfEndpoint#setEndpointName}} and {{org.apache.camel.component.cxf.CxfEndpoint#setServiceName}} methods - which previously accepted {{QName}}, but now accept {{String}}, and this change was not reflected in {{org.apache.camel.component.cxf.blueprint.EndpointDefinitionParser}}

I'm attaching a project to reproduce the behavior -  [^camel-reproducer-blueprint-cxf.zip] 


> cxfEndpoint blueprint namespace handler - problem with QName vs String
> ----------------------------------------------------------------------
>
>                 Key: CAMEL-15348
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15348
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf, osgi
>    Affects Versions: 3.4.1
>         Environment: Karaf 4.2.9
> Camel 3.4.1
> CXF 3.3.6
>            Reporter: Rastislav Papp
>            Priority: Major
>         Attachments: camel-reproducer-blueprint-cxf.zip
>
>
> When trying to create a {{cxfEndpoint}} in blueprint xml, using cxfEndpoint element from namespace {{http://camel.apache.org/schema/blueprint/cxf}} there is a problem with {{endpointName}} and {{serviceName}} parameters. This:
> {code:xml}
> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
>            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>            xmlns:cxf="http://camel.apache.org/schema/blueprint/cxf">
>     <cxf:cxfEndpoint id="fooEndpoint"
>                      address="${endpoint.url}"
>                      serviceClass="com.foo.MyService"
>                      endpointName="foo:MyService"
>                      continuationTimeout="0"
>                      xmlns:foo="http://abc.def">
>         ...
>     </cxf:cxfEndpoint>
> </blueprint>
> {code}
> throws an exception:
> {code}
> Caused by: org.osgi.service.blueprint.container.ComponentDefinitionException: Error setting property: PropertyDescriptor <name: endpointName, getter: null, setter: [class org.apache.camel.component.cxf.CxfEndpoint.setEndpointName(class java.lang.String)]
> 	at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:818) ~[?:?]
> ...
> Caused by: java.lang.Exception: Unable to convert value {http://abc.def}MyService to type java.lang.String
> 	at org.apache.aries.blueprint.container.AggregateConverter.convert(AggregateConverter.java:187) ~[?:?]
> {code}
> I suspect the problem is with a {{org.apache.camel.component.cxf.CxfEndpoint#setEndpointName}} and {{org.apache.camel.component.cxf.CxfEndpoint#setServiceName}} methods - which previously accepted {{QName}}, but now accept {{String}}, and this change was not reflected in {{org.apache.camel.component.cxf.blueprint.EndpointDefinitionParser}}
> I'm attaching a project to reproduce the behavior -  [^camel-reproducer-blueprint-cxf.zip] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)