Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Problem accessing remote service
Problem accessing remote service [message #487633] Wed, 23 September 2009 16:20 Go to next message
Jens Mayer is currently offline Jens Mayer
Messages: 19
Registered: September 2009
Location: Hamburg
Junior Member
Hi,

i'm trying to create an example using riena following the Demo-Client-Example, unfortunately i don't get the client-side working.

This is what i've done yet:

1.) creating the server side, starting a service registered with the Interface IMenuSupport. After starting the service, i can see in the console-output:

Wed Sep 23 21:55:28 CEST 2009 DEBUG [Start Level Event Dispatcher] org.eclipse.riena.internal.communication.publisher.hessian.H essianRemoteServicePublisher published web service. protocol=hessian, url=http://192.168.1.33:8080/hessian/MenuServiceWS, interface=myapp.common.IMenuService

Seems that Service on server-side is running (the ip-address is localhost).

2.) on client-side, the code in my Activator look like this:
Register.remoteProxy(IMenuService.class).usingUrl("http://localhost:8080/hessian/MenuServiceWS")
		.withProtocol("hessian").andStart(context); 

RemoteClientTest rct = new RemoteClientTest();		 

Inject.service(IMenuService.class).into(rct).andStart(context);

rct.test();



The class RemoteClientTest looks like this:
public class RemoteClientTest {

	private IMenuService menuService;
	
	public void bind(IMenuService menuService) {
		this.menuService = menuService;
	}

	public void unbind(IMenuService menuService) {
		System.out.println("remoteclientest: menu service unbound"); //$NON-NLS-1$
		this.menuService = null;
	}
	
	public void test() {
		System.out.println("remoteclienttest: customer service bound"); //$NON-NLS-1$
		List<EbpMenu> searchResult = menuService.getRootNodes(); //$NON-NLS-1$
		for (EbpMenu m : searchResult) {
			System.out.println(m.getText()); //$NON-NLS-1$
		}
	}
}



When I start the client (server is already running), i can see the following warning in the console:

Wed Sep 23 21:57:25 CEST 2009 WARNING [main] org.eclipse.riena.communication.core.factory.RemoteServiceFa ctory no IRemoteServiceFactory extension available protocol [hessian] id [myapp.common.IMenuService]

... and finally in rct.test() i'm getting the following error:

java.lang.RuntimeException: LazyProxy: missing IRemoteServiceFactory to create proxy for protocol=hessian url=http://localhost:8080/hessian/MenuServiceWS interface=myapp.common.IMenuService

I'm missing something, but i can't figure out what that is.

Can anybody help me?

Thanks in advance

Jens


