Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15348

cxfEndpoint blueprint namespace handler - problem with QName vs String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.1
    • 3.4.3, 3.5.0
    • camel-cxf, karaf, osgi
    • None
    • Karaf 4.2.9
      Camel 3.4.1
      CXF 3.3.6

    • Unknown

    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:

      <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>
      

      throws an exception:

      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) ~[?:?]
      

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            rastislav.papp Rastislav Papp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: