Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Marketplace Client Project » Using org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService behind a proxy
Using org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService behind a proxy [message #648129] Tue, 11 January 2011 11:18 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi to all,

I want to use org.eclipse.epp.internal.mpc.core.service.DefaultMarketplace Service to get data from marketplaces. If I call it like this:

DefaultMarketplaceService service = new DefaultMarketplaceService(new URL("http://marketplace.eclipse.org"));
List<Market> listMarkets = service.listMarkets(new NullProgressMonitor());
for (Market nextMarekt: listMarkets) {
LOGGER.info("Market " + nextMarekt.getName() + " found");
List<Category> category = nextMarekt.getCategory();
for (Category nextCat: category) {
LOGGER.info("- Category " + nextCat.getName() + "-" + nextCat.getId() + "-" + nextCat.getCount() + " found");
}
}

I get a Connection refused if I'm behind a proxy in our company.
Calling it from home, without any proxy, it works

How can I handle this proxy issue
Re: Using org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService behind a proxy [message #648418 is a reply to message #648129] Wed, 12 January 2011 19:42 Go to previous message
David Green is currently offline David GreenFriend
Messages: 136
Registered: July 2009
Senior Member
Markus,

Proxy settings can be specified in the workspace preferences under
General->Network Connections.

If you're using DefaultMarketplaceService directly it does work outside
of an Eclipse runtime. When running outside of Eclipse, it uses
java.net.URL.openStream() and will work via a proxy by using Java
platform support for proxies. This topic gives a pretty good summary of
how to setup proxies:
http://stackoverflow.com/questions/1432961/how-do-i-make-htt purlconnection-use-a-proxy

You should be aware that DefaultMarketplaceService is an internal class:
it's not API and it's behaviour may change in the future.

David

On 1/11/2011 3:18 AM, Markus Oley wrote:
> Hi to all,
> I want to use
> org.eclipse.epp.internal.mpc.core.service.DefaultMarketplace Service to
> get data from marketplaces. If I call it like this:
> DefaultMarketplaceService service = new DefaultMarketplaceService(new
> URL("http://marketplace.eclipse.org"));
> List<Market> listMarkets = service.listMarkets(new NullProgressMonitor());
> for (Market nextMarekt: listMarkets) {
> LOGGER.info("Market " + nextMarekt.getName() + " found");
> List<Category> category = nextMarekt.getCategory();
> for (Category nextCat: category) {
> LOGGER.info("- Category " + nextCat.getName() + "-" + nextCat.getId() +
> "-" + nextCat.getCount() + " found");
> }
> }
>
> I get a Connection refused if I'm behind a proxy in our company. Calling
> it from home, without any proxy, it works
>
> How can I handle this proxy issue
Previous Topic:Can I use Marketplace Client to define what to install?
Next Topic:MPC and eclipse v4
Goto Forum:
  


Current Time: Tue Apr 23 13:29:51 GMT 2024

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

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

Back to the top