Re: Problem accessing remote service [message #487666 is a reply to message #487633] Thu, 24 September 2009 01:00 Go to previous messageGo to next message
Stefan Liebig is currently offline Stefan Liebig
Messages: 124
Registered: July 2009
Senior Member
Hi Jens,

Is the bundle org.eclipse.riena.communication.factory.hessian on your
"classpath"?

Tschüß,
Stefan

jens.mayer1@gmx.de wrote:
> Hi,
>
> i'm trying to create an example using riena following the
> Demo-Client-Example, unfortunately i don't get the client-side working.
>
> This is what i've done yet:
>
> 1.) creating the server side, starting a service registered with the
> Interface IMenuSupport. After starting the service, i can see in the
> console-output:
>
> Wed Sep 23 21:55:28 CEST 2009 DEBUG [Start Level Event Dispatcher]
> org.eclipse.riena.internal.communication.publisher.hessian.H
> essianRemoteServicePublisher published web service. protocol=hessian,
> url=http://192.168.1.33:8080/hessian/MenuServiceWS,
> interface=myapp.common.IMenuService
>
> Seems that Service on server-side is running (the ip-address is localhost).
>
> 2.) on client-side, the code in my Activator look like this:
>
> Register.remoteProxy(IMenuService.class).usingUrl("http://localhost:8080/hessian/MenuServiceWS")
>
> .withProtocol("hessian").andStart(context);
> RemoteClientTest rct = new RemoteClientTest();
> Inject.service(IMenuService.class).into(rct).andStart(contex t);
>
> rct.test();
>
>
>
> The class RemoteClientTest looks like this:
>
> public class RemoteClientTest {
>
> private IMenuService menuService;
>
> public void bind(IMenuService menuService) {
> this.menuService = menuService;
> }
>
> public void unbind(IMenuService menuService) {
> System.out.println("remoteclientest: menu service unbound");
> //$NON-NLS-1$
> this.menuService = null;
> }
>
> public void test() {
> System.out.println("remoteclienttest: customer service bound");
> //$NON-NLS-1$
> List<EbpMenu> searchResult = menuService.getRootNodes();
> //$NON-NLS-1$
> for (EbpMenu m : searchResult) {
> System.out.println(m.getText()); //$NON-NLS-1$
> }
> }
> }
>
>
>
> When I start the client (server is already running), i can see the
> following warning in the console:
>
> Wed Sep 23 21:57:25 CEST 2009 WARNING [main]
> org.eclipse.riena.communication.core.factory.RemoteServiceFa ctory no
> IRemoteServiceFactory extension available protocol [hessian] id
> [myapp.common.IMenuService]
>
> ... and finally in rct.test() i'm getting the following error:
>
> java.lang.RuntimeException: LazyProxy: missing IRemoteServiceFactory to
> create proxy for protocol=hessian
> url=http://localhost:8080/hessian/MenuServiceWS
> interface=myapp.common.IMenuService
>
> I'm missing something, but i can't figure out what that is.
>
> Can anybody help me?
>
> Thanks in advance
>
> Jens
>
>
>
Re: Problem accessing remote service [message #487764 is a reply to message #487666] Thu, 24 September 2009 07:17 Go to previous message
Jens Mayer is currently offline Jens Mayer
Messages: 19
Registered: September 2009
Location: Hamburg
Junior Member
Hi Stefan,

you're right - I added that bundle in my launch configuration to the plugin dependencies. Now everything is working fine.

Many thanks und tschüss,

Jens

Stefan Liebig wrote on Thu, 24 September 2009 01:00
Hi Jens,

Is the bundle org.eclipse.riena.communication.factory.hessian on your
"classpath"?

Tschüß,
Stefan

jens.mayer1@gmx.de wrote:
> Hi,
>
> i'm trying to create an example using riena following the
> Demo-Client-Example, unfortunately i don't get the client-side working.
>
> This is what i've done yet:
>
> 1.) creating the server side, starting a service registered with the
> Interface IMenuSupport. After starting the service, i can see in the
> console-output:
>
> Wed Sep 23 21:55:28 CEST 2009 DEBUG [Start Level Event Dispatcher]
> org.eclipse.riena.internal.communication.publisher.hessian.H
> essianRemoteServicePublisher published web service. protocol=hessian,
> url=http://192.168.1.33:8080/hessian/MenuServiceWS,
> interface=myapp.common.IMenuService
>
> Seems that Service on server-side is running (the ip-address is localhost).
>
> 2.) on client-side, the code in my Activator look like this:
>
> Register.remoteProxy(IMenuService.class).usingUrl("http://localhost:8080/hessian/MenuServiceWS")
>
> .withProtocol("hessian").andStart(context);
> RemoteClientTest rct = new RemoteClientTest();
> Inject.service(IMenuService.class).into(rct).andStart(contex t);
>
> rct.test();
>
>
>
> The class RemoteClientTest looks like this:
>
> public class RemoteClientTest {
>
> private IMenuService menuService;
>
> public void bind(IMenuService menuService) {
> this.menuService = menuService;
> }
>
> public void unbind(IMenuService menuService) {
> System.out.println("remoteclientest: menu service unbound");
> //$NON-NLS-1$
> this.menuService = null;
> }
>
> public void test() {
> System.out.println("remoteclienttest: customer service bound");
> //$NON-NLS-1$
> List<EbpMenu> searchResult = menuService.getRootNodes();
> //$NON-NLS-1$
> for (EbpMenu m : searchResult) {
> System.out.println(m.getText()); //$NON-NLS-1$
> }
> }
> }
>
>
>
> When I start the client (server is already running), i can see the
> following warning in the console:
>
> Wed Sep 23 21:57:25 CEST 2009 WARNING [main]
> org.eclipse.riena.communication.core.factory.RemoteServiceFa ctory no
> IRemoteServiceFactory extension available protocol [hessian] id
> [myapp.common.IMenuService]
>
> ... and finally in rct.test() i'm getting the following error:
>
> java.lang.RuntimeException: LazyProxy: missing IRemoteServiceFactory to
> create proxy for protocol=hessian
> url=http://localhost:8080/hessian/MenuServiceWS
> interface=myapp.common.IMenuService
>
> I'm missing something, but i can't figure out what that is.
>
> Can anybody help me?
>
> Thanks in advance
>
> Jens
>
>
>

