| Generic Web Connector documentation [message #48627] | 
Fri, 16 May 2008 16:25   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: ray.camdenfamily.com 
 
I'm trying to write some code to connect Mylyn to my bug tracker  
(lighthousepro.riaforge.org). The docs talk about how to construct your  
urls, but say nothing about what my app should return. So for example, I  
figured out it wants XML back, but I can't figure out -what- type of XML  
it wants.  
 
Where in the docs can I find the exected return values for getting tasks,  
getting a task, etc?
 |  
 |  
  | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
| Re: Generic Web Connector documentation [message #49143 is a reply to message #48982] | 
Fri, 23 May 2008 03:26   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
On 05/22/08 16:13, Raymond Camden wrote: 
> Ahh ok thank you! So you DO need to format your code (and yes, I have 
> control over the results)... 
 
Just to clarify what I meant: You can make your life (your regexps) easier if you have control about 
the formatting of your web-site output. If you cannot, you have to adapt your regexps to the 
web-site layout. 
 
Cheers, Jörg
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589572 is a reply to message #48627] | 
Fri, 16 May 2008 16:41   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Raymond Camden wrote: 
> I'm trying to write some code to connect Mylyn to my bug tracker  
> (lighthousepro.riaforge.org). The docs talk about how to construct  
> your urls, but say nothing about what my app should return. So for  
> example, I figured out it wants XML back, but I can't figure out  
> -what- type of XML it wants. 
> Where in the docs can I find the exected return values for getting  
> tasks, getting a task, etc? 
  If by "Generic Web Connector" you meant Mylyn connector packaged with  
Mylyn, then it doesn't wants XML. The connector is basically allow to  
specify an arbitrary template (see advanced settings in repository and  
query preferences). Template is used to parse html pages (e.g. ones that  
show list of issues) and bring those issues into the task list. 
 
  Additionally, connector can automatically handle RSS. In this case you  
only need to put rss url as a query url and leave query template filed  
blank. 
 
  regards, 
  Eugene
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589583 is a reply to message #48684] | 
Fri, 16 May 2008 17:39   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: ray.camdenfamily.com 
 
Odd, when I do preview, it complains about invalid XML. So I still don't  
get it. 
 
If I make a new query, and point it to url so and so, what should that url  
return? Any HTML it wants?
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589594 is a reply to message #48714] | 
Fri, 16 May 2008 18:03   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Raymond Camden wrote: 
> Odd, when I do preview, it complains about invalid XML. So I still  
> don't get it. 
  Not sure what you mean by "it". The preview action opens page  
downloaded from specified url in a web browser, so if it doesn't look  
like  page you want to parse for tasks, then url you have specified is  
probably not correct, or server is redirecting your requests (maybe  
expecting some additional request parameters or user auth info). 
> If I make a new query, and point it to url so and so, what should that  
> url return? Any HTML it wants? 
  You should really start from the web browser. Find a web page you want  
to parse for tasks and then use url  of the page in the web connector query. 
 
  regards, 
  Eugene
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589598 is a reply to message #48627] | 
Sat, 17 May 2008 11:34   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi Raymond, 
 
it seems that you have (full) control what your bug tracker returns? 
In that case I would use a simple format. We adapted our tracker to give 
back something like 
 
1234|complete|joerg|some description\n 
 
which is matched by this pattern: 
 
 ({Id}\d+)\|({Status}\w+)\|({Owner}[^|]+)\|({Description}[^\n ]+) 
 
HTH, Jörg 
 
On 05/16/08 22:25, Raymond Camden wrote: 
> I'm trying to write some code to connect Mylyn to my bug tracker 
> (lighthousepro.riaforge.org). The docs talk about how to construct your 
> urls, but say nothing about what my app should return. So for example, I 
> figured out it wants XML back, but I can't figure out -what- type of XML 
> it wants. 
> Where in the docs can I find the exected return values for getting 
> tasks, getting a task, etc? 
>
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589682 is a reply to message #48773] | 
Thu, 22 May 2008 10:13   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: ray.camdenfamily.com 
 
Ahh ok thank you! So you DO need to format your code (and yes, I have  
control over the results) and you need to tell Eclipse how to parse the  
code. 
 
This is what I'm talking about - it isn't documented very well I think.
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589688 is a reply to message #48982] | 
Thu, 22 May 2008 12:02   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Raymond Camden wrote: 
> Ahh ok thank you! So you DO need to format your code  
  No you don't need to do that. The Web connector is created to work  
with arbitrary html pages. Please see my previous response. 
> (and yes, I have control over the results) and you need to tell  
> Eclipse how to parse the code.  
  This is correct, you do need to specify query parsing pattern (aka  
regexp) for your html structures. 
> This is what I'm talking about - it isn't documented very well I think. 
  I've made some edits in the user guide, but you are welcome to improve  
documentation on the wiki. See  
 http://wiki.eclipse.org/Mylyn_User_Guide#Generic_Web_Reposit ory_Connector 
 
  regards, 
  Eugene
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589712 is a reply to message #48982] | 
Fri, 23 May 2008 00:37   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Raymond, 
 
Also consider filing a bug for creating a standard XML form that the  
Tasks API could consume in order to provide rich editing facilities.  
The mapping currently happens in Java code, but we have have discussed  
making it easier with a standard schema. 
 
Mik 
 
Raymond Camden wrote: 
> Ahh ok thank you! So you DO need to format your code (and yes, I have  
> control over the results) and you need to tell Eclipse how to parse the  
> code. 
>  
> This is what I'm talking about - it isn't documented very well I think.
 |  
 |  
  | 
| Re: Generic Web Connector documentation [message #589721 is a reply to message #48982] | 
Fri, 23 May 2008 03:26   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
On 05/22/08 16:13, Raymond Camden wrote: 
> Ahh ok thank you! So you DO need to format your code (and yes, I have 
> control over the results)... 
 
Just to clarify what I meant: You can make your life (your regexps) easier if you have control about 
the formatting of your web-site output. If you cannot, you have to adapt your regexps to the 
web-site layout. 
 
Cheers, Jörg
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.57474 seconds