You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Frederic POIROT <po...@yahoo.com> on 2000/09/25 06:01:46 UTC

EJB access over SOAP : Locator source

Hello !
I try to create a EJB locator, i.e. being able to execute a method from an
ejb and getting back the results. My project is doing an HTTP communication
between EJBs
I just found your code this afternoon. It seems I did almost the same way
(but much simpler than you, i am just a beginner with SOAP !!!) about
getting the EJBObject.
But if I run locally my program (not via soap) i can access all the methods
i want. Cool it works ! and if i put my service in J2EE RI (or TOMCAT) with
SOAP, i am able only to retrieve the home interface and i can't get the
EJBObject properly, always a InvocationTargetException exception..
Could you tell me how you did ? i read most of your source code about the
locators but i couldn't found out what i am missing.. and i become crazy,
really !!
Thanx in advance for your time and help !
Frederic

----- Original Message -----
From: "Vahe Amirbekyan" <av...@techone.com>
To: <so...@xml.apache.org>
Cc: "Sudhir Kolli" <su...@cephren.com>
Sent: Monday, September 18, 2000 16:17
Subject: Re: EJB access over SOAP


> Hi,
>
> I am attaching the code, which is mostly new to the Apache SOAP, from
> Apache SOAP only SOAPMappingRegistry and RPCRouterServlet were tweaked
> (so there are the diffs also). The Locator and URN Generator are
> stand-alone frameworks, they do not have to be SOAP-aware (an exception
> here is the SOAPProxy llocator/URN generator, it requires some
> additional code and will not compile, I've attached them just to show
> how SOAP-related components can be plugged into Locator/URN generator
> framework). In general the code consists of the following parts:
>
> - Locator framework
> - URN generator framework
> - Object Reference serializer (uses the above frameworks to send objects
> by reference)
> - tweaked mapping registry (the Object Reference serializer added)
> - tweaked PRCRouterServlet (Locator replaces simple class loading)
>
> I spent some time to "extract" the code being of interest here from our
> much broader extension of Apache SOAP (one part of which are
> transformers which I posted two weeks ago, BTW, any feedback?). Also, in
> some cases, I had to change the code to cut off related but unimportant
> from the current point of view components (like Weblogic-specific
> initializers). The code compiles, but the runtime is not fully tested (I
> hope I have not deleted more than it was necessary :).
>
> Please, feel free to ask me any additional question (directly or via the
> list).
>
> Vahe
>
> George I Matkovits wrote:
> >
> > Could you  post your changes against SoapV2_0 here? We could then
experiment
> > with it,  please.
> > Thank you - George
> >
> > Vahe Amirbekyan wrote:
> >
> > > Paul,
> > >
> > > With our approach it can be urn:ejb:flowers01 which, when arrives to
the
> > > server side is taken care by one of the (Locator's) components (namely
> > > NameSpaceLocator) which maps flowers01 to the "internal" JNDI name.
The
> > > reverse process - i.e. generating of the URN - is done similarly: the
> > > internal JNDI name is mapped to the external name (by
> > > NameSpaceURNGenerator component).
> > >
> > > Have a nice vacations!
> > >
> > > Vahe
> > >
> > > Paul Fink wrote:
> > > >
> > > > I'm confussed ... again.
> > > >
> > > > I hear folks say "client shoudn't know implementaion details"
> > > > and then I see samples with  implemetation with "urn:ejb:jndiName"
> > > >
> > > > Do we all gree that server implemenation should not be exposed
> > > > in the URN schema?
> > > >
> > > > If  I'm being really dumb forgive me. I go on vacation in an hour so
> > > > you won't have to put up with me for a week.
> > >
> > > --
> > >        (\______________________________________________________/)
> > >      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
> > >     (___o)            tel: (510) 729 6750 ext.375             (o___)
> > >      (__o)              mailto:vahe@techone.com               (o__)
> > >      (__o)              http://www.techone.com                (o__)
> > >       (_o)____________________________________________________(o_)
>
> --
>        (\______________________________________________________/)
>      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
>     (___o)            tel: (510) 729 6750 ext.375             (o___)
>      (__o)              mailto:vahe@techone.com               (o__)
>      (__o)              http://www.techone.com                (o__)
>       (_o)____________________________________________________(o_)


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Re: EJB access over SOAP : Locator source

Posted by Vahe Amirbekyan <av...@techone.com>.
Hi Frederic,

There are some details I need to know before answering your question.
How your classpaths are set? How the application server is configured?
Do you manage to access the same target EJB objects directly? Actually,
are you trying to invoke the method on existing object or you first try
to get the home interface and create the target via it first? 

You can write me directly to not to flood the mailing list (unless
someone else is experiencing the same problem).

Best regards, Vahe