Re: Problem accessing remote service [message #583565 is a reply to message #487666] Thu, 24 September 2009 07:17 Go to previous message
Jens Mayer is currently offline Jens Mayer
Messages: 19
Registered: September 2009
Location: Hamburg
Junior Member
Hi Stefan,

you're right - I added that bundle in my launch configuration to the plugin dependencies. Now everything is working fine.

Many thanks und tschüss,

Jens

Stefan Liebig wrote on Thu, 24 September 2009 01:00
> Hi Jens,
>
> Is the bundle org.eclipse.riena.communication.factory.hessian on your
> "classpath"?
>
> Tschüß,
> Stefan
>
> jens.mayer1@gmx.de wrote:
> > Hi,
> >
> > i'm trying to create an example using riena following the
> > Demo-Client-Example, unfortunately i don't get the client-side working.
> >
> > This is what i've done yet:
> >
> > 1.) creating the server side, starting a service registered with the
> > Interface IMenuSupport. After starting the service, i can see in the
> > console-output:
> >
> > Wed Sep 23 21:55:28 CEST 2009 DEBUG [Start Level Event Dispatcher]
> > org.eclipse.riena.internal.communication.publisher.hessian.H
> > essianRemoteServicePublisher published web service. protocol=hessian,
> > url=http://192.168.1.33:8080/hessian/MenuServiceWS,
> > interface=myapp.common.IMenuService
> >
> > Seems that Service on server-side is running (the ip-address is localhost).
> >
> > 2.) on client-side, the code in my Activator look like this:
> >
> > Register.remoteProxy(IMenuService.class).usingUrl("http://localhost:8080/hessian/MenuServiceWS")
> >
> > .withProtocol("hessian").andStart(context);
> > RemoteClientTest rct = new RemoteClientTest();
> > Inject.service(IMenuService.class).into(rct).andStart(contex t);
> >
> > rct.test();
> >
> >
> >
> > The class RemoteClientTest looks like this:
> >
> > public class RemoteClientTest {
> >
> > private IMenuService menuService;
> >
> > public void bind(IMenuService menuService) {
> > this.menuService = menuService;
> > }
> >
> > public void unbind(IMenuService menuService) {
> > System.out.println("remoteclientest: menu service unbound");
> > //$NON-NLS-1$
> > this.menuService = null;
> > }
> >
> > public void test() {
> > System.out.println("remoteclienttest: customer service bound");
> > //$NON-NLS-1$
> > List<EbpMenu> searchResult = menuService.getRootNodes();
> > //$NON-NLS-1$
> > for (EbpMenu m : searchResult) {
> > System.out.println(m.getText()); //$NON-NLS-1$
> > }
> > }
> > }
> >
> >
> >
> > When I start the client (server is already running), i can see the
> > following warning in the console:
> >
> > Wed Sep 23 21:57:25 CEST 2009 WARNING [main]
> > org.eclipse.riena.communication.core.factory.RemoteServiceFa ctory no
> > IRemoteServiceFactory extension available protocol [hessian] id
> > [myapp.common.IMenuService]
> >
> > ... and finally in rct.test() i'm getting the following error:
> >
> > java.lang.RuntimeException: LazyProxy: missing IRemoteServiceFactory to
> > create proxy for protocol=hessian
> > url=http://localhost:8080/hessian/MenuServiceWS
> > interface=myapp.common.IMenuService
> >
> > I'm missing something, but i can't figure out what that is.
> >
> > Can anybody help me?
> >
> > Thanks in advance
> >
> > Jens
> >
> >
> >
Previous Topic:Problem accessing remote service
Next Topic:Riena Remote with org.eclipse.ui dependency
Goto Forum:
  


Current Time: Fri Jul 25 16:04:17 EDT 2014

Powered by FUDForum. Page generated in 0.03351 seconds