Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-1421

confusion between local name and qualified name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2 Beta
    • None
    • SAAJ
    • None

    Description

      in the public Element createElementNS(String namespaceURI, String qualifiedName) method of SOAPDocumentImpl

      you have the following in the else part.

      me = new MessageElement(namespaceURI, qualifiedName);

      if you have a look at the constructor code in MessageElement then you will find that it is for localPart, and not for qualifiedName.

      the else part should be something like this.

      String prefix = null;
      String localPart = qualifiedName;
      final int index = qualifiedName.indexOf(":");
      if(index != -1)
      {
      prefix = qualifiedName.substring(0,index);
      localPart = qualifiedName.substring(index + 1);
      }
      if (prefix == null)
      {
      me = new MessageElement(namespaceURI, qualifiedName);
      }
      else
      {
      me = new MessageElement(localPart, prefix, namespaceURI);
      }

      even the if part of this method should be using the localPart only

      Attachments

        1. Test.java
          1 kB
          Ashutosh Shahi
        2. patch_1421.txt
          1 kB
          Ashutosh Shahi

        Activity

          People

            Unassigned Unassigned
            nishant Nishant Bangarwa
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: