I'm using the Atlassian .NET SDK to extract data from Jira OnDemand. I need to get more than 100 issues for a particular project. My problem is that if I set the maxIssues property to higher than 67
, I get a CommunicationExceptions
saying:
"Error in deserializing body of reply message for operation 'getIssuesFromJqlSearch'."
Any ideas how I can fix this?
var jiraConn = new Jira(url, user, password);
IEnumerable<Atlassian.Jira.Issue> jiraIssues =
jiraConn.GetIssuesFromJql("project = MAGNAMES", 67);
foreach (var i in jiraIssues)
{
MessageBox.Show(i.Key + " " + i.Summary);
}
Server stack trace: at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest) at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters) at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Atlassian.Jira.Remote.JiraSoapService.getIssuesFromJqlSearch(getIssuesFromJqlSearchRequest request) at Atlassian.Jira.Remote.JiraSoapServiceClient.Atlassian.Jira.Remote.JiraSoapService.getIssuesFromJqlSearch(getIssuesFromJqlSearchRequest request) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Remote\JiraSoapService.cs:line 9445 at Atlassian.Jira.Remote.JiraSoapServiceClient.getIssuesFromJqlSearch(String in0, String in1, Int32 in2) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Remote\JiraSoapService.cs:line 9454 at Atlassian.Jira.Remote.JiraSoapServiceClientWrapper.GetIssuesFromJqlSearch(String token, String jqlSearch, Int32 maxNumResults) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Remote\JiraSoapServiceClientWrapper.cs:line 39 at Atlassian.Jira.Jira.<>c__DisplayClass8.<GetIssuesFromJql>b__7(String t) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 203 at Atlassian.Jira.Jira.<>c__DisplayClass37.<WithToken>b__36(String t) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 396 at Atlassian.Jira.Jira.<>c__DisplayClass3d`1.b__3c(String token, IJiraSoapServiceClient client) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 427 at Atlassian.Jira.Jira.WithToken[TResult](Func`3 function) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 446 at Atlassian.Jira.Jira.WithToken[TResult](Func`2 function) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 427 at Atlassian.Jira.Jira.WithToken(Action`1 action) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 394 at Atlassian.Jira.Jira.GetIssuesFromJql(String jql, Nullable`1 maxIssues) in c:\dev\atlassian.net-sdk\Atlassian.Jira\Jira.cs:line 201 at TicketReportService.ReportService.StartService() in c:\OSSTicketReportApp\TicketReportWebApp\TicketReportService\ReportService.cs:line 92 at TicketReportService.Program.Main() in c:\OSSTicketReportApp\TicketReportWebApp\TicketReportService\Program.cs:line 24 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
Make sure there isn't a particular problem with Issue number 68 that is preventing
JiraSoapService
from correctly deserializing the issue. Perhaps there is something in a comment or other WYSIWYG field that is breaking the deserializer.