<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Requirement_Update using only some properties (SOAP) (Thread)</title><description>&#xD;
&#xD;
&#xD;
Hello,  I was wondering if it was possible to update a requirement using only a subset of the available properties?  For example, when I want to update only the description of a requirement, I thought using the following SOAP envelope would work.                                                    My new description                   3351                                      Unfortunately it doesn't. It seems the server wants me to send all the nullable properties set to nil. Here is the complete response I get (sorry, in French)         a:InternalServiceFault  Un objet qui autorise la valeur Null doit posséder une valeur.       Un objet qui autorise la valeur Null doit posséder une valeur.      à System.Nullable`1.get_Value()    à Inflectra.SpiraTest.Web.Services.v4_0.ImportExport.Requirement_Update(RemoteRequirement remoteRequirement)    à SyncInvokeRequirement_Update(Object , Object[] , Object[] )    à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[] outputs)    à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc rpc)    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc rpc)    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc rpc)    à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  System.InvalidOperationException         The main message   in English would probably be:     Nullable object must have a value.     Is there no way around this? It would be very convenient if the server could be a little bit smarter and update only the properties which I care about, and leave the other ones unmodified. This is also the way that Requirement_Create2 works.  Thanks in advance for any help / tips! &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
</description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/issues-questions/888.aspx</link><item><guid isPermaLink="false">threadId=888</guid><author>Maxim Cournoyer (maxim.cournoyer@averna.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">soap</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> api</category><title>Requirement_Update using only some properties (SOAP)</title><description>&#xD;
&#xD;
&#xD;
Hello,  I was wondering if it was possible to update a requirement using only a subset of the available properties?  For example, when I want to update only the description of a requirement, I thought using the following SOAP envelope would work.                                                    My new description                   3351                                      Unfortunately it doesn't. It seems the server wants me to send all the nullable properties set to nil. Here is the complete response I get (sorry, in French)         a:InternalServiceFault  Un objet qui autorise la valeur Null doit posséder une valeur.       Un objet qui autorise la valeur Null doit posséder une valeur.      à System.Nullable`1.get_Value()    à Inflectra.SpiraTest.Web.Services.v4_0.ImportExport.Requirement_Update(RemoteRequirement remoteRequirement)    à SyncInvokeRequirement_Update(Object , Object[] , Object[] )    à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[] outputs)    à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc rpc)    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc rpc)    à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc rpc)    à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)  System.InvalidOperationException         The main message   in English would probably be:     Nullable object must have a value.     Is there no way around this? It would be very convenient if the server could be a little bit smarter and update only the properties which I care about, and leave the other ones unmodified. This is also the way that Requirement_Create2 works.  Thanks in advance for any help / tips! &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
</description><pubDate>Thu, 17 Apr 2014 15:36:57 -0400</pubDate><a10:updated>2014-05-10T17:17:50-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/888.aspx</link></item><item><guid isPermaLink="false">messageId=1620</guid><author>David J (adam.sandman+support@inflectra.com)</author><title> &#xD;
&#xD;
&#xD;
Hi Maxim  For concurrency reasons you need to do the following:   Do a Requirement_Retrieve(r</title><description> &#xD;
&#xD;
&#xD;
Hi Maxim  For concurrency reasons you need to do the following:   Do a Requirement_Retrieve(requirementId) first to get the existing RemoteRequirement object  Update the fields you want to change  Then use Requirement_Update(remoteRequirement) to send the updated data back.   Regards  Adam </description><pubDate>Mon, 21 Apr 2014 14:01:41 -0400</pubDate><a10:updated>2014-04-21T14:01:41-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/888.aspx#reply1620</link></item><item><guid isPermaLink="false">messageId=1642</guid><author>Maxim Cournoyer (maxim.cournoyer@averna.com)</author><title>&#xD;
&#xD;
&#xD;
&#xD;
 Hello Adam, and thank you for your&#xD;
reply.  As per your recommendations I retrieved a compl</title><description>&#xD;
&#xD;
&#xD;
&#xD;
 Hello Adam, and thank you for your&#xD;
reply.  As per your recommendations I retrieved a complete copy&#xD;
of the remoteRequirement by using the Requirement_Retrieve command. I&#xD;
then parsed the returned XML to get the desired single requirement&#xD;
element, modified it and tried to update it on the server using&#xD;
Requirement_Update.  It worked, but only after I adapted the&#xD;
following: &#xD;
     The XML&#xD;
	namespace (xmlns) of the returned requirement object is set to&#xD;
	a="http://schemas.datacontract.org/2004/07/Inflectra.SpiraTest.Web.Services.v4_0.DataObjects".&#xD;
	For some reasons, I needed to set it instead to&#xD;
	"https://www.inflectra.com/SpiraTest/Services/v4.0/" for&#xD;
	the server to accept it (else I would get "The object reference&#xD;
	is not set to an instance of an object"). &#xD;
	       The&#xD;
	element node's name for the requirement object was&#xD;
	"RemoteRequirement". However I would also get "The&#xD;
	object reference is not set to an instance of an object" before&#xD;
	I changed the element node's name to "remoteRequirement". &#xD;
&#xD;
 Here is an excerpt of the original SOAP response containing the&#xD;
requirement of interest, as returned by the server. Notice the&#xD;
namespace of the RemoteRequirement node and also the capitalized R in&#xD;
its name. &#xD;
      &#xD;
     &#xD;
        &#xD;
           &#xD;
              &#xD;
                 &#xD;
&#xD;
 1   &#xD;
&#xD;
 2014-03-26T20:09:58.233   &#xD;
                    &#xD;
	   [ . . . ]   &#xD;
&#xD;
 &#xD;
 After the changes discussed above, the functional&#xD;
Requirement_Update SOAP message looks like this: &#xD;
      &#xD;
        &#xD;
           &#xD;
              &#xD;
&#xD;
 1   &#xD;
&#xD;
 2014-04-22T19:01:22.323   &#xD;
                 &#xD;
	[ . . . ]   &#xD;
&#xD;
 &#xD;
 Did I just find some issues in the SOAP-WSDL message returned by&#xD;
the SpiraTeam server or I am doing something wrong? &#xD;
&#xD;
&#xD;
 Regards, &#xD;
&#xD;
 Maxim &#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
</description><pubDate>Sat, 10 May 2014 17:17:50 -0400</pubDate><a10:updated>2014-05-10T17:17:50-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/888.aspx#reply1642</link></item></channel></rss>