Frederic POIROT wrote:
> 
> Hello !
> I try to create a EJB locator, i.e. being able to execute a method from an
> ejb and getting back the results. My project is doing an HTTP communication
> between EJBs
> I just found your code this afternoon. It seems I did almost the same way
> (but much simpler than you, i am just a beginner with SOAP !!!) about
> getting the EJBObject.
> But if I run locally my program (not via soap) i can access all the methods
> i want. Cool it works ! and if i put my service in J2EE RI (or TOMCAT) with
> SOAP, i am able only to retrieve the home interface and i can't get the
> EJBObject properly, always a InvocationTargetException exception..
> Could you tell me how you did ? i read most of your source code about the
> locators but i couldn't found out what i am missing.. and i become crazy,
> really !!
> Thanx in advance for your time and help !
> Frederic
> 
> ----- Original Message -----
> From: "Vahe Amirbekyan" <av...@techone.com>
> To: <so...@xml.apache.org>
> Cc: "Sudhir Kolli" <su...@cephren.com>
> Sent: Monday, September 18, 2000 16:17
> Subject: Re: EJB access over SOAP
> 
> > Hi,
> >
> > I am attaching the code, which is mostly new to the Apache SOAP, from
> > Apache SOAP only SOAPMappingRegistry and RPCRouterServlet were tweaked
> > (so there are the diffs also). The Locator and URN Generator are
> > stand-alone frameworks, they do not have to be SOAP-aware (an exception
> > here is the SOAPProxy llocator/URN generator, it requires some
> > additional code and will not compile, I've attached them just to show
> > how SOAP-related components can be plugged into Locator/URN generator
> > framework). In general the code consists of the following parts:
> >
> > - Locator framework
> > - URN generator framework
> > - Object Reference serializer (uses the above frameworks to send objects
> > by reference)
> > - tweaked mapping registry (the Object Reference serializer added)
> > - tweaked PRCRouterServlet (Locator replaces simple class loading)
> >
> > I spent some time to "extract" the code being of interest here from our
> > much broader extension of Apache SOAP (one part of which are
> > transformers which I posted two weeks ago, BTW, any feedback?). Also, in
> > some cases, I had to change the code to cut off related but unimportant
> > from the current point of view components (like Weblogic-specific
> > initializers). The code compiles, but the runtime is not fully tested (I
> > hope I have not deleted more than it was necessary :).
> >
> > Please, feel free to ask me any additional question (directly or via the
> > list).
> >
> > Vahe
> >
> > George I Matkovits wrote:
> > >
> > > Could you  post your changes against SoapV2_0 here? We could then
> experiment
> > > with it,  please.
> > > Thank you - George
> > >
> > > Vahe Amirbekyan wrote:
> > >
> > > > Paul,
> > > >
> > > > With our approach it can be urn:ejb:flowers01 which, when arrives to
> the
> > > > server side is taken care by one of the (Locator's) components (namely
> > > > NameSpaceLocator) which maps flowers01 to the "internal" JNDI name.
> The
> > > > reverse process - i.e. generating of the URN - is done similarly: the
> > > > internal JNDI name is mapped to the external name (by
> > > > NameSpaceURNGenerator component).
> > > >
> > > > Have a nice vacations!
> > > >
> > > > Vahe
> > > >
> > > > Paul Fink wrote:
> > > > >
> > > > > I'm confussed ... again.
> > > > >
> > > > > I hear folks say "client shoudn't know implementaion details"
> > > > > and then I see samples with  implemetation with "urn:ejb:jndiName"
> > > > >
> > > > > Do we all gree that server implemenation should not be exposed
> > > > > in the URN schema?
> > > > >
> > > > > If  I'm being really dumb forgive me. I go on vacation in an hour so
> > > > > you won't have to put up with me for a week.
> > > >
> > > > --
> > > >        (\______________________________________________________/)
> > > >      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
> > > >     (___o)            tel: (510) 729 6750 ext.375             (o___)
> > > >      (__o)              mailto:vahe@techone.com               (o__)
> > > >      (__o)              http://www.techone.com                (o__)
> > > >       (_o)____________________________________________________(o_)
> >
> > --
> >        (\______________________________________________________/)
> >      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
> >     (___o)            tel: (510) 729 6750 ext.375             (o___)
> >      (__o)              mailto:vahe@techone.com               (o__)
> >      (__o)              http://www.techone.com                (o__)
> >       (_o)____________________________________________________(o_)
> 
> __________________________________________________
> 
> Do You Yahoo!?
> 
> Talk to your friends online with Yahoo! Messenger.
> 
> http://im.yahoo.com

-- 
       (\______________________________________________________/)
     __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
    (___o)            tel: (510) 729 6750 ext.375             (o___)
     (__o)              mailto:vahe@techone.com               (o__)
     (__o)              http://www.techone.com                (o__)
      (_o)____________________________________________________(o_)

Re: EJB access over SOAP : Locator source

Posted by Vahe Amirbekyan <av...@techone.com>.
Hi Frederic,

There are some details I need to know before answering your question.
How your classpaths are set? How the application server is configured?
Do you manage to access the same target EJB objects directly? Actually,
are you trying to invoke the method on existing object or you first try
to get the home interface and create the target via it first? 

You can write me directly to not to flood the mailing list (unless
someone else is experiencing the same problem).

