Tuesday, October 7, 2008

Jira/Flex SOAP Webservice Problem

If you have been following my latest posts about Klok, you know that I am evaluating Jira as my tool to track bugs. I thought it would be cool to have an area of the Klok website show some statistics regarding the open defects as well as a way to quickly submit a defect. I figured this would be easy to implement but it is taking longer than I thought.

If you are developer the solution is shown below. 

So I enabled the SOAP service and figured it would be simple to hook up Flex to the Jira SOAP Webservice. Using the tools to generate all the necessary code in FlexBuilder I assumed I would just implement the calls to get the data and I would be off an running. Unfortunately that was not the case. 

I started with trying to just list the projects from Jira and was confused when the only data coming back was the project description. After about 5 painful hours of digging into how the generated code works. I noticed that there was code in the Base[servicename]Schema that defines the complex type for RemoteProject... which defined the sequence of properties in a different order that they are being returned by the Jira SOAP webservice. 

If you change the order in the definition to match the order in which they are being returned all seems to work.

After fighting this for so long I decided I would submit the defect to the Flex bug site only to find out that it was already there. UGH!

3 comments:

Anonymous said...

I reordered my parameters in the schema file as well,but I now get a "TypeError: Error #1009: Cannot access a property or method of a null object reference." it doesn't seem to like "tns1:AbstractNamedRemoteEntity", either.

Can you post your schema file?

Keith Grennan said...

I ran into this issue today. Annoying.

Vote for the issue if you want Adobe to fix it. They listen to votes.

Maggie said...

How do you change the base schema file?