I do the same.

 

The principle is to set the service class to your EJB remote interface

 

After it's practically the same as an EJB client.

-          Get the home interface

-          Instanciate your remote interface by the home create method

-          Call your services by using: method.invoke(InterfaceObject,
params);

 

 

 

________________________________

From: Mike Miller [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2007 19:32
To: [email protected]
Subject: RE: [xfire-user] Suggestions on resolving ClassClassException
in Weblogic due to ClassLoader issu

 

Thanks, I was just in the middle of reading the first link, and already
setup Weblogic with the weblogic.xml as stated.   We are on Weblogic
8.1.3.
 
Apparently it has something to do with how I get access to the service.
Did you use the EJBInvoker?   I used the copy of the documentation and
changed it slightly.  Rather than the EJBInvoker taking a EJBHome
object, I pass it the service class and then use our ServiceLoader class
to load the service and get the EJBHome from there.  
 
Thanks for the input!
 

/**

* XFire EJB Invoker - lifted directly from the XFire documentation and
then

* slightly modified. Getting the EJBHome from our service.

* 

* @param class class name of the ejb to be exposed

*/

public EJBInvoker(String clazz)

{

try

{

//EJBObject svc = (EJBObject) Services.get(Class.forName(clazz));

EJBObject svc = (EJBObject)
ServiceLoader.getService(Class.forName(clazz));

this.home = svc.getEJBHome();

if (!home.getEJBMetaData().isSession() ||
!home.getEJBMetaData().isStatelessSession())

{

throw new IllegalArgumentException("home must be for a stateless session
bean");

}

createMethod = home.getClass().getMethod("create", new Class[0]);

}

catch (Exception ex)

{

throw new IllegalArgumentException("Unable to initialize invoker: " +
ex);

}

}
 
 




________________________________

Date: Wed, 1 Aug 2007 19:13:51 +0200
From: [EMAIL PROTECTED]
To: [email protected]
Subject: RE: [xfire-user] Suggestions on resolving ClassClassException
in Weblogic due to ClassLoader issues

Try to see:

http://e-docs.bea.com/wls/docs81/programming/classloading.html

http://docs.codehaus.org/display/XFIRE/XFire+on+Weblogic+8.1

 

Do this and normally it deploys ws.

 

I did the same things : EJB exposed as WS on Weblo 8.1 SP5

 

________________________________

From: Mike Miller [mailto:[EMAIL PROTECTED] 
Sent: 01 August 2007 18:02
To: xfire
Subject: [xfire-user] Suggestions on resolving ClassClassException in
Weblogic due to ClassLoader issues

 

I am trying to expose one of our EJBs as a web service.  We have a
'startup' servlet that initializes our service locator component and
then starts some our internal startup tasks.   I have added a new
servlet that extends XFireConfigurableServlet and points to my
services.xml.   The startup servlet is started first and the new servlet
is the last servlet started.
 
I get a ClassCastException within Weblogic when XFire attempts to
initialize my EJBInvoker.  I believe this is class loader related but
that is about as intelligently as I can speak of the problem.  
 
Should there be a problem loading the service from the second servlet?
 
I am on a very tight schedule and need to find a solution fairly
quickly.  Any suggestion would be appreciated!

________________________________

Local listings, incredible imagery, and driving directions - all in one
place! Find it! <http://maps.live.com/?wip=69&FORM=MGAC01> 


This email was sent to you by Reuters, the global news and information
company.
To find out more about Reuters visit www.about.reuters.com Any views
expressed in this message are those of the individual sender, except
where the sender specifically states them to be the views of Reuters
Limited. 

Reuters Limited is part of the Reuters Group of companies, of which
Reuters Group PLC is the ultimate parent company. Reuters Group PLC -
Registered office address: The Reuters Building, South Colonnade, Canary
Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales 

 

________________________________

PC Magazine's 2007 editors' choice for best web mail-award-winning
Windows Live Hotmail. Check it out!
<http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_mig
ration_HMWL_mini_pcmag_0707> 



This email was sent to you by Reuters, the global news and information company. 
To find out more about Reuters visit www.about.reuters.com

Any views expressed in this message are those of the individual sender, 
except where the sender specifically states them to be the views of Reuters 
Limited.

Reuters Limited is part of the Reuters Group of companies, of which Reuters 
Group PLC is the ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South 
Colonnade, Canary Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales

Reply via email to