You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Dan Jemiolo (JIRA)" <ji...@apache.org> on 2006/08/16 18:46:14 UTC
[jira] Closed: (MUSE-56) Nullpointer in SimpleSoapClient when
sending empty bodies
[ http://issues.apache.org/jira/browse/MUSE-56?page=all ]
Dan Jemiolo closed MUSE-56.
---------------------------
Fix Version/s: 2.0.0 M2
Resolution: Invalid
If you pass a null array to send( ) instead of an array of null pointers, you will get the desired behavior (an empty SOAP body). see the first few lines of send( ) - it checks for a null array and uses an empty one in its place so that the for loop works.
> Nullpointer in SimpleSoapClient when sending empty bodies
> ---------------------------------------------------------
>
> Key: MUSE-56
> URL: http://issues.apache.org/jira/browse/MUSE-56
> Project: Muse
> Issue Type: Bug
> Affects Versions: 2.0.0 M2
> Environment: any
> Reporter: Mohammad Fakhar
> Assigned To: Dan Jemiolo
> Fix For: 2.0.0 M2
>
> Attachments: SimpleSoapClient.java
>
>
> 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;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org