This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 282211 - create Webservice API
Summary: create Webservice API
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Frank Becker CLA
QA Contact:
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
Depends on: 308737 310053 314744
Blocks: 236747 311966
  Show dependency tree
 
Reported: 2009-07-01 16:16 EDT by Frank Becker CLA
Modified: 2011-02-21 14:00 EST (History)
3 users (show)

See Also:


Attachments
POC (35.76 KB, patch)
2009-07-18 18:24 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (9.51 KB, application/octet-stream)
2009-07-18 18:24 EDT, Frank Becker CLA
no flags Details
next version of POC (43.39 KB, patch)
2009-10-09 17:16 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (53.73 KB, application/octet-stream)
2009-10-09 17:17 EDT, Frank Becker CLA
no flags Details
commited patch V1 (34.15 KB, patch)
2010-04-10 16:30 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (24.86 KB, application/octet-stream)
2010-04-10 16:30 EDT, Frank Becker CLA
no flags Details
patch V2 (20.34 KB, patch)
2010-04-19 16:55 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (39.92 KB, application/octet-stream)
2010-04-19 16:55 EDT, Frank Becker CLA
no flags Details
first implementation (21.29 KB, patch)
2010-04-21 17:12 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (37.92 KB, application/octet-stream)
2010-04-21 17:12 EDT, Frank Becker CLA
no flags Details
add IProgressMonitor to methods (20.91 KB, patch)
2010-07-16 15:12 EDT, Frank Becker CLA
eclipse: review?
Details | Diff
mylyn/context/zip (6.41 KB, application/octet-stream)
2010-07-16 15:12 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Becker CLA 2009-07-01 16:16:04 EDT
create the new API for use xmlrpc instead of ctype=xml
Comment 1 Steffen Pingel CLA 2009-07-01 17:06:00 EDT
Let's touch base how to best approach this before we start working on it. We already use XML-RPC to connect to Trac and it could make sense to extract a common layer that could be shared with Bugzilla.
Comment 2 Frank Becker CLA 2009-07-01 17:48:29 EDT
(In reply to comment #1)
> Let's touch base how to best approach this before we start working on it. We
> already use XML-RPC to connect to Trac and it could make sense to extract a
> common layer that could be shared with Bugzilla.
> 

OK, but my first priority is actual to create the now needet Bugzilla Calls

Comment 3 Frank Becker CLA 2009-07-18 18:24:18 EDT
Created attachment 141945 [details]
POC

Steffen,
Rob

here is what I implement until now.

For Bugzilla, please look into https://bugzilla.mozilla.org/show_bug.cgi?id=504937

When we get this from Bugzilla we can implement the following
- control if an user can request/set an flag
- default QA and assigned to
- Custom workflow
- Custom Fields That Only Appear When Another Field Has a Particular Value
- Custom Fields Whose List of Values Change Depending on the Value of Another Field

We should look what we can share between Trac and Bugzilla for the real implementation.

Thoughts?
Comment 4 Frank Becker CLA 2009-07-18 18:24:21 EDT
Created attachment 141946 [details]
mylyn/context/zip
Comment 5 Robert Elves CLA 2009-08-05 19:50:38 EDT
Wow this is really awesome Frank...and looks like you're making progress on 504937 with bugzilla.org which is excellent! I'll talk with Steffen and we'll post a high level follow up on how we see the overlap between connectors being abstracted.
Comment 6 Frank Becker CLA 2009-10-09 17:16:56 EDT
Created attachment 149279 [details]
next version of POC

Steffen,
Rob,

can you please look if this is the right direction. Your comments are welcome.
Comment 7 Frank Becker CLA 2009-10-09 17:17:06 EDT
Created attachment 149280 [details]
mylyn/context/zip
Comment 8 Steffen Pingel CLA 2010-04-10 15:54:57 EDT
Frank, I'll try to make some progress on the common XML-RPC access layer soon. You can basically assume that the XML-RPC client implementation will provide a method similar to this:

 public Object call(IProgressMonitor monitor, String method, Object... parameters) throws XmlRpcException;
Comment 9 Frank Becker CLA 2010-04-10 16:30:46 EDT
Created attachment 164474 [details]
commited patch V1

Because all is new I commit this.

If you want run the junit test please change

1) TEST_REPO to your Bugzilla 3.6rc1 or greater
2) change AuthenticationType.REPOSITORY
3) you must change or remove AuthenticationType.HTTP
Comment 10 Frank Becker CLA 2010-04-10 16:30:50 EDT
Created attachment 164475 [details]
mylyn/context/zip
Comment 11 Steffen Pingel CLA 2010-04-10 17:31:05 EDT
Frank, the commited changes break the weekly build since the referenced org.apache.xmlrpc library is currently not distributed from the main update site. Generally, we have to be careful with adding dependencies to tasks.core since it affects re-usability of the tasks framework. Please always get me or Rob to review before committing changes to the manifest of tasks framework plug-ins. 

