Uploaded image for project: 'Muse'
  1. Muse
  2. MUSE-56

Nullpointer in SimpleSoapClient when sending empty bodies

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 2.0.0 M2
    • Fix Version/s: 2.0.0 M2
    • Component/s: None
    • Labels:
      None
    • Environment:
      any

      Description

      When I send empty bodies using SimpleSoapClient, I get a null pointer exception:

      java.lang.NullPointerException
      at org.apache.muse.ws.addressing.soap.SimpleSoapClient.createMessage(SimpleSoapClient.java:117)
      at org.apache.muse.ws.addressing.soap.SimpleSoapClient.send(SimpleSoapClient.java:213)

      The following is a diff of the fix, I have attached source as well:

      Index: SimpleSoapClient.java
      ===================================================================
      RCS file: /cvs/cowbell/muse-wsa-soap/src/org/apache/muse/ws/addressing/soap/SimpleSoapClient.java,v
      retrieving revision 1.4
      diff -u -r1.4 SimpleSoapClient.java
      — SimpleSoapClient.java 2 Aug 2006 17:34:31 -0000 1.4
      +++ SimpleSoapClient.java 14 Aug 2006 22:54:38 -0000
      @@ -114,10 +114,14 @@

      for (int n = 0; n < bodyElements.length; ++n)
      {
      + if(bodyElements[n] != null)
      +

      { + if (bodyElements[n].getOwnerDocument() != doc) bodyElements[n] = (Element)doc.importNode(bodyElements[n], true); bodyXML.appendChild(bodyElements[n]); + }

      }

      return soapXML;

        Attachments

          Activity

            People

            • Assignee:
              danj Dan Jemiolo
              Reporter:
              fakhar Mohammad Fakhar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: