-
Suggestion
-
Resolution: Won't Fix
-
None
-
None
-
Jira 3.11 Entrprise running on Windows 3003 R2, .Net 2.0
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
I get the following error when I try to recieve a response that should be formatted as a RemoteWorklog:
System.InvalidCastException was caught
Message="Unable to cast object of type 'System.Xml.XmlNode[]' to type 'StarNet.Jira.Library.Jira.RemoteWorklog'."
Source="StarNet.Jira.Library"
StackTrace:
at StarNet.Jira.Library.Jira.JiraSoapServiceService.addWorklogAndAutoAdjustRemainingEstimate(String in0, String in1, RemoteWorklog in2)
at StarNet.Jira.Library.Service.AddWorkLogToIssue(String issueKey, RemoteWorklog workLog)
After closer analysis the main issue here is that the SOAP response has the following definition for the Worklog namespace:
xsi:type="ns3:IssueServiceImpl$RemoteWorklogImpl"
But in .Net the '$' character is not valid in xsi type descriptions.
To get around this I have re-written the RPC for our live server to return a Long value as the RemoteWorklog.id.
This is generally more practiacl anyway, though I would really like to get the whole object for the sake continuity as I cannot be sure how the Service will modify the Worklog after updates.
I have attached the diff file for anyone interested in similar functionality. (there are a few other features in this diff file for your pleasure also!)
*Please Note that these changes will break the standard test scripts.
further structural issues:
RemoteWorklog object has readonly properties, this doesn't directly affect how the object is comsumed at the client end but with a severe lack of documentation it is impossible to know which fields are expected to be changed when the object is passed as a parameter to the Soap Service.
- is related to
-
JRASERVER-13801 Call method addWorklogAndAutoAdjustRemainingEstimate, the soap server reponse with this type IssueServiceImpl$RemoteWorklogImpl
- Closed
- relates to
-
JRACLOUD-13698 RemoteWorklog doesn not deserialize in .Net
- Closed