You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Fabio <fa...@gft.com> on 2010/11/10 12:28:08 UTC

CXF without Spring dependency

Hi All,

Is it possible create a simple CXF client without Spring?
Because I'm developing an business component and the projects that are going
to use it, might have or not Spring or even have a very old Spring version.

Thanks a lot.
-- 
View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p3258494.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF without Spring dependency

Posted by mayankeagle <ma...@yahoo.com>.
Can anyone tell me valid values for the in and out interceptors to be used in
case I'm using CXF without Spring
?

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p5710827.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF without Spring dependency

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 24/06/12 16:26, mayankeagle wrote:
> I'm also trying CXF 2.6.1 without Spring. I'm getting a
> ClassNotFoundException - I guess its for the CustomInInterceptor and
> CustomOutInterceptor classes. They are not in the JAR files that come with
> the download. Were you using these classes or did you write your own class?
>
The documentation lists the custom 
org.apache.cxf.systest.jaxrs.CustomInInterceptor, note the package name, 
that fragment is not meant to be copied and pasted as is, but is there 
to show what configuration parameters are supported

Cheers, Sergey
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p5710178.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: CXF without Spring dependency

Posted by mayankeagle <ma...@yahoo.com>.
I'm also trying CXF 2.6.1 without Spring. I'm getting a
ClassNotFoundException - I guess its for the CustomInInterceptor and
CustomOutInterceptor classes. They are not in the JAR files that come with
the download. Were you using these classes or did you write your own class?


--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p5710178.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF without Spring dependency

Posted by "aditimohan14@gmail.com" <ad...@gmail.com>.
Here is the log:
org.w3c.dom.DOMException: DOM002 Illegal character
org.apache.xerces.dom.ElementNSImpl.setPrefix(ElementNSImpl.java:214)
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:946)
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:927)

org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:854)
org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:843)
org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:821)
org.apache.cxf.bus.extension.ExtensionFragmentParser.getExtensions(ExtensionFragmentParser.java:45)
org.apache.cxf.bus.extension.ExtensionManagerImpl.loadFragment(ExtensionManagerImpl.java:149)
org.apache.cxf.bus.extension.ExtensionManagerImpl.load(ExtensionManagerImpl.java:143)
org.apache.cxf.bus.extension.ExtensionManagerImpl.load(ExtensionManagerImpl.java:96)
org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:129)
org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:41)
org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:37)
org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:33)
org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBusNoConfig(CXFNonSpringServlet.java:45)
org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSpringServlet.java:38)
cmsapi.rest.RESTServlet.loadBus(RESTServlet.java:15)

 
Servlet:
@Override
public void loadBus(ServletConfig servletConfig) throws ServletException {
super.loadBus(servletConfig); 
Bus cxfbus = new CXFBusFactory().createBus();
BusFactory.setDefaultBus(cxfbus);
BusFactory.setThreadDefaultBus(cxfbus);
ServerFactoryBean factory = new ServerFactoryBean(); 
factory.setBus(cxfbus);
factory.setServiceClass(SampleRestServiceImpl.class); 
factory.setAddress("/testrest"); 
factory.create(); 
}
Am very new to this and just trying ti get sample app up. Thanks for quick
reply.
-Aditi
-- 
View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p3368749.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF without Spring dependency

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 02 February 2011 6:20:56 pm aditimohan14@gmail.com wrote:
> I tried to configure CXF without Spring and am getting this error:
> org.w3c.dom.DOMException: DOM002 Illegal character
> 	org.apache.xerces.dom.ElementNSImpl.setPrefix(ElementNSImpl.java:214)
> 	org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:946)
> 	org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:927)
> 
> It seems it's looking for some xml file  but not yet sure how to solve this
> problem. Any help would be appreciated.

Is there more to that stack trace?   I'd like to know where StaxUtils is being 
called as that may help indicate where to look.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: CXF without Spring dependency

Posted by "aditimohan14@gmail.com" <ad...@gmail.com>.
I tried to configure CXF without Spring and am getting this error:
org.w3c.dom.DOMException: DOM002 Illegal character
	org.apache.xerces.dom.ElementNSImpl.setPrefix(ElementNSImpl.java:214)
	org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:946)
	org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:927)

It seems it's looking for some xml file  but not yet sure how to solve this
problem. Any help would be appreciated.
-- 
View this message in context: http://cxf.547215.n5.nabble.com/CXF-without-Spring-dependency-tp3258494p3368625.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXF without Spring dependency

Posted by Daniel Kulp <dk...@apache.org>.
On Wednesday 10 November 2010 6:28:08 am Fabio wrote:
> Hi All,
> 
> Is it possible create a simple CXF client without Spring?
> Because I'm developing an business component and the projects that are
> going to use it, might have or not Spring or even have a very old Spring
> version.

The only  place where spring is absolutely REQUIRED is the JMS transport as it 
relies on the Spring messaging templates.    For the rest of the stuff, you 
can CXF without spring, but it may take a little extra effort.   A bunch of 
things like policies and the new annotation processing and stuff are not wired 
in without spring right now so to take advantage of those, you would need to 
do some pre-setup coding (add extensions to the bus and such).    For the 
"basic" 80% cases, you shouldn't need to do any of that.   

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: CXF without Spring dependency

Posted by Willem Jiang <wi...@gmail.com>.
If you are not using some advance WS* feature, my answer is yes.
You just need to make sure you didn't put the spring jars into you class 
patch.

On 11/10/10 7:28 PM, Fabio wrote:
>
> Hi All,
>
> Is it possible create a simple CXF client without Spring?
> Because I'm developing an business component and the projects that are going
> to use it, might have or not Spring or even have a very old Spring version.
>
> Thanks a lot.


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang