Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mylyn » Generic Web Connector documentation
Generic Web Connector documentation [message #48627] Fri, 16 May 2008 20:25 Go to next message
Eclipse UserFriend
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 #48684 is a reply to message #48627] Fri, 16 May 2008 20:41 Go to previous messageGo to next message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 #48714 is a reply to message #48684] Fri, 16 May 2008 21:39 Go to previous messageGo to next message
Eclipse UserFriend
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 #48744 is a reply to message #48714] Fri, 16 May 2008 22:03 Go to previous messageGo to next message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 #48773 is a reply to message #48627] Sat, 17 May 2008 15:34 Go to previous messageGo to next message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
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 #48982 is a reply to message #48773] Thu, 22 May 2008 14:13 Go to previous messageGo to next message
Eclipse UserFriend
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 #49000 is a reply to message #48982] Thu, 22 May 2008 16:02 Go to previous messageGo to next message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 #49114 is a reply to message #48982] Fri, 23 May 2008 04:37 Go to previous messageGo to next message
Mik Kersten is currently offline Mik KerstenFriend
Messages: 287
Registered: July 2009
Senior Member
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 #49143 is a reply to message #48982] Fri, 23 May 2008 07:26 Go to previous message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
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 20:41 Go to previous message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 21:39 Go to previous message
Eclipse UserFriend
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 22:03 Go to previous message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 15:34 Go to previous message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
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 14:13 Go to previous message
Eclipse UserFriend
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 16:02 Go to previous message
Eugene Kuleshov is currently offline Eugene KuleshovFriend
Messages: 504
Registered: July 2009
Senior Member
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 04:37 Go to previous message
Mik Kersten is currently offline Mik KerstenFriend
Messages: 287
Registered: July 2009
Senior Member
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 07:26 Go to previous message
Jörg Thönnes is currently offline Jörg ThönnesFriend
Messages: 229
Registered: July 2009
Senior Member
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
Previous Topic:Multiple Task Focus Levels
Next Topic:Context Test Suites
Goto Forum:
  


Current Time: Wed Jul 17 16:35:56 GMT 2024

Powered by FUDForum. Page generated in 0.04793 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top