Re: CXF with own Classloader

2009-05-09 Thread Andrew Clegg
2009/5/8 ladidaaa g-...@gmx.li:

 Is there a way to use CXF with its own classloader which has own versions of
 Jars ?

I came across this project yesterday, would this help?

http://www.pomstrap.techlab.smk.fr/en/

Andrew.


-- 
:: http://biotext.org.uk/ ::


CXF with own Classloader

2009-05-08 Thread ladidaaa

Hello, 

i am facing the  following problem: 

I am using a closed source legacy application ( kind of application server )
which uses AXIS 1 as webservice engine. 

I have the possibility to extend the applications running on the
applicationserver through a progamming interface. In this extensions i am
trying to use CXF, but this won't work this easy because , both Axis1 and
CXF need the wsdl4j.jar but in different versions. 

Is there a way to use a own classloader ?  I tried to create a dynamic
client with my own newly created URLClassloader which didn't work 

JaxWsDynamicClientFactory jwdcf =  JaxWsDynamicClientFactory.newInstance();
Client client = jwdcf.createClient(URL,urlCl);

As the second approache i tried to create CXF through the classloader like
this : 

ClassJaxWsDynamicClientFactory c =(ClassJaxWsDynamicClientFactory)
urlCl.loadClass(org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory);
c.newInstance();

which failed with a instatiation exception. 

Is there a way to use CXF with its own classloader which has own versions of
Jars ? 

-- 
View this message in context: 
http://www.nabble.com/CXF-with-own-Classloader-tp23445345p23445345.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: CXF with own Classloader

2009-05-08 Thread Dave Stanley
You could try and use the FirewallClassLoader @
org.apache.cxf.common.classloader.FirewallClassLoader

There is a JUnit test that shows how to use it
herehttp://svn.apache.org/repos/asf/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java

Regards
/Dave

On Fri, May 8, 2009 at 8:49 AM, ladidaaa g-...@gmx.li wrote:


 Hello,

 i am facing the  following problem:

 I am using a closed source legacy application ( kind of application server
 )
 which uses AXIS 1 as webservice engine.

 I have the possibility to extend the applications running on the
 applicationserver through a progamming interface. In this extensions i am
 trying to use CXF, but this won't work this easy because , both Axis1 and
 CXF need the wsdl4j.jar but in different versions.

 Is there a way to use a own classloader ?  I tried to create a dynamic
 client with my own newly created URLClassloader which didn't work

 JaxWsDynamicClientFactory jwdcf =  JaxWsDynamicClientFactory.newInstance();
 Client client = jwdcf.createClient(URL,urlCl);

 As the second approache i tried to create CXF through the classloader like
 this :

 ClassJaxWsDynamicClientFactory c =(ClassJaxWsDynamicClientFactory)

 urlCl.loadClass(org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory);
 c.newInstance();

 which failed with a instatiation exception.

 Is there a way to use CXF with its own classloader which has own versions
 of
 Jars ?

 --
 View this message in context:
 http://www.nabble.com/CXF-with-own-Classloader-tp23445345p23445345.html
 Sent from the cxf-user mailing list archive at Nabble.com.