Issue Details (XML | Word | Printable)

Key: JRA-6821
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Mark Chaimungkalanont [Atlassian]
Reporter: Ubisoft MTL Jira Administrators
Votes: 1
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
JIRA

getIssue returning data incompatible with MS .NET (complex objects )

Created: 30/May/05 12:56 PM   Updated: 30/Jul/06 07:35 PM
Component/s: Remote API (SOAP & XML-RPC)
Affects Version/s: None
Fix Version/s: 3.2.1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive CustomFieldError.zip (81 kB)
2. Text File jira-host.2005-05-31.log (6 kB)
3. Zip Archive JiraSoapClient.zip (56 kB)
4. XML File request_withCustomFields.xml (2 kB)
5. XML File response_withCustomFields.xml (3 kB)
6. Text File stack_trace.txt (2 kB)

Environment:
.NET
Jira 3.2
Soap
Issue Links:
Reference
 

Participants: Anton Mazkovoi [Atlassian], Jeff Turner [Atlassian], Mark Chaimungkalanont [Atlassian], Sebastian J and Ubisoft MTL Jira Administrators
Since last comment: 3 years, 24 weeks, 4 days ago
Resolution Date: 16/Jun/05 12:05 AM
Labels:


 Description  « Hide
if an issue is using custom fields, MS .NET xml parser will crash giving this error message Using V2:

Below the error message returned:

