473,699 Members | 2,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Implement WS security using CXF and WSS4J ?

3 New Member
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.springframe work.beans.Fata lBeanException: Class [org.apache.cxf. bus.spring.Name spaceHandler] for namespace [http://cxf.apache.org/core] does not implement the [org.springframe work.beans.fact ory.xml.Namespa ceHandler] interface
at org.springframe work.beans.fact ory.xml.Default NamespaceHandle rResolver.resol ve(DefaultNames paceHandlerReso lver.java:126)
at org.eclipse.gem ini.blueprint.c ontext.support. DelegatedNamesp aceHandlerResol ver.resolve(Del egatedNamespace HandlerResolver .java:55)
at org.springframe work.beans.fact ory.xml.BeanDef initionParserDe legate.parseCus tomElement(Bean DefinitionParse rDelegate.java: 1333)
at org.springframe work.beans.fact ory.xml.BeanDef initionParserDe legate.parseCus tomElement(Bean DefinitionParse rDelegate.java: 1328)
at org.springframe work.beans.fact ory.xml.Default BeanDefinitionD ocumentReader.p arseBeanDefinit ions(DefaultBea nDefinitionDocu mentReader.java :135)
at org.springframe work.beans.fact ory.xml.Default BeanDefinitionD ocumentReader.r egisterBeanDefi nitions(Default BeanDefinitionD ocumentReader.j ava:93)
at org.springframe work.beans.fact ory.xml.XmlBean DefinitionReade r.registerBeanD efinitions(XmlB eanDefinitionRe ader.java:493)
at org.springframe work.beans.fact ory.xml.XmlBean DefinitionReade r.doLoadBeanDef initions(XmlBea nDefinitionRead er.java:390)
Attached Images
File Type: jpg error.jpg (72.6 KB, 120 views)
Jul 9 '12 #1
0 1979

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

Similar topics

1
3291
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 set Macro Security using VBA and not directly. As this application is in use at 100s of place. Can anyone suggest me how can I set Macro Security level to Low using VBA. Thanks Sun
5
8765
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. This works fine. When i try to implement the "SqlTransation" class, the code does not work as the SqlTransation object is out-of-scope in the catch statement, and/or, after the USING statement ends, the sql connection object is automatically...
1
1642
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, accessrights to the system etc. is saved in an Access database. Everything works fine the way security is implemented at this point. I use an enum "AccessRight" (All, Read, Write) in my application. Corresponding values is found in a separate table...
1
1548
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 redirected to my main application web page wich contains three frames (head for user information, left for menu an the center wich shows the page selected in the left). When the session time out occurs, the three frames shows the logon.aspx, but I need...
3
5160
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 Television Samsung Television Samsung VCR Samsung DVD Player Samsunk Television
0
1300
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 application no problem. But when the user is removed from the group but doesnt log back in, he still has permissions to run the application. This is also true if the user is already logged on and then placed in the security group, the user cannot...
1
3781
by: yogeshreddy | last post by:
Hi, Can anyone help me in implementing the auto complete using AJAX in a struts application? Thanks, Yogesh
1
1392
by: jaz | last post by:
plzz help me....how to giv login security using sql
3
3065
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 can not find any examples to do this. Is there some example out there I can take a look. Do I have to install x509 test certificate in my machine. How do I make my application can get the Handshake with the server using TLS.
0
1593
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 addresses as SIP URI for communication. I am using IRTCClientProvisioning::GetProfile() IRTCClientProfile::EnablePrsenceEx() IRTCClientProvisioning::EnableProfileEx()
0
8620
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8924
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7756
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3060
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2353
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.