ServiceMix
  1. ServiceMix
  2. SM-1835

whitespace interfering with ResolvedEndpoint.resolveEndpoint()

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.2.4, 3.3.1
    • Component/s: servicemix-common
    • Labels:
      None

      Description

      The code snippet below is from org.apache.servicemix.common.ResolvedEndpoint :

      public static ServiceEndpoint resolveEndpoint(DocumentFragment epr, QName elementName, QName serviceName, String uriPrefix) {
      if (epr.getChildNodes().getLength() == 1) {
      Node child = epr.getFirstChild();

      The check for the number of child nodes should be checking for the number of element children as opposed to any child like a text node. The way it is now will reject an endpoint reference that has whitespace preceding it.

      For example:

      DocumentFragment:
      \n
      <wsa:EndpointReference ...>
      \t<wsa:Address>...</wsa:Address>
      </wsa:EndpointReference>

      The work around is to ensure that whitespace is stripped from the EPR prior to it entering SMX.

      1. test-patch.txt
        3 kB
        Mark Ford
      2. patchfile.txt
        3 kB
        Mark Ford

        Activity

          People

          • Assignee:
            Freeman Fang
            Reporter:
            Mark Ford
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development