We'll need to revert the changes in tasks.core and create a new plug-in that provides a generic the XML-RPC layer. I'll try to get around to this in the next couple of days to unblock your progress.
Comment 12 Frank Becker CLA 2010-04-11 01:29:49 EDT
(In reply to comment #11)
> Frank, the commited changes break the weekly build since the referenced
> org.apache.xmlrpc library is currently not distributed from the main update
> site. Generally, we have to be careful with adding dependencies to tasks.core
> since it affects re-usability of the tasks framework. Please always get me or
> Rob to review before committing changes to the manifest of tasks framework
> plug-ins.

Sorry I did not know this. The next time I will give it to review.
> 
> We'll need to revert the changes in tasks.core and create a new plug-in that
> provides a generic the XML-RPC layer. I'll try to get around to this in the next
> couple of days to unblock your progress.
Comment 13 Frank Becker CLA 2010-04-11 15:51:30 EDT
(In reply to comment #11)
> Frank, the commited changes break the weekly build since the referenced
> org.apache.xmlrpc library is currently not distributed from the main update
> site. Generally, we have to be careful with adding dependencies to tasks.core
> since it affects re-usability of the tasks framework. Please always get me or
> Rob to review before committing changes to the manifest of tasks framework
> plug-ins.
> 
> We'll need to revert the changes in tasks.core and create a new plug-in that
> provides a generic the XML-RPC layer. I'll try to get around to this in the next
> couple of days to unblock your progress.

commited version is now reverted!
Comment 14 Steffen Pingel CLA 2010-04-12 00:10:34 EDT
No worries and thanks for fixing it. I have made some progress on bug 308737 and hope that I'll be able to check in a first version of the new org.eclipse.mylyn.commons.xmlrpc plug-in tomorrow.
Comment 15 Frank Becker CLA 2010-04-19 16:55:34 EDT
Created attachment 165350 [details]
patch V2

Here the next version.

This is based on bug# 308737. The patch "needed changes" is included.
Comment 16 Frank Becker CLA 2010-04-19 16:55:41 EDT
Created attachment 165351 [details]
mylyn/context/zip
Comment 17 Steffen Pingel CLA 2010-04-19 20:27:46 EDT
This looks good. I have two suggestions: 
* Create a Bugzilla specific subclass of XmlRpcOperation. I think it's likely that some behavior will be customized in the end, e.g. exception conversion. I believe BugzillaClient generally throws CoreException so BugzillaXmlRpcClient should maybe follow that same design. Rob?
* Something needs to be done about exceptions resulting out of casts:
 if (response != null) {
			result = (Object[]) response.get(XML_RESPONSE_IDS);
 }
Either add a "safeCast()" method that catches ClassCastExceptions or do all processing within operation.execute() and we add general handling in the default operation implementation which we should probably have anyways.
Comment 18 Frank Becker CLA 2010-04-21 17:12:32 EDT
Created attachment 165656 [details]
first implementation

This is what I have commited.
Comment 19 Frank Becker CLA 2010-04-21 17:12:39 EDT
Created attachment 165657 [details]
mylyn/context/zip
Comment 20 Steffen Pingel CLA 2010-07-12 18:00:44 EDT
It looks like there are several calls in BugzillaXmlRpcClient that use NullProgressMonitor. That is a problem as these operations could block the UI thread. Frank, can you look into that?
Comment 21 Frank Becker CLA 2010-07-16 15:12:49 EDT
Created attachment 174530 [details]
add IProgressMonitor to methods

(In reply to comment #20)
> It looks like there are several calls in BugzillaXmlRpcClient that use
> NullProgressMonitor. That is a problem as these operations could block the UI
> thread. Frank, can you look into that?

please verify.
Comment 22 Frank Becker CLA 2010-07-16 15:12:52 EDT
Created attachment 174531 [details]
mylyn/context/zip
Comment 23 Frank Becker CLA 2010-08-12 15:05:31 EDT
I commit the latest patch.

Steffen, can you please verify.

Now I work on bug# 314744.
Comment 24 Frank Becker CLA 2011-02-20 15:34:32 EST
(In reply to comment #23)
> I commit the latest patch.
> 
> Steffen, can you please verify.
> 
> Now I work on bug# 314744.

Steffen,

can I close this bug? Or did you found some more things to do?
Comment 25 Steffen Pingel CLA 2011-02-21 14:00:07 EST
Yes, we can close this. I haven't gotten around to reviewing it but we should be done here.