Best regards, Vahe

Frederic POIROT wrote:
> 
> Hello !
> I try to create a EJB locator, i.e. being able to execute a method from an
> ejb and getting back the results. My project is doing an HTTP communication
> between EJBs
> I just found your code this afternoon. It seems I did almost the same way
> (but much simpler than you, i am just a beginner with SOAP !!!) about
> getting the EJBObject.
> But if I run locally my program (not via soap) i can access all the methods
> i want. Cool it works ! and if i put my service in J2EE RI (or TOMCAT) with
> SOAP, i am able only to retrieve the home interface and i can't get the
> EJBObject properly, always a InvocationTargetException exception..
> Could you tell me how you did ? i read most of your source code about the
> locators but i couldn't found out what i am missing.. and i become crazy,
> really !!
> Thanx in advance for your time and help !
> Frederic
> 
> ----- Original Message -----
> From: "Vahe Amirbekyan" <av...@techone.com>
> To: <so...@xml.apache.org>
> Cc: "Sudhir Kolli" <su...@cephren.com>
> Sent: Monday, September 18, 2000 16:17
> Subject: Re: EJB access over SOAP
> 
> > Hi,
> >
> > I am attaching the code, which is mostly new to the Apache SOAP, from
> > Apache SOAP only SOAPMappingRegistry and RPCRouterServlet were tweaked
> > (so there are the diffs also). The Locator and URN Generator are
> > stand-alone frameworks, they do not have to be SOAP-aware (an exception
> > here is the SOAPProxy llocator/URN generator, it requires some
> > additional code and will not compile, I've attached them just to show
> > how SOAP-related components can be plugged into Locator/URN generator
> > framework). In general the code consists of the following parts:
> >
> > - Locator framework
> > - URN generator framework
> > - Object Reference serializer (uses the above frameworks to send objects
> > by reference)
> > - tweaked mapping registry (the Object Reference serializer added)
> > - tweaked PRCRouterServlet (Locator replaces simple class loading)
> >
> > I spent some time to "extract" the code being of interest here from our
> > much broader extension of Apache SOAP (one part of which are
> > transformers which I posted two weeks ago, BTW, any feedback?). Also, in
> > some cases, I had to change the code to cut off related but unimportant
> > from the current point of view components (like Weblogic-specific
> > initializers). The code compiles, but the runtime is not fully tested (I
> > hope I have not deleted more than it was necessary :).
> >
> > Please, feel free to ask me any additional question (directly or via the
> > list).
> >
> > Vahe
> >
> > George I Matkovits wrote:
> > >
> > > Could you  post your changes against SoapV2_0 here? We could then
> experiment
> > > with it,  please.
> > > Thank you - George
> > >
> > > Vahe Amirbekyan wrote:
> > >
> > > > Paul,
> > > >
> > > > With our approach it can be urn:ejb:flowers01 which, when arrives to
> the
> > > > server side is taken care by one of the (Locator's) components (namely
> > > > NameSpaceLocator) which maps flowers01 to the "internal" JNDI name.
> The
> > > > reverse process - i.e. generating of the URN - is done similarly: the
> > > > internal JNDI name is mapped to the external name (by
> > > > NameSpaceURNGenerator component).
> > > >
> > > > Have a nice vacations!
> > > >
> > > > Vahe
> > > >
> > > > Paul Fink wrote:
> > > > >
> > > > > I'm confussed ... again.
> > > > >
> > > > > I hear folks say "client shoudn't know implementaion details"
> > > > > and then I see samples with  implemetation with "urn:ejb:jndiName"
> > > > >
> > > > > Do we all gree that server implemenation should not be exposed
> > > > > in the URN schema?
> > > > >
> > > > > If  I'm being really dumb forgive me. I go on vacation in an hour so
> > > > > you won't have to put up with me for a week.
> > > >
> > > > --
> > > >        (\______________________________________________________/)
> > > >      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
> > > >     (___o)            tel: (510) 729 6750 ext.375             (o___)
> > > >      (__o)              mailto:vahe@techone.com               (o__)
> > > >      (__o)              http://www.techone.com                (o__)
> > > >       (_o)____________________________________________________(o_)
> >
> > --
> >        (\______________________________________________________/)
> >      __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
> >     (___o)            tel: (510) 729 6750 ext.375             (o___)
> >      (__o)              mailto:vahe@techone.com               (o__)
> >      (__o)              http://www.techone.com                (o__)
> >       (_o)____________________________________________________(o_)
> 
> __________________________________________________
> 
> Do You Yahoo!?
> 
> Talk to your friends online with Yahoo! Messenger.
> 
> http://im.yahoo.com

-- 
       (\______________________________________________________/)
     __|_|        Vahe AMIRBEKYAN, Senior Consultant          |_|__
    (___o)            tel: (510) 729 6750 ext.375             (o___)
     (__o)              mailto:vahe@techone.com               (o__)
     (__o)              http://www.techone.com                (o__)
      (_o)____________________________________________________(o_)