Hi William,
The sample WS-Security works fine, when i try implementing to my application
i face the prob in wsdl2java
I think the prob is b'cos i have some reference bean, can you tell me how to
over come.
My server and client works fine without the security.
this is my wsdl file
  <?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:tns="http://server.news.wssoap.sfe.sphsearch.sg/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; name="NewsWebService"
targetNamespace="http://server.news.wssoap.sfe.sphsearch.sg/";>
- <wsdl:types>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns="http://sfe.sphsearch.sg";
xmlns:ns1="http://server.news.wssoap.sfe.sphsearch.sg/";
attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://sfe.sphsearch.sg";>
  <xs:import namespace="http://server.news.wssoap.sfe.sphsearch.sg/"; />
- <xs:complexType name="searchFrontEndService">
- <xs:sequence>
  <xs:element minOccurs="0" name="service"
type="ns1:comperioFrontEndServiceSearch" />
  </xs:sequence>
  </xs:complexType>
  </xs:schema>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns="http://server.news.wssoap.sfe.sphsearch.sg/";
xmlns:ns0="http://sfe.sphsearch.sg"; attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://server.news.wssoap.sfe.sphsearch.sg/";>
  <xs:complexType name="comperioFrontEndServiceSearch" />
  <xs:element name="getService" type="getService" />
- <xs:complexType name="getService">
  <xs:sequence />
  </xs:complexType>
  <xs:element name="getServiceResponse" type="getServiceResponse" />
- <xs:complexType name="getServiceResponse">
- <xs:sequence>
  <xs:element minOccurs="0" name="return" type="ns0:searchFrontEndService"
/>
  </xs:sequence>
  </xs:complexType>
  <xs:element name="WebService" type="WebService" />
- <xs:complexType name="WebService">
- <xs:sequence>
  <xs:element minOccurs="0" name="arg0" type="xs:string" />
  <xs:element minOccurs="0" name="arg1" type="xs:string" />
  <xs:element minOccurs="0" name="arg2" type="xs:int" />
  </xs:sequence>
  </xs:complexType>
  <xs:element name="WebServiceResponse" type="WebServiceResponse" />
- <xs:complexType name="WebServiceResponse">
- <xs:sequence>
  <xs:element minOccurs="0" name="return" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  <xs:element name="setService" type="setService" />
- <xs:complexType name="setService">
- <xs:sequence>
  <xs:element minOccurs="0" name="arg0" type="ns0:searchFrontEndService" />
  </xs:sequence>
  </xs:complexType>
  <xs:element name="setServiceResponse" type="setServiceResponse" />
- <xs:complexType name="setServiceResponse">
  <xs:sequence />
  </xs:complexType>
  </xs:schema>
  </wsdl:types>
- <wsdl:message name="setService">
  <wsdl:part element="tns:setService" name="parameters" />
  </wsdl:message>
- <wsdl:message name="WebService">
  <wsdl:part element="tns:WebService" name="parameters" />
  </wsdl:message>
- <wsdl:message name="getService">
  <wsdl:part element="tns:getService" name="parameters" />
  </wsdl:message>
- <wsdl:message name="WebServiceResponse">
  <wsdl:part element="tns:WebServiceResponse" name="parameters" />
  </wsdl:message>
- <wsdl:message name="getServiceResponse">
  <wsdl:part element="tns:getServiceResponse" name="parameters" />
  </wsdl:message>
- <wsdl:message name="setServiceResponse">
  <wsdl:part element="tns:setServiceResponse" name="parameters" />
  </wsdl:message>
- <wsdl:portType name="INewsWebService">
- <wsdl:operation name="getService">
  <wsdl:input message="tns:getService" name="getService" />
  <wsdl:output message="tns:getServiceResponse" name="getServiceResponse" />
  </wsdl:operation>
- <wsdl:operation name="WebService">
  <wsdl:input message="tns:WebService" name="WebService" />
  <wsdl:output message="tns:WebServiceResponse" name="WebServiceResponse" />
  </wsdl:operation>
- <wsdl:operation name="setService">
  <wsdl:input message="tns:setService" name="setService" />
  <wsdl:output message="tns:setServiceResponse" name="setServiceResponse" />
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="NewsWebServiceSoapBinding" type="tns:INewsWebService">
  <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"; />
- <wsdl:operation name="getService">
  <soap:operation soapAction="" style="document" />
- <wsdl:input name="getService">
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output name="getServiceResponse">
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="WebService">
  <soap:operation soapAction="" style="document" />
- <wsdl:input name="WebService">
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output name="WebServiceResponse">
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="setService">
  <soap:operation soapAction="" style="document" />
- <wsdl:input name="setService">
  <soap:body use="literal" />
  </wsdl:input>
- <wsdl:output name="setServiceResponse">
  <soap:body use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="NewsWebService">
- <wsdl:port binding="tns:NewsWebServiceSoapBinding"
name="NewsWebServicePort">
  <soap:address location="http://localhost:8080/sfe/news"; />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

Thanks inadvance, Pls reply ASAP. 





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
> 

-- 
View this message in context: 
http://www.nabble.com/WS-Security-tp14680959p14730935.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to