<b>The specified type was not recognized: name='string', namespace='http://schemas.xmlsoap.org/soap/encoding/', at <values xmlns=''>. </b>
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The specified type was not recognized: name='string', namespace='http://schemas.xmlsoap.org/soap/encoding/', at <values xmlns=''>.
Source Error:
Line 184: [return: System.Xml.Serialization.SoapElementAttribute("getIssueReturn")]
Line 185: public RemoteIssue getIssue(string in0, string in1) {
Line 186: object[] results = this.Invoke("getIssue", new object[] { Line 187: in0, Line 188: in1});



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Mark Chaimungkalanont [Atlassian] added a comment - 30/May/05 06:54 PM
We've had people successfully create issues with custom fields before in .Net, so I'm pretty sure this would be possible.

Do you know if the SOAP packet is getting to JIRA at all or is the error occurring in the .Net realm before the SOAP packet is transmitted?

Cheers

Mark C


Ubisoft MTL Jira Administrators added a comment - 31/May/05 07:05 AM
What we know:
1. Data can be shared between systems, all methods successfully returned data .
2. getIssue will generate errors, ONLY with .Net.
So far, I've been using Python for the same issue and it worked.
3 getIssue generate an error with .Net when the issue is having a custom field.
4. getIssue will generate error when the data is parsed by .Net.
Plus, I commented out the custom issue generation in jira (RPC-SOAP files) and it worked.

So, looks like there is some incompatibilities using webservices between Jira and .NET.
.Net seems to have an issue trying to parse a custom field.

Maybe there is something else, but that's a start since the same issue without custom field did complete the process loop.


Sebastian J added a comment - 01/Jun/05 12:42 PM
oops, is it possible to delete those comments? I thought they were part of the attachments.

Have a look at the files I attached. They should answer your questions Mark.

Here is why Ubisoft admins are having problems with getIssue:

The Issues are created, but the exception that is thrown means that there is no 'returnedIssue' from the createIssue(token, issue) method. As a result, the issue Key is NOT set. Thus, you cannot use getIssue(token, issueKey) to retrieve an issue, because the issue has no key (even though the key does appear from a user standpoint in Jira). Trying to use that key results in another error.


Ubisoft MTL Jira Administrators added a comment - 01/Jun/05 02:12 PM
Our actual problem is to get an Issue FROM jira TO .net that has custom fields.
We were able to create and delete simple issues (no issues and custom fields)

But looks like there is two problems here. The getIssue and the createIssue with custom fields.

<b>Right now, we are trying to display a Jira Issue in Microsoft asp.NET web page using webservices.</b> but there is a major problem when there is custom fields.


Sebastian J added a comment - 01/Jun/05 02:22 PM
"Our actual problem is to get an Issue FROM jira TO .net that has custom fields."

Right, but there is only one problem.

getIssue() works just fine unless there are custom fields, it fails as a result of the error you first mentioned.


Mark Chaimungkalanont [Atlassian] added a comment - 02/Jun/05 01:20 AM
It seems like the "soapenc:string" causes .Net some grief. I don't understand exactly why this is a problem only when there are custom fields but not for normal issue creation...

I've raised an issue that will hopefully fix this JRA-6868

I don't know if there's a lot that can be done until we try this.


Mark Chaimungkalanont [Atlassian] added a comment - 02/Jun/05 02:02 AM
It might also be worth while if you guys have some in house .Net expertise to see if they can help you out with .Net parsing XML responses with soapenc:string. We don't have any expertise in this area so we can't give you a real workaround.

Sebastian J added a comment - 03/Jun/05 08:57 AM
Here's 2 things I just tried:

Adding custom field values to normal issues (Manual or Soap created). Soap retrieval fails (same error) (but then when you clear the custom values it works again)

Creating issues with custom fields (using soap). Clearing the custom field value. Retrieval fails (same error).

so I'm not sure if it's related to the "missing issue key" I was talking about before. It seems that (in .Net anyway) you can't retrieve issues that have custom fields because of the xml error. and that it results because they have custom fields.


Ubisoft MTL Jira Administrators added a comment - 03/Jun/05 10:36 AM
I'm trying to find information about this subject, but looks like there is not much on the web.

What I know so far is that there is different way to process webservices complex objects and Microsoft and Java are using different ones.... It is supposed to be a known issue, but as I said, I can't find this information on the web.

What now?

Here are the most interesting articles I have found so far:

http://webservices.xml.com/pub/a/ws/2003/09/30/integrating.html
http://www.builderau.com.au/architect/webservices/0,39024590,20277099,00.htm
http://www.extremetech.com/article2/0,1558,1152775,00.asp

Hope this helps finding a solution ?


Jeff Turner [Atlassian] added a comment - 06/Jun/05 08:28 PM
An overview and pointer to an interesting article on the general problem:

http://rmh.blogs.com/weblog/2005/06/jaxrpc_is_bad_b.html


Anton Mazkovoi [Atlassian] added a comment - 06/Jun/05 10:09 PM
As we have very little experience with .NET internally, would you be able to write a sample .NET program that replicates the problem and attach it here. Hopefully using this program we can try to work out a fix for the situation.

Thanks,
Anton


Sebastian J added a comment - 07/Jun/05 01:27 PM
The asp project attached by Ubisoft didn't work for me. I'm attaching a simple windows application. You shouldn't have to set up anything for it to work.

1. double click on CustomField.sln to open the project (or CustomField.csproj )
2. click on JiraInterface.cs to look at the code
3. Run the project (you'll see it working without custom fields)
4. check to see the issue showed up (see url below)
5. change USE_CUSTOM_FIELD to true
6. see that it doesn't work (there is an exception when creating as well as discussed, but it's caught to show the retrieval failure.. take note of the output to the debug console)

– Each time you run the program, one issue will be created here:
http://jira.atlassian.com/secure/IssueNavigator.jspa?reset=true&mode=hide&pid=10420


Sebastian J added a comment - 07/Jun/05 02:39 PM
just tried the new ( 1.5.3) RPC plugin..
when retrieving issues that have custom fields, the error also occurs using getIssuesFromFilter(token, filterID)

Mark Chaimungkalanont [Atlassian] added a comment - 14/Jun/05 08:14 PM
Guys,

I've implemented a fix for JIRA 3.2.1. Can you guys have a try on this and see how you go? The soapenc:string should now all be xsd:string.

Sebastian - the fix is in JIRA itself and not the RPC plugin, so you'll have to upgrade JIRA.

Let us know how you go & sorry for the hassle.

Cheers

Mark C


Sebastian J added a comment - 15/Jun/05 07:47 AM
It works great!

thanks


Mark Chaimungkalanont [Atlassian] added a comment - 16/Jun/05 12:04 AM
Excellent!