473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to Implement WS security using CXF and WSS4J ?

3
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. <?xml version="1.0" encoding="UTF-8"?>
  4.  
  5. <beans xmlns="http://www.springframework.org/schema/beans"
  6.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
  7.                     xmlns:soap="http://cxf.apache.org/bindings/soap"
  8.     xsi:schemaLocation="http://www.springframework.org/schema/beans 
  9.        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  10.                        http://cxf.apache.org/bindings/soap
  11.                     http://cxf.apache.org/schemas/configuration/soap.xsd
  12.                            http://cxf.apache.org/jaxws 
  13.                            http://cxf.apache.org/schemas/jaxws.xsd">
  14.  
  15.  
  16.  
  17. <bean id="getAccountImpl" class="GetAccountImpl"
  18.         parent="webserviceImplParent" />
  19.  
  20.  
  21.  
  22. <bean id="ServerPasswordCallback" class="path of ServerPasswordCallback" />
  23.  
  24.     <jaxws:endpoint xmlns:tns="end point URL"
  25.         id="getAccount" implementor="#getAccountImpl"
  26.         wsdlLocation="location of the WSDl"
  27.         endpointName="tns:GetAccountPort" serviceName="tns:GetAccountService"
  28.         address="http://WS_IRA_HOST:WS_IRA_PORT/getaccount">
  29.  
  30.         <jaxws:inInterceptors>
  31.             <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor" />
  32.             <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
  33.                 <constructor-arg>
  34.                     <map>
  35.                         <entry key="action" value="UsernameToken" />
  36.                         <entry key="passwordType" value="PasswordText" />
  37.                         <entry key="passwordCallbackClass" value="path of ServerPasswordCallback" />
  38.                     </map>
  39.                 </constructor-arg>
  40.             </bean>
  41.         </jaxws:inInterceptors>
  42.  
  43.     </jaxws:endpoint>
  44.  
  45. </beans>
  46.  
  47.  

here all the necessary packages are imported as well as exported and . jar files are included in .bnd class.


after up my server i will get error as:-



Caused by: org.springframework.beans.FatalBeanException: Class [org.apache.cxf.bus.spring.NamespaceHandler] for namespace [http://cxf.apache.org/core] does not implement the [org.springframework.beans.factory.xml.NamespaceHan dler] interface
at org.springframework.beans.factory.xml.DefaultNames paceHandlerResolver.resolve(DefaultNamespaceHandle rResolver.java:126)
at org.eclipse.gemini.blueprint.context.support.Deleg atedNamespaceHandlerResolver.resolve(DelegatedName spaceHandlerResolver.java:55)
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1333)
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1328)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:93)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390)
Attached Images
File Type: jpg error.jpg (72.6 KB, 118 views)
Jul 9 '12 #1
0 1969

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Sun G | last post by:
Since I have converted my Access97 application to Access2003, I am getting an warning while opening the Access Database. When Macro Security level set to Low, its working fine. Now, I want to...
5
by: charliewest | last post by:
I've implemented the USING statement to ensure that my newly created sql connection closes when my method is finished using it. The USING statement is wrapped in try/catch error handling statement....
1
by: Tookums | last post by:
Hi everybody, I am working on a small project that implements basic security (users have to login/logout). Only one user can be logged in at one time. I use C# and ADO.NET. Users, passwords,...
1
by: Andres Romero | last post by:
I'm using the form-based authentication in my asp.net project, all works fine. My logon page only has the user and password controls and some images, when the user is loged in the page, is...
3
by: Jonay Aloat | last post by:
I need to implement the following. Shoul I use multimap or write a string hash class? ie Brand Product ========================== Samson ...
0
by: wk6pack | last post by:
Hi, I'm trying to get my application to authenticate using role based when the user runs the application. When the user logs on and is in the security group "school", the user gets into the...
1
by: yogeshreddy | last post by:
Hi, Can anyone help me in implementing the auto complete using AJAX in a struts application? Thanks, Yogesh
1
by: jaz | last post by:
plzz help me....how to giv login security using sql
3
by: ntuyen01 | last post by:
Hi All, I want to develop an web application using TLS (C# 2.0) to test our server, which just installed the AT/TLS encryption on test system's CICS Sockets. I here .NET 2.0 support TLS, but I...
0
by: srinivas srinivas | last post by:
Hi, I am developing simple peer-peer RTC application for monitoring the SDP packets and i need to set the TLS security for the transport. But iam struggling to achieving this. Iam using IP...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.