Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Problem accessing remote service
Problem accessing remote service [message #583529] Wed, 23 September 2009 20:20 Go to next message
Jens Mayer is currently offline Jens MayerFriend
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(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 #583538 is a reply to message #583529] Thu, 24 September 2009 05:00 Go to previous message
Stefan Liebig is currently offline Stefan LiebigFriend
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
>
>
>
Previous Topic:riena remote Activator is always invalid
Next Topic:Problem accessing remote service
Goto Forum:
  


Current Time: Thu Apr 25 10:54:03 GMT 2024

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

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

Back to the top