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

RuntimeCamelException "Ambiguous Parameter Mapping" must not be thrown, if there are parameters of the same type but with different QNames in ServiceInterfaceStrategy

    XMLWordPrintableJSON

Details

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

    Description

      In different WebMethods I have parameters of the same type, but with different QNames. The following if-clause (in ServiceInterfaceStrategy.analyzeServiceInterface(..)) throws an exeption in these cases (thrown if NOT QNameOfMethod1 equals QNameOfMethod2), but it should on the contrary throw an exception if the QNames ARE equal:

      if (inTypeNameToQName.containsKey(ti.getTypeName())
      && (!(ti.getTypeName().equals("javax.xml.ws.Holder")))
      && (!(inTypeNameToQName.get(ti.getTypeName()).equals(ti.getElName()))))

      { throw new RuntimeCamelException("Ambiguous parameter mapping. The type [ " + ti.getTypeName() + " ] is already mapped to a QName in this context."); }

      The "NOT" must be deleted:

      ...
      && (inTypeNameToQName.get(ti.getTypeName()).equals(ti.getElName())))
      ...

      Attachments

        1. camel-4480-trunk.patch
          12 kB
          Rich Newcomb

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: