Hi,
Please help to insert hours in Work field while creating task. I am facing issue in below code snippet:
$thrs = $this->input->post('hrs');
$type = new stdClass();
$type->FieldName = "Work";
$tduration = array ( "Value" => $thrs);
$type->Value = new SoapVar($tduration, SOAP_ENC_OBJECT, "Duration","http://www.w3.org/2001/XMLSchema");
its giving below error:
<b>Fatal error</b>: Uncaught SoapFault exception: [a:DeserializationFailed] The formatter threw an exception
while trying to deserialize the message: There was an error while trying to deserialize parameter http
://clarizen.com/api:request. The InnerException message was 'Error in line 2 position 998. Element 'http
://clarizen.com/api:Value' contains data from a type that maps to the name 'http://www.w3.org/2001/XMLSchema
:Duration'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver
or add the type corresponding to 'Duration' to the list of known types - for example, by using the KnownTypeAttribute
attribute or by adding it to the list of known types passed to DataContractSerializer.'
Thanks,
Shivani