I think you can use ssl to secure your RESTful service and don't know if there is other way to do it. AFAIK Jervis just commit a sample of it [1], please check it out from 2.1 snapshot ;)

BTW,
I think we need keep our conversion in the CXF user group, to share the knowledge more wildly.

[1]http://svn.apache.org/viewvc?rev=609880&view=rev

Willem.

[EMAIL PROTECTED] wrote:
Thanks a lot william. my application works fine, i just changed the version to 2.0.3. with 2.1 it doesnt work. but this example is for the SOAP thing, is there any security we can enable for the RESTful http service.
Can you help me in doing this. As well as on the key generation for the SOAP WS

willem.jiang wrote:
Hi

Which CXF version are you using?
Please check your class to make sure cxf module jars are consistent.
If they are CXF 2.0.3 please make sure there is no any CXF 2.0.2 or CXF 2.1 jars in your class path.

I just checked the CXF codes, there some changes of org.apache.cxf.wsdl11.WSDLManagerImpl in Nov 2007 which may relate to your issue.


Willem.
priya j wrote:
Hi All,
Thanks a lot for the CXF Support team.

I have used CXF to web Service my application, now i need to include
security to my application.
When i tried the callback in the CXF Sample im getting an error in import
org.apache.callback.* , i hav included the cxf-manifest-incubator.jar.

Please do help in solving this.
I even tried the WS-Security in
http://arsenalist.com/2007/07/31/cxf-ws-security-using-jsr-181-interceptor-annotations-xfire-migration/

the server runs fine, when i try executing my client i get the following
error.

Jan 8, 2008 9:50:30 AM org.apache.cxf.configuration.spring.ConfigurerImpl
<init>
INFO: Could not find the configuration file cxf.xml on the classpath.
Jan 8, 2008 9:50:30 AM org.apache.cxf.bus.spring.SpringBusFactory
createBus
WARNING: Failed to create application context.
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path
resource
[META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate
bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
exception; nested exception is java.lang.NoSuchFieldError: SCHEMA_QNAME
Caused by: org.springframework.beans.BeanInstantiationException: Could
not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor
threw exception; nested exception is java.lang.NoSuchFieldError:
SCHEMA_QNAME
Caused by: java.lang.NoSuchFieldError: SCHEMA_QNAME
        at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:80)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:756)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:721)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:384)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:71)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:84)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
        at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
        at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
        at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
        at
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:54)
        at javax.xml.ws.Service.<init>(Unknown Source)
        at
sg.sphsearch.sfe.callback.server.SportsService_Service.<init>(SportsService_Service.java:45)
        at sg.sphsearch.sfe.callback.client.WsClient.main(WsClient.java:24)
Exception in thread "main" java.lang.RuntimeException:
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path
resource
[META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not
instantiate
bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
exception; nested exception is java.lang.NoSuchFieldError: SCHEMA_QNAME
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:87)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:65)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:54)
        at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
        at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
        at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
        at
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:54)
        at javax.xml.ws.Service.<init>(Unknown Source)
        at
sg.sphsearch.sfe.callback.server.SportsService_Service.<init>(SportsService_Service.java:45)
        at sg.sphsearch.sfe.callback.client.WsClient.main(WsClient.java:24)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'org.apache.cxf.wsdl.WSDLManager' defined in
class
path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed;
nested
exception is org.springframework.beans.BeanInstantiationException: Could
not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor
threw exception; nested exception is java.lang.NoSuchFieldError:
SCHEMA_QNAME
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:448)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:71)
        at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:84)
        ... 9 more
Caused by: org.springframework.beans.BeanInstantiationException: Could
not
instantiate bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]:
Constructor
threw exception; nested exception is java.lang.NoSuchFieldError:
SCHEMA_QNAME
        at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:756)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:721)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:384)
        ... 17 more
Caused by: java.lang.NoSuchFieldError: SCHEMA_QNAME
        at org.apache.cxf.wsdl11.WSDLManagerImpl.<init>(WSDLManagerImpl.java:80)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:85)
        ... 21 more


PLzzzzzzzzzzzzzzzzzz help me . its quiet urgent.
Thanks inadvance
priya

Quoted from:  http://www.nabble.com/WS-Security-tp14680959p14706945.html



Reply via email to