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

Missing setter or constructor-argument for elementNameStrategyRef in SoapJaxbDataFormat

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0, 2.7.3
    • 2.8.1, 2.9.0
    • camel-soap
    • None
    • Novice

    Description

      Because the variable "elementNameStrategyRef" in org.apache.camel.dataformat.soap.SoapJaxbDataFormat can't be set, it is always null. Therefore declaring the data format with spring-dsl leads to an automatic fallback to the default strategy "TypeNameStrategy" in org.apache.camel.dataformat.soap.SoapJaxbDataFormat.checkElementNameStrategy(Exchange exchange). This further leads to wrong results when marshalling.

      So the following declararion does not work correctly:
      ...
      <bean id="myStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy">
      <constructor-arg value="my.package.MyServiceInterface"/>
      <constructor-arg value="true"/>
      </bean>
      ...
      <camelContext xmlns="http://camel.apache.org/schema/spring">
      ...
      <dataFormats>
      <soapjaxb id="mySoap"
      contextPath="my.package"
      elementNameStrategyRef="myStrategy"/>
      </dataFormats>
      ...
      <route>
      <from uri="cxf:/MyService?serviceClass=my.package.MyServiceInterface" />
      ...
      <convertBodyTo type="my.package.MyType"/>
      <marshal ref="mySoap"/>
      ...

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            njiang Willem Jiang
            ojelinski Oliver Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment