Re: Using CXF In Existing Spring Context
On Tuesday 22 April 2008, Urciolo, Kevin wrote: I would like to use CXF in an existing spring context. The examples appear to have a CXF Servlet read a spring configuration file and create a separate context. I want to inject beans I have defined in an existing context in to my CXF services. What is the best way to accomplish this? Thanks There's a pretty good tutorial about it at: http://wheelersoftware.com/articles/spring-cxf-web-services.html I keep meaning to change the samples over to using the standard spring context stuff. Just haven't had the time. For the most part, it's just import the cxf stuff you want, then define your beans, configure the CXFServlet on the context you want (and don't create a cxf-servlet.xml), and it works. -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Using CXF In Existing Spring Context
Steps #7 and #8 here (look at the web.xml and ws-beans.xml file): http://www.jroller.com/gmazza/date/20080417#WFstep7 Also, you can configure multiple config files separated by commas, similar to here to keep your web service stuff separate: http://www.jroller.com/gmazza/date/20061128 HTH, Glen 2008-04-22 Urciolo, Kevin wrote: I would like to use CXF in an existing spring context. The examples appear to have a CXF Servlet read a spring configuration file and create a separate context. I want to inject beans I have defined in an existing context in to my CXF services. What is the best way to accomplish this? Thanks
Re: A simple tutorial using CXF and JPA on NetBeans 6.1
I added it to our wiki articles page[1], it may take a couple of hours to show up though--thanks! Glen [1] http://incubator.apache.org/cxf/resources-and-articles.html http://wiki.netbeans.org/ApacheCXFonNetBeans This may be useful for beginners. Cheers, Arul
Re: A simple tutorial using CXF and JPA on NetBeans 6.1
LOL... originally, I was trying to add this to our resourcearticles page, and thats when I found i dont have permission on the CXF wiki. Anyway, good job Glen, and thanks to Arulazi Dhesiaseelan for good article.;) On Sat, Apr 19, 2008 at 2:26 PM, Glen Mazza [EMAIL PROTECTED] wrote: I added it to our wiki articles page[1], it may take a couple of hours to show up though--thanks! Glen [1] http://incubator.apache.org/cxf/resources-and-articles.html http://wiki.netbeans.org/ApacheCXFonNetBeans This may be useful for beginners. Cheers, Arul -- Cheers, Jeff Yu
A simple tutorial using CXF and JPA on NetBeans 6.1
http://wiki.netbeans.org/ApacheCXFonNetBeans This may be useful for beginners. Cheers, Arul
Re: Using cxf with external web-services
Hello Glen, On Sat, Apr 12, 2008 at 4:50 AM, Glen Mazza [EMAIL PROTECTED] wrote: Perhaps my client example may help you: http://www.jroller.com/gmazza/date/20070929 this helps, explaining the process step-by-step gives an insight that I was somehow missing. -- http://www.linkedin.com/in/vschiavoni http://jroller.com/vschiavoni
Re: Using cxf with external web-services
Hey Glen, Thanks for your reply - William already replied with details on how to do that: There are the outputs of the Spring's logger which uses the common log, if you have the log4j jar in your class path, common log will pick them up. You may turn off the log by putting the log4j logger.property file in your class path and set the Spring logging level to WARNING. Cheers, Tim On 16 Apr 2008, at 23:37, Glen Mazza wrote: That issue came up recently on CXF-dev...I think the problem is that you are seeing *Spring framework* logging messages, not CXF's. I believe you can configure your logging messages further, to filter Spring's as well, but have not researched this matter much.
Re: Using cxf with external web-services
There are the outputs of the Spring's logger which uses the common log, if you have the log4j jar in your class path, common log will pick them up. You may turn off the log by putting the log4j logger.property file in your class path and set the Spring logging level to WARNING. Willem Tim Perrett wrote: Awesome Glen, just the ticket! Oddly, my tester now works, although I get info messages output in the terminal, despite my global CXF logging level set to WARNING? Its not really a massive problem, but just a bit disconcerting having all that red output in eclipse. The messages Im getting are detailed below. Any help would be awesome :-) Cheers, Tim Apr 12, 2008 12:44:57 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing [EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Sat Apr 12 12:44:57 BST 2008]; root of context hierarchy Apr 12, 2008 12:44:57 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No cxf.xml configuration file detected, relying on defaults. Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-xml.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-http.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-soap.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/cxf/cxf-extension-jaxws.xml] Apr 12, 2008 12:44:57 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFO: Bean factory for application context [EMAIL PROTECTED]: [EMAIL PROTECTED] Apr 12, 2008 12:44:58 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Apr 12, 2008 12:44:58 PM org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker postProcessAfterInitialization INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Apr 12, 2008 12:44:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in [EMAIL PROTECTED]: defining beans [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl]; root of factory hierarchy Apr 12, 2008 12:44:58 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://webservices.daelab.net/temperature}TemperatureConversions from WSDL: file:/Users/timperrett/Documents/workspace/MyWeatherDemo/src/main/wsdl/temperature.wsdl On 12 Apr 2008, at 03:50, Glen Mazza wrote: Perhaps my client example may help you: http://www.jroller.com/gmazza/date/20070929 Glen
Re: Using cxf with external web-services
Awesome Glen, just the ticket! Oddly, my tester now works, although I get info messages output in the terminal, despite my global CXF logging level set to WARNING? Its not really a massive problem, but just a bit disconcerting having all that red output in eclipse. The messages Im getting are detailed below. Any help would be awesome :-) Cheers, Tim Apr 12, 2008 12:44:57 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing [EMAIL PROTECTED]: display name [EMAIL PROTECTED]; startup date [Sat Apr 12 12:44:57 BST 2008]; root of context hierarchy Apr 12, 2008 12:44:57 PM org.apache.cxf.bus.spring.BusApplicationContext getConfigResources INFO: No cxf.xml configuration file detected, relying on defaults. Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/ cxf/cxf.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/ cxf/cxf-extension-xml.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/ cxf/cxf-extension-http.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/ cxf/cxf-extension-soap.xml] Apr 12, 2008 12:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [META-INF/ cxf/cxf-extension-jaxws.xml] Apr 12, 2008 12:44:57 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory INFO: Bean factory for application context [EMAIL PROTECTED]: org [EMAIL PROTECTED] Apr 12, 2008 12:44:58 PM org.springframework.context.support.AbstractApplicationContext $BeanPostProcessorChecker postProcessAfterInitialization INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Apr 12, 2008 12:44:58 PM org.springframework.context.support.AbstractApplicationContext $BeanPostProcessorChecker postProcessAfterInitialization INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Apr 12, 2008 12:44:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org .springframework [EMAIL PROTECTED]: defining beans [cxf ,org .apache .cxf .bus .spring .Jsr250BeanPostProcessor ,org .apache .cxf .bus .spring .BusExtensionPostProcessor ,org .apache .cxf .resource .ResourceManager ,org .apache .cxf .configuration .Configurer ,org .apache .cxf .binding .BindingFactoryManager ,org .apache .cxf .transport .DestinationFactoryManager ,org .apache .cxf .transport .ConduitInitiatorManager ,org .apache .cxf .wsdl .WSDLManager ,org .apache .cxf .phase .PhaseManager ,org .apache .cxf .workqueue .WorkQueueManager ,org .apache .cxf .buslifecycle .BusLifeCycleManager ,org .apache .cxf .endpoint .ServerRegistry ,org .apache .cxf .endpoint .ServerLifeCycleManager ,org .apache .cxf .endpoint .ClientLifeCycleManager ,org .apache .cxf .transports .http .QueryHandlerRegistry ,org .apache .cxf .endpoint .EndpointResolverRegistry ,org .apache .cxf .headers .HeaderManager ,org .apache .cxf .catalog .OASISCatalogManager ,org .apache .cxf .endpoint .ServiceContractResolverRegistry ,org .apache .cxf .binding .xml .XMLBindingFactory ,org .apache .cxf .transport .http .policy .HTTPClientAssertionBuilder ,org .apache .cxf .transport .http .policy .HTTPServerAssertionBuilder ,org .apache .cxf .transport .http .ClientOnlyHTTPTransportFactory ,org .apache .cxf .binding .soap .SoapBindingFactory ,org .apache .cxf .binding .soap .SoapTransportFactory ,org .apache .cxf .binding .soap .customEditorConfigurer ,org .apache .cxf .jaxws .context .WebServiceContextResourceResolver ,org.apache.cxf.jaxws.context.WebServiceContextImpl]; root of factory hierarchy Apr 12, 2008 12:44:58 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://webservices.daelab.net/ temperature}TemperatureConversions from WSDL: file:/Users/timperrett/ Documents/workspace/MyWeatherDemo/src/main/wsdl/temperature.wsdl On 12 Apr 2008, at 03:50, Glen Mazza wrote: Perhaps my client example may help you:
Using cxf with external web-services
Hello everyone, suppose I want to write a client application to use the meteo webservice at this address: http://www.webservicex.net/globalweather.asmx?WSDL What are the steps to do so using CXF ? I've been using wsdl2java to geneate java classes and interfaces, but it's not quite clear how to combine such classes with cxf. In particular, up to now I've been using cxf to generate clients using the ClientProxyFactoryBean...or the DynamicClientfactory to generate the client. So, help is very appreciated. Cheers, Valerio -- http://www.linkedin.com/in/vschiavoni http://jroller.com/vschiavoni
Re: Using cxf with external web-services
Have you already had a look at http://cwiki.apache.org/CXF20DOC/a-simple-jax-ws-service.html ? -- View this message in context: http://www.nabble.com/Using-cxf-with-external-web-services-tp16627061p16627305.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Using cxf with external web-services
For the most part, you can just do: wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL Then in your code, just do: GlobalWeather weather = new GlobalWeather(); GlobalWeatherSoap port = weather.getGlobalWeatherSoap(); String result = port.getWeather(city, country); Dan On Friday 11 April 2008, Valerio Schiavoni wrote: Hello everyone, suppose I want to write a client application to use the meteo webservice at this address: http://www.webservicex.net/globalweather.asmx?WSDL What are the steps to do so using CXF ? I've been using wsdl2java to geneate java classes and interfaces, but it's not quite clear how to combine such classes with cxf. In particular, up to now I've been using cxf to generate clients using the ClientProxyFactoryBean...or the DynamicClientfactory to generate the client. So, help is very appreciated. Cheers, Valerio -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Using cxf with external web-services
This interested me, as Im trying to get to grips with CXF. I just tried to put together a basic client (and even tried the WSDL below) but im getting odd problems when trying to run it. Even in its most simple form (very similar to the hello world on the wiki - http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html ) I get this error: timperrett$ java com.timperrett.soap.temperature.App Starting... Exception in thread main java.lang.NoClassDefFoundError: javax/xml/ ws/Service at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 374) at com.timperrett.soap.temperature.App.main(App.java:31) Line 31 in my (extremely basic) application reads: 31: GlobalWeather weather = new GlobalWeather(); I have all the relevant imports etc but still no joy - any ideas? Cheers Tim On 11 Apr 2008, at 16:37, Daniel Kulp wrote: For the most part, you can just do: wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL Then in your code, just do: GlobalWeather weather = new GlobalWeather(); GlobalWeatherSoap port = weather.getGlobalWeatherSoap(); String result = port.getWeather(city, country);
Re: Using cxf with external web-services
The jaxws-api jar is missing of the classpath somehow. That class comes from that jar. Dan On Friday 11 April 2008, Tim Perrett wrote: This interested me, as Im trying to get to grips with CXF. I just tried to put together a basic client (and even tried the WSDL below) but im getting odd problems when trying to run it. Even in its most simple form (very similar to the hello world on the wiki - http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html ) I get this error: timperrett$ java com.timperrett.soap.temperature.App Starting... Exception in thread main java.lang.NoClassDefFoundError: javax/xml/ ws/Service at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124 ) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 374) at com.timperrett.soap.temperature.App.main(App.java:31) Line 31 in my (extremely basic) application reads: 31: GlobalWeather weather = new GlobalWeather(); I have all the relevant imports etc but still no joy - any ideas? Cheers Tim On 11 Apr 2008, at 16:37, Daniel Kulp wrote: For the most part, you can just do: wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL Then in your code, just do: GlobalWeather weather = new GlobalWeather(); GlobalWeatherSoap port = weather.getGlobalWeatherSoap(); String result = port.getWeather(city, country); -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Re: Using cxf with external web-services
Perhaps my client example may help you: http://www.jroller.com/gmazza/date/20070929 Glen Am Freitag, den 11.04.2008, 18:21 +0100 schrieb Tim Perrett: This interested me, as Im trying to get to grips with CXF. I just tried to put together a basic client (and even tried the WSDL below) but im getting odd problems when trying to run it. Even in its most simple form (very similar to the hello world on the wiki - http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html ) I get this error: timperrett$ java com.timperrett.soap.temperature.App Starting... Exception in thread main java.lang.NoClassDefFoundError: javax/xml/ ws/Service at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: 280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: 374) at com.timperrett.soap.temperature.App.main(App.java:31) Line 31 in my (extremely basic) application reads: 31: GlobalWeather weather = new GlobalWeather(); I have all the relevant imports etc but still no joy - any ideas? Cheers Tim On 11 Apr 2008, at 16:37, Daniel Kulp wrote: For the most part, you can just do: wsdl2java http://www.webservicex.net/globalweather.asmx?WSDL Then in your code, just do: GlobalWeather weather = new GlobalWeather(); GlobalWeatherSoap port = weather.getGlobalWeatherSoap(); String result = port.getWeather(city, country);
Suppress console output when using CXF
Hi all !! During execution of code using the CXF part it always print out lines like: 08.apr.2008 13:49:04 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://X.org/}ServiceX from WSDL: http://127.0.0.1/testme/ServiceX.asmx?wsdl Is it possible to suppress this info using a setting in a config. file etc.??? Thx in advance. :-) -- View this message in context: http://www.nabble.com/Suppress-console-output-when-using-CXF-tp16557802p16557802.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Suppress console output when using CXF
I suppose you could configure the logging levels and set the default level to something that doesn't include INFO: http://cwiki.apache.org/confluence/display/CXF20DOC/Debugging#Debugging-Configurelogginglevels. On 4/8/08, Curious1001 [EMAIL PROTECTED] wrote: Hi all !! During execution of code using the CXF part it always print out lines like: 08.apr.2008 13:49:04 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://X.org/}ServiceX from WSDL: http://127.0.0.1/testme/ServiceX.asmx?wsdl Is it possible to suppress this info using a setting in a config. file etc.??? Thx in advance. :-) -- View this message in context: http://www.nabble.com/Suppress-console-output-when-using-CXF-tp16557802p16557802.html Sent from the cxf-user mailing list archive at Nabble.com. -- Venlig hilsen / Kind regards, Christian Vest Hansen.
Re: Suppress console output when using CXF
Hi Glen!! Thank you very much. :-) Glen Mazza wrote: Yes. In the build.xml file in step #5 here[1], the run-client task, I specify the logging.properties file. Within that file, set the log level to warning or error and that should reduce almost all of the output. HTH, Glen [1] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1 Curious1001 wrote: Hi all !! During execution of code using the CXF part it always print out lines like: 08.apr.2008 13:49:04 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL INFO: Creating Service {http://X.org/}ServiceX from WSDL: http://127.0.0.1/testme/ServiceX.asmx?wsdl Is it possible to suppress this info using a setting in a config. file etc.??? Thx in advance. :-) -- View this message in context: http://www.nabble.com/Suppress-console-output-when-using-CXF-tp16557802p16558429.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Re-2: Using CXF in OSGi
Yes it leverages Spring-DM. The documentation is a bit rough, and if haven't had much time to test it on a very clean platform aso, so if you have any problems, please report so we can fix it asap. See http://cwiki.apache.org/SMX4/cxf-examples.html On Fri, Apr 4, 2008 at 3:32 AM, Glen Mazza [EMAIL PROTECTED] wrote: That sounds like a hint, Guillaume... ;-) Am Donnerstag, den 03.04.2008, 12:04 + schrieb [EMAIL PROTECTED]: Will Spring-DM also be a part of this example? Original Message Subject: Re: Using CXF in OSGi (03-Apr-2008 13:48) From:Guillaume Nodet [EMAIL PROTECTED] To: cxf-user@incubator.apache.org I'm just working on an example right now. I'll post more details asap. On Thu, Apr 3, 2008 at 1:29 PM, [EMAIL PROTECTED] wrote: Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: Using CXF in OSGi
The documentation is a bit rough, and if haven't had much time to test it on a very clean platform aso, so if you have any problems, please report so we can fix it asap. See http://cwiki.apache.org/SMX4/cxf-examples.html On Thu, Apr 3, 2008 at 1:48 PM, Guillaume Nodet [EMAIL PROTECTED] wrote: I'm just working on an example right now. I'll post more details asap. On Thu, Apr 3, 2008 at 1:29 PM, [EMAIL PROTECTED] wrote: Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: Re-2: Using CXF in OSGi
On Thu, Apr 3, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Will Spring-DM also be a part of this example? It really doesn't change much if it can be done with OSGi itself. Spring-DM is just an additional layer that lets use biuld bundles yet it could in turn complicate understanding of the real value of CXF on OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl
Re: Re-2: Using CXF in OSGi
The example I gave leverages Spring-DM. Spring-DM is a small layer above Spring that gives you a really simple way to build OSGi applications based on Spring. Of course, if you don't like spring, don't use Spring-DM. However, CXF is nicely integrated with Spring, so it makes sense. If you prefer, we also support OpenEJB / CXF in OSGi, though this is not finalized yet (but feedback and/or help is always welcome). In this model, the EJB3 annotated beans are automatically discovered and exposed. So no spring at all, and EJB3 annotations: it could make you happy ;-) On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski [EMAIL PROTECTED] wrote: On Thu, Apr 3, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Will Spring-DM also be a part of this example? It really doesn't change much if it can be done with OSGi itself. Spring-DM is just an additional layer that lets use biuld bundles yet it could in turn complicate understanding of the real value of CXF on OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re-4: Using CXF in OSGi
Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult for me to understand how this can help me with an OSGi platform like Equinox. I understand that CXF is provided as a module for ServiceMix, right? Can you provide some help on getting CXF to work on a normal OSGi platform? I had a look at the MANIFEST files of the CXF libraries but I couldn't find entries for OSGi. I'm a bit confused. :-) Original Message Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51) From:Guillaume Nodet [EMAIL PROTECTED] To: cxf-user@incubator.apache.org The example I gave leverages Spring-DM. Spring-DM is a small layer above Spring that gives you a really simple way to build OSGi applications based on Spring. Of course, if you don't like spring, don't use Spring-DM. However, CXF is nicely integrated with Spring, so it makes sense. If you prefer, we also support OpenEJB / CXF in OSGi, though this is not finalized yet (but feedback and/or help is always welcome). In this model, the EJB3 annotated beans are automatically discovered and exposed. So no spring at all, and EJB3 annotations: it could make you happy ;-) On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski [EMAIL PROTECTED] wrote: On Thu, Apr 3, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Will Spring-DM also be a part of this example? It really doesn't change much if it can be done with OSGi itself. Spring-DM is just an additional layer that lets use biuld bundles yet it could in turn complicate understanding of the real value of CXF on OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: Re-4: Using CXF in OSGi
Do the mailing lists have any problems ? I'm only receiving half of the messages :-( Or sometimes a few hours later ... On Fri, Apr 4, 2008 at 4:01 PM, Daniel Kulp [EMAIL PROTECTED] wrote: On Friday 04 April 2008, [EMAIL PROTECTED] wrote: Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult for me to understand how this can help me with an OSGi platform like Equinox. Because ServiceMix Kernel *is* an OSGi platform based on Felix with some value added. So everything that applies to Servicemix Kernel can be applied to any other OSGi platform, Equinox included. Bundles are bundles, eh ;-) I understand that CXF is provided as a module for ServiceMix, right? Can you provide some help on getting CXF to work on a normal OSGi platform? I had a look at the MANIFEST files of the CXF libraries but I couldn't find entries for OSGi. I'm a bit confused. :-) Basically, starting with 2.0.5, the big cxf bundle jar (cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the maven artifactId) does include an OSGI manifest. (although I noticed Guillaume did a fix for it last night so I'm not sure if the 2.0.5 version complete works, I'll get a 2.0.6 snapshot going now.) That said, since CXF doesn't really do any OSGI things ourselves, we don't worry about all the thirdparty jars. ServiceMix does. So basically, we have a bundle, but to really use it, you'll need to find/create a few other bundles for the third party deps (like jaxws-api, neethi, spring, wsdl4j, woodstox/stax, etc...). ServiceMix does provide bundles for all of those, but you probably could easily do much of that yourself as well. Yeah, there is a small problem with 2.0.5 OSGi manifest. Another way is to create one big bundle that includes all the dependencies if you prefer. The other thing SMX is providing is the cxf-osgi spring import thing that provides an OSGi http transport for the CXF component. That might be a good thing to pull directly into CXF as that should definitely be usable in other OSGi environments. Yes, it should. It can certainly be moved to CXF, was I just hacked it this week. But this is more a discussion for cxf-dev btw. Dan Original Message Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51) From:Guillaume Nodet [EMAIL PROTECTED] To: cxf-user@incubator.apache.org The example I gave leverages Spring-DM. Spring-DM is a small layer above Spring that gives you a really simple way to build OSGi applications based on Spring. Of course, if you don't like spring, don't use Spring-DM. However, CXF is nicely integrated with Spring, so it makes sense. If you prefer, we also support OpenEJB / CXF in OSGi, though this is not finalized yet (but feedback and/or help is always welcome). In this model, the EJB3 annotated beans are automatically discovered and exposed. So no spring at all, and EJB3 annotations: it could make you happy ;-) On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski [EMAIL PROTECTED] wrote: On Thu, Apr 3, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Will Spring-DM also be a part of this example? It really doesn't change much if it can be done with OSGi itself. Spring-DM is just an additional layer that lets use biuld bundles yet it could in turn complicate understanding of the real value of CXF on OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: Re-4: Using CXF in OSGi
On Friday 04 April 2008, [EMAIL PROTECTED] wrote: Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult for me to understand how this can help me with an OSGi platform like Equinox. I understand that CXF is provided as a module for ServiceMix, right? Can you provide some help on getting CXF to work on a normal OSGi platform? I had a look at the MANIFEST files of the CXF libraries but I couldn't find entries for OSGi. I'm a bit confused. :-) Basically, starting with 2.0.5, the big cxf bundle jar (cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the maven artifactId) does include an OSGI manifest. (although I noticed Guillaume did a fix for it last night so I'm not sure if the 2.0.5 version complete works, I'll get a 2.0.6 snapshot going now.) That said, since CXF doesn't really do any OSGI things ourselves, we don't worry about all the thirdparty jars. ServiceMix does. So basically, we have a bundle, but to really use it, you'll need to find/create a few other bundles for the third party deps (like jaxws-api, neethi, spring, wsdl4j, woodstox/stax, etc...). ServiceMix does provide bundles for all of those, but you probably could easily do much of that yourself as well. The other thing SMX is providing is the cxf-osgi spring import thing that provides an OSGi http transport for the CXF component. That might be a good thing to pull directly into CXF as that should definitely be usable in other OSGi environments. Dan Original Message Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51) From:Guillaume Nodet [EMAIL PROTECTED] To: cxf-user@incubator.apache.org The example I gave leverages Spring-DM. Spring-DM is a small layer above Spring that gives you a really simple way to build OSGi applications based on Spring. Of course, if you don't like spring, don't use Spring-DM. However, CXF is nicely integrated with Spring, so it makes sense. If you prefer, we also support OpenEJB / CXF in OSGi, though this is not finalized yet (but feedback and/or help is always welcome). In this model, the EJB3 annotated beans are automatically discovered and exposed. So no spring at all, and EJB3 annotations: it could make you happy ;-) On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski [EMAIL PROTECTED] wrote: On Thu, Apr 3, 2008 at 2:04 PM, [EMAIL PROTECTED] wrote: Will Spring-DM also be a part of this example? It really doesn't change much if it can be done with OSGi itself. Spring-DM is just an additional layer that lets use biuld bundles yet it could in turn complicate understanding of the real value of CXF on OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-) Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/ -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
Using CXF in OSGi
Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian
Re: Using CXF in OSGi
I'm just working on an example right now. I'll post more details asap. On Thu, Apr 3, 2008 at 1:29 PM, [EMAIL PROTECTED] wrote: Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Using CXF in OSGi
Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian
Re: Using CXF in OSGi
Hi Fabian, We use CXF in a bundle with equinox. We just put the CXF jars in a bundle and exported the packages from there. It works like a charm. Just be sure to export/import javax.xml.ws and similar packages or CXF won't detect the annotations (e.g. the ones for jax-ws) Regards Mayank [EMAIL PROTECTED] wrote: Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian
Re: Re-2: Using CXF in OSGi
That sounds like a hint, Guillaume... ;-) Am Donnerstag, den 03.04.2008, 12:04 + schrieb [EMAIL PROTECTED]: Will Spring-DM also be a part of this example? Original Message Subject: Re: Using CXF in OSGi (03-Apr-2008 13:48) From:Guillaume Nodet [EMAIL PROTECTED] To: cxf-user@incubator.apache.org I'm just working on an example right now. I'll post more details asap. On Thu, Apr 3, 2008 at 1:29 PM, [EMAIL PROTECTED] wrote: Hello! Are there already some working bundles of CXF for OSGi? I found a solved bug (CXF-490) on JIRA which says this is done. Does anyone have some advice on how to use it? Maybe examples? Best regards, Fabian -- Cheers, Guillaume Nodet Blog: http://gnodet.blogspot.com/
Re: Null paramaters using CXF when deployed to jetty with CXFServlet
Yes, I am using the jaxws client, and also SOAP UI. I get the same problem with both front ends. I used java2wsdl. This is the message that is getting sent: soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ns2:createPersonTypeInfo xmlns:ns2=http://student.kuali.org/poc/wsdl/personidentity/person; personTypeInfo name=PersonType1 setList set name=AttrSet1 attributeTypes name=Attr1 typeSTRING/type labelAttribute 1 Label/label /attributeTypes attributeTypes name=Attr2 typeDATE/type labelAttribute 2 Label/label /attributeTypes /set /setList /ns2:personTypeInfo /ns2:createPersonTypeInfo /soap:Body /soap:Envelope This results in a null parameter being set in the DocLiteralInInterceptor, but when I add the namespace and change the line personTypeInfo name=PersonType1 to ns2:personTypeInfo name=PersonType1, the parameters get set correctly. Strange! I removed the @XmlRootElement from my PersonTypeInfo class and it works now without the namespace prefix. Glen Mazza-2 wrote: Are you using CXF's simple front end instead of its jaxws front end? I think you want the latter for CXF. That might explain the problem. (Also, did you run wsdl2java to generate the JAXB mappings to the XSDs in the WSDL?) Glen Am Dienstag, den 01.04.2008, 12:21 -0700 schrieb depstei2: Hello, I have a web service that works fine when using cxf on Tomcat, but when I try to deploy on embedded jetty using the org.apache.cxf.transport.servlet.CXFServlet, I get null parameters in my service method calls, even though the cxf logger shows that the payloads of the messages contain correct data. When I switch to using sun's jaxws-rt's com.sun.xml.ws.transport.http.servlet.WSSpringServlet, the service will work as expected on jetty embedded. The null parameter does not occur when the parameter is a primitive type, but happens for all other parameter types. Has anyone come across this problem? Any ideas? -- View this message in context: http://www.nabble.com/Null-paramaters-using-CXF-when-deployed-to-jetty-with-CXFServlet-tp16422010p16447084.html Sent from the cxf-user mailing list archive at Nabble.com.
Null paramaters using CXF when deployed to jetty with CXFServlet
Hello, I have a web service that works fine when using cxf on Tomcat, but when I try to deploy on embedded jetty using the org.apache.cxf.transport.servlet.CXFServlet, I get null parameters in my service method calls, even though the cxf logger shows that the payloads of the messages contain correct data. When I switch to using sun's jaxws-rt's com.sun.xml.ws.transport.http.servlet.WSSpringServlet, the service will work as expected on jetty embedded. The null parameter does not occur when the parameter is a primitive type, but happens for all other parameter types. Has anyone come across this problem? Any ideas? -- View this message in context: http://www.nabble.com/Null-paramaters-using-CXF-when-deployed-to-jetty-with-CXFServlet-tp16422010p16422010.html Sent from the cxf-user mailing list archive at Nabble.com.
Exposing java Map fields using CXF to C++ code
Hi, I would like to get the general idea of what can be done with CXF or with SOAP in general. Can I use this library to expose java.util.Map based interface for Java, C++, php, python and co. code. I would like my user to pass me a list of parameters of Map String, ListString, which would be used as parameters for implementation class. Is this possible with CXF or even with SOAP in general ? Thank you, Maxim. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ?
Re: Exposing java Map fields using CXF to C++ code
CXF can expose a Map in one of three ways: 1) Using the Aegis databinding, CXF will automatically generate a schema from a Map. Other fully-compliant kits should be able to build clients from the WSDL that results. It won't, however, necessarily translate into a 'Map' on the client side. 2) Using CXF 2.1, still in snapshot only, you can use the complex JAXB mechanisms that allow support for maps. 3) You can roll your own: probably more like an explicit ListMap.Entrykey, value On Sun, Mar 9, 2008 at 10:34 AM, Maxim Veksler [EMAIL PROTECTED] wrote: Hi, I would like to get the general idea of what can be done with CXF or with SOAP in general. Can I use this library to expose java.util.Map based interface for Java, C++, php, python and co. code. I would like my user to pass me a list of parameters of Map String, ListString, which would be used as parameters for implementation class. Is this possible with CXF or even with SOAP in general ? Thank you, Maxim. -- Cheers, Maxim Veksler Free as in Freedom - Do u GNU ?
Using CXF with an Eclipse RCP Application
I created a CXF OSGi bundle using the Eclipse Plug-in form Existing JAR archive wizard. I used the latest SNAPSHOT CXF JAR: cxf-2.1-incubator-SNAPSHOT.jar I then added the org.apache.cxf package to the import-packages of my manifest.mf When I try to call my web services from my RCP application I receive the following error: !ENTRY org.eclipse.osgi 4 0 2008-02-08 16:53:50.999 !MESSAGE Application error !STACK 1 javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:38) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:133) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.init(Service.java:56) at javax.xml.ws.Service.create(Service.java:691) at cxf_client_test.Application.cxf(Application.java:22) at cxf_client_test.Application.start(Application.java:34) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) at org.eclipse.equinox.launcher.Main.main(Main.java:1148) Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl at java.lang.ClassLoader.findClass(ClassLoader.java:358) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:34) ... 19 more My understanding is that it should be calling the ProviderImpl provided by CXF. Has anyone had any luck calling Web Services via an Eclikpse RCP application??? If so any advice or help here would be much appreciated!!! -- View this message in context: http://www.nabble.com/Using-CXF-with-an-Eclipse-RCP-Application-tp15364789p15364789.html Sent from the cxf-user mailing list archive at Nabble.com.
Re: Using CXF with an Eclipse RCP Application
if your cxf libs and service sei/impl are in separate bundles then you need to import some non-cxf namespaces also in your service sei/impl bundles. just check the imports used by your sei, those should be imported by your manifest... for e.x. you would need javax.jws, javax.jms, javax.xml.ws, etc. there aren't many... i'll try to send a list On Feb 9, 2008 3:30 AM, Kyle.Bober [EMAIL PROTECTED] wrote: I created a CXF OSGi bundle using the Eclipse Plug-in form Existing JAR archive wizard. I used the latest SNAPSHOT CXF JAR: cxf-2.1-incubator-SNAPSHOT.jar I then added the org.apache.cxf package to the import-packages of my manifest.mf When I try to call my web services from my RCP application I receive the following error: !ENTRY org.eclipse.osgi 4 0 2008-02-08 16:53:50.999 !MESSAGE Application error !STACK 1 javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:38) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:133) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.init(Service.java:56) at javax.xml.ws.Service.create(Service.java:691) at cxf_client_test.Application.cxf(Application.java:22) at cxf_client_test.Application.start(Application.java:34) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) at org.eclipse.equinox.launcher.Main.main(Main.java:1148) Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl at java.lang.ClassLoader.findClass(ClassLoader.java:358) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:34) ... 19 more My understanding is that it should be calling the ProviderImpl provided by CXF. Has anyone had any luck calling Web Services via an Eclikpse RCP application??? If so any advice or help here would be much appreciated!!! -- View this message in context: http://www.nabble.com/Using-CXF-with-an-Eclipse-RCP-Application-tp15364789p15364789.html Sent from the cxf-user mailing list archive at Nabble.com.
RE: Using CXF with an Eclipse RCP Application
These might be enough: javax.annotation javax.jws javax.jws.soap javax.wsdl javax.wsdl.extensions javax.wsdl.extensions.http javax.wsdl.extensions.mime javax.wsdl.extensions.schema javax.wsdl.extensions.soap javax.wsdl.extensions.soap12 javax.wsdl.factory javax.wsdl.xml javax.xml.bind javax.xml.bind.annotation javax.xml.stream javax.xml.ws javax.xml.ws.handler javax.xml.namespace Regards Mayank This e-mail and attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient's) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it! -Original Message- From: Mayank Thakore [mailto:[EMAIL PROTECTED] Sent: Saturday, February 09, 2008 08:55 To: cxf-user@incubator.apache.org Subject: Re: Using CXF with an Eclipse RCP Application if your cxf libs and service sei/impl are in separate bundles then you need to import some non-cxf namespaces also in your service sei/impl bundles. just check the imports used by your sei, those should be imported by your manifest... for e.x. you would need javax.jws, javax.jms, javax.xml.ws, etc. there aren't many... i'll try to send a list On Feb 9, 2008 3:30 AM, Kyle.Bober [EMAIL PROTECTED] wrote: I created a CXF OSGi bundle using the Eclipse Plug-in form Existing JAR archive wizard. I used the latest SNAPSHOT CXF JAR: cxf-2.1-incubator-SNAPSHOT.jar I then added the org.apache.cxf package to the import-packages of my manifest.mf When I try to call my web services from my RCP application I receive the following error: !ENTRY org.eclipse.osgi 4 0 2008-02-08 16:53:50.999 !MESSAGE Application error !STACK 1 javax.xml.ws.WebServiceException: Provider com.sun.xml.ws.spi.ProviderImpl not found at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:38) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:133) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.init(Service.java:56) at javax.xml.ws.Service.create(Service.java:691) at cxf_client_test.Application.cxf(Application.java:22) at cxf_client_test.Application.start(Application.java:34) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java: 169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication( EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAp pLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) at org.eclipse.equinox.launcher.Main.main(Main.java:1148) Caused by: java.lang.ClassNotFoundException: com.sun.xml.ws.spi.ProviderImpl at java.lang.ClassLoader.findClass(ClassLoader.java:358) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFin der.java:124) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:34) ... 19 more My understanding is that it should be calling the ProviderImpl provided by CXF. Has anyone had any luck calling Web Services via an Eclikpse RCP application??? If so any advice or help here would be much appreciated!!! -- View this message in context: http://www.nabble.com/Using-CXF-with-an-Eclipse-RCP-Application-tp15364789p1 5364789.html Sent from the cxf-user mailing list archive at Nabble.com.
Transactional web service using CXF, Spring and JPA
Greetings, I've been experimenting with creating a transactional web service using CXF, Spring and JPA/Hibernate. The basic examples I've seen of such services look like this: @Transactional @WebService(...) public class MyService implements MyServiceInterface { @PersistenceContext private EntityManager em; public void myOperation() throws DataAccessException { ... // use injected entity manager em.find(...) ... } } and the Spring config has this: tx:annotation-driven transaction-manager=transactionManager / ... jaxws:server id=myService serviceClass=MyServiceInterface address=/Service jaxws:serviceBean bean id=myServiceBean class=MyService autowire=autodetect / /jaxws:serviceBean /jaxws:server Here's what I would expect to happen with a transactional web service based on JPA: - Request begins - System begins new unit of database work by creating a new EntityManager - All database interactions in the request use the same EntityManager - Request finishes processing - Transaction commits or rolls back (if an error occurred) - Response sent As far as I can tell, Spring is only creating one instance of my service bean, and injecting a single EntityManager into it when it does so. This clearly won't work when handling multiple concurrent requests, since EntityManager is not thread-safe and a new one needs to be instantiated for each unit of work. Is the above setup actually right? Can anyone point me to an example of how to wire this all together correctly? I'm about to give up on using Spring transactional support and go back to just implementing my own simple transactional wrapper and making the EntityManager available to DAOs through a ThreadLocal. Thanks, Karl __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Transactional web service using CXF, Spring and JPA
Hi, You need to delegate the transaction to spring, not the cxf. like: jaxws:endpoint id=myService implementorClass=net.java.dev.service.MyServiceImpl implementor=#myService address=/theService /jaxws:endpoint bean id=myService class=net.java.dev.service.MyServiceImpl /bean ... here the myService is with transaction, with other spring-specific config to add transaction. Best Regards Jeff Karl Goldstein wrote: Greetings, I've been experimenting with creating a transactional web service using CXF, Spring and JPA/Hibernate. The basic examples I've seen of such services look like this: @Transactional @WebService(...) public class MyService implements MyServiceInterface { @PersistenceContext private EntityManager em; public void myOperation() throws DataAccessException { ... // use injected entity manager em.find(...) ... } } and the Spring config has this: tx:annotation-driven transaction-manager=transactionManager / ... jaxws:server id=myService serviceClass=MyServiceInterface address=/Service jaxws:serviceBean bean id=myServiceBean class=MyService autowire=autodetect / /jaxws:serviceBean /jaxws:server Here's what I would expect to happen with a transactional web service based on JPA: - Request begins - System begins new unit of database work by creating a new EntityManager - All database interactions in the request use the same EntityManager - Request finishes processing - Transaction commits or rolls back (if an error occurred) - Response sent As far as I can tell, Spring is only creating one instance of my service bean, and injecting a single EntityManager into it when it does so. This clearly won't work when handling multiple concurrent requests, since EntityManager is not thread-safe and a new one needs to be instantiated for each unit of work. Is the above setup actually right? Can anyone point me to an example of how to wire this all together correctly? I'm about to give up on using Spring transactional support and go back to just implementing my own simple transactional wrapper and making the EntityManager available to DAOs through a ThreadLocal. Thanks, Karl __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Transactional web service using CXF, Spring and JPA
Yep, CXF has the invoker[1] to take care the whole invoking stuff. Jeff just showed you the basic use scenario which treats the implementor as a singleton in the default bean Invoker. All the client sides concurrency invocations will be end up in this singleton invoker, so we can still use the spring to transaction management here. [1]http://cwiki.apache.org/CXF20DOC/invokers.html Willem. Jeff Yu wrote: Hi, You need to delegate the transaction to spring, not the cxf. like: jaxws:endpoint id=myService implementorClass=net.java.dev.service.MyServiceImpl implementor=#myService address=/theService /jaxws:endpoint bean id=myService class=net.java.dev.service.MyServiceImpl /bean ... here the myService is with transaction, with other spring-specific config to add transaction. Best Regards Jeff Karl Goldstein wrote: Greetings, I've been experimenting with creating a transactional web service using CXF, Spring and JPA/Hibernate. The basic examples I've seen of such services look like this: @Transactional @WebService(...) public class MyService implements MyServiceInterface { @PersistenceContext private EntityManager em; public void myOperation() throws DataAccessException { ... // use injected entity manager em.find(...) ... } } and the Spring config has this: tx:annotation-driven transaction-manager=transactionManager / ... jaxws:server id=myService serviceClass=MyServiceInterface address=/Service jaxws:serviceBean bean id=myServiceBean class=MyService autowire=autodetect / /jaxws:serviceBean /jaxws:server Here's what I would expect to happen with a transactional web service based on JPA: - Request begins - System begins new unit of database work by creating a new EntityManager - All database interactions in the request use the same EntityManager - Request finishes processing - Transaction commits or rolls back (if an error occurred) - Response sent As far as I can tell, Spring is only creating one instance of my service bean, and injecting a single EntityManager into it when it does so. This clearly won't work when handling multiple concurrent requests, since EntityManager is not thread-safe and a new one needs to be instantiated for each unit of work. Is the above setup actually right? Can anyone point me to an example of how to wire this all together correctly? I'm about to give up on using Spring transactional support and go back to just implementing my own simple transactional wrapper and making the EntityManager available to DAOs through a ThreadLocal. Thanks, Karl __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Using CXF to create url-as-function-call web APIs?
Hi - We're looking to create a RESTful web API for a specialized search engine and were hoping to use CXF. However, I can't figure out how to create URL-based access to the core search functionality. As a search engine, the API will primarily be built around a single, parameterized call to the search engine, which then returns serialized results in XML or JSON. We are modeling the API on http://developer.yahoo.com/search/rest.html in terms of philosophy and design. I've looked through the docs and it seems that CXF can help us generate SOAP-based APIs or a non-query-based REST api, neither of which appear to support the url-as-simple-function-call model. I realize that the latter may not fit some definitions of REST, but it does seem to be a useful and common way to allow API-based access to a search functionalities in many contexts. Can CXF help us with this? If so, can someone point me to a recipe or sample implementation? And if not, is there another library we should look at to help expose our Java code to Web calls in this way? Thanks in advance for your time! Ramon Ramon M. Felciano Chief Technology Officer and VP, Research INGENUITY Systems, Inc. 1700 Seaport Blvd., 3rd Floor Redwood City, CA 94063 650.381.5100 phone 650.963.3399 fax E-mail: [EMAIL PROTECTED] + This email message (and any attached document) contains information from Ingenuity Systems Inc. which may be considered confidential by Ingenuity, or which may be privileged or otherwise exempt from disclosure under law, and is for the sole use of the individual or entity to whom it is addressed. Any other dissemination, distribution or copying of this message is strictly prohibited. If you receive this message in error, please notify me and destroy the attached message (and all attached documents) immediately.
Transferring files using CXF
Hi I would like to evaluate file transfer performances using web services (and especially cxf) using different file size and would like to compare this to ftp, ... What are the different ways of doing this using CXF ? Has anyone done similar test and could report results ? Is anyone willing to share some code ? Thanks -- Best Regards Guillaume
RE: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.
My experience is that commenting on the Wiki pages is like a quantum process. Willem fixes them more or less instantly. -Original Message- From: Freeman Fang [mailto:[EMAIL PROTECTED] Sent: Thursday, July 19, 2007 10:55 PM To: cxf-user@incubator.apache.org Subject: Re: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container. Hi Benson, FYI, I just know Willem update this wiki page today. So what I see may not same as you saw. Best Regards Freeman Freeman Fang wrote: Hi Benson, I think you should follow spring_http sample. The doc from wiki might out of date, but the working demo is more believable. :-) Btw, I roughly check this wiki page and spring_http sample, they are pretty much match with each other. Would you please mark what kind of macros defined in the sample is not match the wiki, so that we can update the wiki. Best Regards Freeman Benson Margulies wrote: Before I started discovering various issues in the migration from xfire to cxf, my original goal was to wrap up a service of mine for deployment in a servlet container. The code of my service is set up to use Spring to wire together various of its bits and pieces. I'm looking at the macros defined in the samples, and I see one or two things that give me a pause. They don't look that much like http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html. Should I just follow the wiki and ignore the samples?
RE: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.
I see that the Wiki and the spring_http samples are perfectly aligned. My confusion resulted from looking at hello_world, which is another thing altogether. What's going on in there? The hello sample carefully deploys a prebuilt, static, WSDL file. Why not just let the service handle the ?wsdl URL, as usual? The cxf.xml for hello_world uses complex {} namespaces. The wiki doesn't. It has a SOAPService bean. ?
Re: Using CXF
Cool. Everything works now. Including the serviceBean=#somebean. Thanks again, Jacob On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote: I think that section of the migration guide assumes that you've already imported the cxf bean definitions into your application. The cxf-* resources include some basic CXF bean definitions which are necessary to use CXF inside your spring application - like a definition for the Servlet transport or the Binding manager. So yes, you need to import these if you're going to use jaxws:endpoint, jaxws:client, etc. Regards, - Dan On 7/18/07, Jacob Marcus [EMAIL PROTECTED] wrote: If my services are defined in the cxf.xml, do I still need to import the cxf bean definitions.? I followed the instructions on this wiki page. http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-services.xml Or are you saying that if I want to use a bean defined else where in my cxf.xml, then I should import these ? Thanks, Jacob On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, You need to import the CXF bean definitions: import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf- extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / You can find for more details here: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html Cheers, - Dan On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am not importing the cxf bean definitions in my spring configuration. Here is my cxf.xml file. beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:simple=http://cxf.apache.org/simple; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd; simple:server id=Test address=/hello serviceBean=#helloService serviceClass= com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello /simple:server /beans The relevant portions of my web.xml is below. context-param param-namecontextConfigLocation/param-name param-value classpath:configuration-sprcfg.xml, classpath:version-configuration-sprcfg.xml, classpath:jmx-sprcfg.xml, classpath:storage-common-sprcfg.xml, classpath:services-authorization-sprcfg.xml, classpath:services-sprcfg.xml, classpath:cl-http-security-sprcfg.xml, classpath:soap-sprcfg.xml /param-value /context-param servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup3/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/cxfservices/*/url-pattern /servlet-mapping listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote: Can you show me what your web.xml and whole cxf.xml look like? How are you importing the CXF bean definitions? Thanks, - Dan On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote: Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId
Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.
Before I started discovering various issues in the migration from xfire to cxf, my original goal was to wrap up a service of mine for deployment in a servlet container. The code of my service is set up to use Spring to wire together various of its bits and pieces. I'm looking at the macros defined in the samples, and I see one or two things that give me a pause. They don't look that much like http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html. Should I just follow the wiki and ignore the samples?
Re: Back to a really basic question: using CXF+Spring to deploy a JAX-WS+Aegis service behind a servlet container.
Hi Benson, FYI, I just know Willem update this wiki page today. So what I see may not same as you saw. Best Regards Freeman Freeman Fang wrote: Hi Benson, I think you should follow spring_http sample. The doc from wiki might out of date, but the working demo is more believable. :-) Btw, I roughly check this wiki page and spring_http sample, they are pretty much match with each other. Would you please mark what kind of macros defined in the sample is not match the wiki, so that we can update the wiki. Best Regards Freeman Benson Margulies wrote: Before I started discovering various issues in the migration from xfire to cxf, my original goal was to wrap up a service of mine for deployment in a servlet container. The code of my service is set up to use Spring to wire together various of its bits and pieces. I'm looking at the macros defined in the samples, and I see one or two things that give me a pause. They don't look that much like http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html. Should I just follow the wiki and ignore the samples?
Re: Using CXF
Hi Jacob, You need to import the CXF bean definitions: import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / You can find for more details here: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html Cheers, - Dan On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am not importing the cxf bean definitions in my spring configuration. Here is my cxf.xml file. beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:simple=http://cxf.apache.org/simple; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd; simple:server id=Test address=/hello serviceBean=#helloService serviceClass= com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello /simple:server /beans The relevant portions of my web.xml is below. context-param param-namecontextConfigLocation/param-name param-value classpath:configuration-sprcfg.xml, classpath:version-configuration-sprcfg.xml, classpath:jmx-sprcfg.xml, classpath:storage-common-sprcfg.xml, classpath:services-authorization-sprcfg.xml, classpath:services-sprcfg.xml, classpath:cl-http-security-sprcfg.xml, classpath:soap-sprcfg.xml /param-value /context-param servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup3/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/cxfservices/*/url-pattern /servlet-mapping listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote: Can you show me what your web.xml and whole cxf.xml look like? How are you importing the CXF bean definitions? Thanks, - Dan On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote: Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version2.0-incubator/version /dependency That will set you up to use the JAX-WS style annotated web services with JAXB. Spring is included by default. Let us know if you have more questions. I'll try to add this to the xfire user's guide. - Dan On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-jaxb2/artifactId version1.2.5/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-spring/artifactId version1.2.5/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion /exclusions /dependency dependency
Re: Using CXF
If my services are defined in the cxf.xml, do I still need to import the cxf bean definitions.? I followed the instructions on this wiki page. http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-services.xml Or are you saying that if I want to use a bean defined else where in my cxf.xml, then I should import these ? Thanks, Jacob On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, You need to import the CXF bean definitions: import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / You can find for more details here: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html Cheers, - Dan On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am not importing the cxf bean definitions in my spring configuration. Here is my cxf.xml file. beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:simple=http://cxf.apache.org/simple; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd; simple:server id=Test address=/hello serviceBean=#helloService serviceClass= com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello /simple:server /beans The relevant portions of my web.xml is below. context-param param-namecontextConfigLocation/param-name param-value classpath:configuration-sprcfg.xml, classpath:version-configuration-sprcfg.xml, classpath:jmx-sprcfg.xml, classpath:storage-common-sprcfg.xml, classpath:services-authorization-sprcfg.xml, classpath:services-sprcfg.xml, classpath:cl-http-security-sprcfg.xml, classpath:soap-sprcfg.xml /param-value /context-param servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup3/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/cxfservices/*/url-pattern /servlet-mapping listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote: Can you show me what your web.xml and whole cxf.xml look like? How are you importing the CXF bean definitions? Thanks, - Dan On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote: Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version2.0-incubator/version /dependency That will set you up to use the JAX-WS style annotated web services with JAXB. Spring is included by default. Let us know if you have more questions. I'll try to add this to the xfire user's guide. - Dan On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency
Re: Using CXF
I think that section of the migration guide assumes that you've already imported the cxf bean definitions into your application. The cxf-* resources include some basic CXF bean definitions which are necessary to use CXF inside your spring application - like a definition for the Servlet transport or the Binding manager. So yes, you need to import these if you're going to use jaxws:endpoint, jaxws:client, etc. Regards, - Dan On 7/18/07, Jacob Marcus [EMAIL PROTECTED] wrote: If my services are defined in the cxf.xml, do I still need to import the cxf bean definitions.? I followed the instructions on this wiki page. http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-services.xml Or are you saying that if I want to use a bean defined else where in my cxf.xml, then I should import these ? Thanks, Jacob On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, You need to import the CXF bean definitions: import resource=classpath:META-INF/cxf/cxf.xml / import resource=classpath:META-INF/cxf/cxf-extension-soap.xml / import resource=classpath:META-INF/cxf/cxf-servlet.xml / You can find for more details here: http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html Cheers, - Dan On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am not importing the cxf bean definitions in my spring configuration. Here is my cxf.xml file. beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:simple=http://cxf.apache.org/simple; xsi:schemaLocation= http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd; simple:server id=Test address=/hello serviceBean=#helloService serviceClass= com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello /simple:server /beans The relevant portions of my web.xml is below. context-param param-namecontextConfigLocation/param-name param-value classpath:configuration-sprcfg.xml, classpath:version-configuration-sprcfg.xml, classpath:jmx-sprcfg.xml, classpath:storage-common-sprcfg.xml, classpath:services-authorization-sprcfg.xml, classpath:services-sprcfg.xml, classpath:cl-http-security-sprcfg.xml, classpath:soap-sprcfg.xml /param-value /context-param servlet servlet-nameCXFServlet/servlet-name display-nameCXF Servlet/display-name servlet-class org.apache.cxf.transport.servlet.CXFServlet /servlet-class load-on-startup3/load-on-startup /servlet servlet-mapping servlet-nameCXFServlet/servlet-name url-pattern/cxfservices/*/url-pattern /servlet-mapping listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote: Can you show me what your web.xml and whole cxf.xml look like? How are you importing the CXF bean definitions? Thanks, - Dan On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote: Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId
Re: Using CXF
Can you show me what your web.xml and whole cxf.xml look like? How are you importing the CXF bean definitions? Thanks, - Dan On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote: Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version2.0-incubator/version /dependency That will set you up to use the JAX-WS style annotated web services with JAXB. Spring is included by default. Let us know if you have more questions. I'll try to add this to the xfire user's guide. - Dan On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-jaxb2/artifactId version1.2.5/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-spring/artifactId version1.2.5/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion /exclusions /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-java5/artifactId version1.2.5/version /dependency Do we have something similar for CXF? I use spring. -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
Re: Using CXF
Thanks Dan. That worked. from the cxf.xml I would like to refer to a bean defined else where like, simple:server id=Test address= http://localhost:8081/tes/cxfservices/HelloWorld; serviceClass=com.test.HelloWorld simple:serviceBean#helloService/simple:serviceBean /simple:server This is giving me an error saying the bean with id helloService cannot be found. It appears that the SpringBusFactory does not have the bean definition. Is there a way I can instruct the server to use a specific bus? My spring application context is defined in the web.xml and I use the ContextLoaderListener. My problem is that the cxf.xml does not seem to be able to refer to beans in my application context. Thanks in advance for your help, Jacob On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote: Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version2.0-incubator/version /dependency That will set you up to use the JAX-WS style annotated web services with JAXB. Spring is included by default. Let us know if you have more questions. I'll try to add this to the xfire user's guide. - Dan On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-jaxb2/artifactId version1.2.5/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-spring/artifactId version1.2.5/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion /exclusions /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-java5/artifactId version1.2.5/version /dependency Do we have something similar for CXF? I use spring. -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
Re: Using CXF
Hi Jacob, I would go with something like: dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-frontend-jaxws/artifactId version2.0-incubator/version /dependency dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http/artifactId version2.0-incubator/version /dependency !-- Jetty is needed if you're are not using the CXFServlet -- dependency groupIdorg.apache.cxf/groupId artifactIdcxf-rt-transports-http-jetty/artifactId version2.0-incubator/version /dependency That will set you up to use the JAX-WS style annotated web services with JAXB. Spring is included by default. Let us know if you have more questions. I'll try to add this to the xfire user's guide. - Dan On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote: I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-jaxb2/artifactId version1.2.5/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-spring/artifactId version1.2.5/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion /exclusions /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-java5/artifactId version1.2.5/version /dependency Do we have something similar for CXF? I use spring. -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
Using CXF
I am an XFire user planning to evaluate CXF for my project. What is the maven dependency for CXF to be used? While using XFire, I had the following dependencies. dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-jaxb2/artifactId version1.2.5/version /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-spring/artifactId version1.2.5/version exclusions exclusion groupIdorg.springframework/groupId artifactIdspring/artifactId /exclusion /exclusions /dependency dependency groupIdorg.codehaus.xfire/groupId artifactIdxfire-java5/artifactId version1.2.5/version /dependency Do we have something similar for CXF? I use spring.
Using CXF with QPid
Hi there, Does anyone have any experience putting Qpid under CXF? I'd like to configure a JMS transport so that it uses Qpid (and this AMQP) instead of ActiveMQ. Here's what I've guessed so far - any help is greatly appreciated. At the moment, my server wont start because of the jndiConnectionFactoryName - I'm not sure what this should be set to. Have tried ConnectionFactory (as per ActiveMQ) but it doesn't work :-( wsdl:port name=SOAPOverAMQPEndpoint binding=tns:UBL-InvoiceProcessorSOAP jms:address destinationStyle=queue initialContextFactory=org.apache.qpid.jndi.PropertiesFileInitialContext Factory jndiDestinationName=demo-ubl jndiConnectionFactoryName= messageType=text useMessageIDAsCorrelationID=true jms:JMSNamingProperty name=java.naming.factory.initial value=org.apache.qpid.jndi.PropertiesFileInitialContextFactory / jms:JMSNamingProperty name=java.naming.provider.url value=amqp:///test?brokerlist='localhost'/ /jms:address /wsdl:port Thanks, Ade. Adrian Trenaman Principal Consultant, IONA Technologies. E: [EMAIL PROTECTED] P: +353-1-6372659 M: +353-86-6051026
RE: Using CXF with QPid
Hi, I got this working by having the following in the wsdl: jms:address destinationStyle=queue jndiConnectionFactoryName=local jndiDestinationName=dynamicQueues jndiReplyDestinationName=dynamicQueues2 jms:JMSNamingProperty name=java.naming.factory.initial value=org.apache.qpid.jndi.PropertiesFileInitialContextFactory/ jms:JMSNamingProperty name=java.naming.provider.url value=tcp://localhost:5672/ jms:JMSNamingProperty name=connectionfactory.local value=amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://localhost:5672 '/ jms:JMSNamingProperty name=queue.dynamicQueues value=queue://queuetest/ jms:JMSNamingProperty name=queue.dynamicQueues2 value=queue://queuetest2/ /jms:address Hope this helps, Suresh -Original Message- From: Trenaman, Adrian [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 1:11 PM To: cxf-user@incubator.apache.org Subject: Using CXF with QPid Hi there, Does anyone have any experience putting Qpid under CXF? I'd like to configure a JMS transport so that it uses Qpid (and this AMQP) instead of ActiveMQ. Here's what I've guessed so far - any help is greatly appreciated. At the moment, my server wont start because of the jndiConnectionFactoryName - I'm not sure what this should be set to. Have tried ConnectionFactory (as per ActiveMQ) but it doesn't work :-( wsdl:port name=SOAPOverAMQPEndpoint binding=tns:UBL-InvoiceProcessorSOAP jms:address destinationStyle=queue initialContextFactory=org.apache.qpid.jndi.PropertiesFileInitialContext Factory jndiDestinationName=demo-ubl jndiConnectionFactoryName= messageType=text useMessageIDAsCorrelationID=true jms:JMSNamingProperty name=java.naming.factory.initial value=org.apache.qpid.jndi.PropertiesFileInitialContextFactory / jms:JMSNamingProperty name=java.naming.provider.url value=amqp:///test?brokerlist='localhost'/ /jms:address /wsdl:port Thanks, Ade. Adrian Trenaman Principal Consultant, IONA Technologies. E: [EMAIL PROTECTED] P: +353-1-6372659 M: +353-86-6051026
RE: Using CXF with QPid
Hi Adrian, Just want to add that you need all Qpid changes since December 29 for this to work. Let me know if you still get problems with this. Regards, Suresh -Original Message- From: Kodichath, Suresh [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 1:44 PM To: cxf-user@incubator.apache.org Subject: RE: Using CXF with QPid Hi, I got this working by having the following in the wsdl: jms:address destinationStyle=queue jndiConnectionFactoryName=local jndiDestinationName=dynamicQueues jndiReplyDestinationName=dynamicQueues2 jms:JMSNamingProperty name=java.naming.factory.initial value=org.apache.qpid.jndi.PropertiesFileInitialContextFactory/ jms:JMSNamingProperty name=java.naming.provider.url value=tcp://localhost:5672/ jms:JMSNamingProperty name=connectionfactory.local value=amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://localhost:5672 '/ jms:JMSNamingProperty name=queue.dynamicQueues value=queue://queuetest/ jms:JMSNamingProperty name=queue.dynamicQueues2 value=queue://queuetest2/ /jms:address Hope this helps, Suresh -Original Message- From: Trenaman, Adrian [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 1:11 PM To: cxf-user@incubator.apache.org Subject: Using CXF with QPid Hi there, Does anyone have any experience putting Qpid under CXF? I'd like to configure a JMS transport so that it uses Qpid (and this AMQP) instead of ActiveMQ. Here's what I've guessed so far - any help is greatly appreciated. At the moment, my server wont start because of the jndiConnectionFactoryName - I'm not sure what this should be set to. Have tried ConnectionFactory (as per ActiveMQ) but it doesn't work :-( wsdl:port name=SOAPOverAMQPEndpoint binding=tns:UBL-InvoiceProcessorSOAP jms:address destinationStyle=queue initialContextFactory=org.apache.qpid.jndi.PropertiesFileInitialContext Factory jndiDestinationName=demo-ubl jndiConnectionFactoryName= messageType=text useMessageIDAsCorrelationID=true jms:JMSNamingProperty name=java.naming.factory.initial value=org.apache.qpid.jndi.PropertiesFileInitialContextFactory / jms:JMSNamingProperty name=java.naming.provider.url value=amqp:///test?brokerlist='localhost'/ /jms:address /wsdl:port Thanks, Ade. Adrian Trenaman Principal Consultant, IONA Technologies. E: [EMAIL PROTECTED] P: +353-1-6372659 M: +353-86-6051026