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

Home Posts Topics Members FAQ

How to Insert .property file in WsService?

3 New Member
my web.xml file is as below:-

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Copyright (c) Orga Systems GmbH and/or its affiliates, 2011 - 2012 All 
  3.     Rights Reserved. The software contained on this media is proprietary to and 
  4.     embodies the confidential technology of the copyright holder. Possession, 
  5.     use, duplication or dissemination of the software and media is authorized 
  6.     only pursuant to a valid written license from the copyright holder. This 
  7.     copyright notice must appear in all copies of this software. -->
  8. <beans xmlns="http://www.springframework.org/schema/beans"
  9.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core"
  10.     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  11.                          http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
  12.                            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
  13.  
  14.     <!-- webservice bean defintions can refer to parent "webserviceImplParent" 
  15.         (defined in ws-core-context.xml) to inherit injection of mandatory dependecies 
  16.         and init-method. Can be overridden here if required -->
  17.  
  18.     <bean id="getAccountImpl" class="com.orga.oslee.bsg.ra.ws.GetAccountImpl" parent="webserviceImplParent" />
  19.  
  20.  
  21.     <bean id="ServerPasswordCallback" class="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
  22.  
  23.     <jaxws:endpoint xmlns:tns="http://oslee.orga.com/bsg/ra/ws"
  24.         id="getAccount" implementor="#getAccountImpl"
  25.         wsdlLocation="OSLEE_INSTALL_PATH/conf/com.orga.oslee.ra.bsgws.BSGStandardWebservice-@COMPONENT_VERSION@/BSGAccountServices.wsdl"
  26.         endpointName="tns:GetAccountPort" serviceName="tns:GetAccountService"
  27.         address="http://WS_IRA_HOST:WS_IRA_PORT/getaccount">
  28.  
  29.         <jaxws:outInterceptors>
  30.             <ref bean="TimestampSignEncrypt_Response" />
  31.         </jaxws:outInterceptors>
  32.         <jaxws:inInterceptors>
  33.             <ref bean="TimestampSignEncrypt_Request" />
  34.         </jaxws:inInterceptors>
  35.     </jaxws:endpoint>
  36.  
  37.     <!-- WSS4JInInterceptor for decrypting and validating the signature of the 
  38.         SOAP request. -->
  39.     <bean id="TimestampSignEncrypt_Request" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
  40.         <constructor-arg>
  41.             <map>
  42.                 <entry key="action" value="Timestamp Signature Encrypt" />
  43.                 <entry key="signaturePropFile"
  44.                     value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
  45.                 <entry key="decryptionPropFile"
  46.                     value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
  47.                 <entry key="passwordCallbackClass" value="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
  48.             </map>
  49.         </constructor-arg>
  50.     </bean>
  51.  
  52.     <!-- WSS4JOutInterceptor for encoding and signing the SOAP response. -->
  53.     <bean id="TimestampSignEncrypt_Response" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
  54.         <constructor-arg>
  55.             <map>
  56.                 <entry key="action" value="Timestamp Signature Encrypt" />
  57.                 <entry key="user" value="myservicekey" />
  58.                 <entry key="signaturePropFile"
  59.                     value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
  60.                 <entry key="encryptionPropFile"
  61.                     value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
  62.                 <entry key="encryptionUser" value="useReqSigCert" />
  63.                 <entry key="passwordCallbackClass" value="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
  64.                 <entry key="signatureParts"
  65.                     value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body" />
  66.                 <entry key="encryptionParts"
  67.                     value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body" />
  68.                 <entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
  69.             </map>
  70.         </constructor-arg>
  71.     </bean>
  72. </beans>
  73.  
my .properties file is:-

Expand|Select|Wrap|Line Numbers
  1. org.apache.ws.security.crypto.merlin.keystore.file=serviceKeystore.jks
  2. org.apache.ws.security.crypto.merlin.keystore.password=sspass
  3. org.apache.ws.security.crypto.merlin.keystore.type=jks
  4. org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey
  5.  

by using this when i am trying to send request i 'll get the below mentioned error:-




org.apache.cxf. binding.soap.So apFault: General security error (Cannot load the resource serviceKeystore .properties)
at org.apache.cxf. ws.security.wss 4j.WSS4JInInter ceptor.createSo apFault(WSS4JIn Interceptor.jav a:643)
at org.apache.cxf. ws.security.wss 4j.WSS4JInInter ceptor.handleMe ssage(WSS4JInIn terceptor.java: 308)
at org.apache.cxf. ws.security.wss 4j.WSS4JInInter ceptor.handleMe ssage(WSS4JInIn terceptor.java: 85)
at org.apache.cxf. phase.PhaseInte rceptorChain.do Intercept(Phase InterceptorChai n.java:263)
at org.apache.cxf. transport.Chain InitiationObser ver.onMessage(C hainInitiationO bserver.java:12 3)
at org.apache.cxf. transport.http_ jetty.JettyHTTP Destination.ser viceRequest(Jet tyHTTPDestinati on.java:323)
at org.apache.cxf. transport.http_ jetty.JettyHTTP Destination.doS ervice(JettyHTT PDestination.ja va:289)
at org.apache.cxf. transport.http_ jetty.JettyHTTP Handler.handle( JettyHTTPHandle r.java:72)
at org.eclipse.jet ty.server.handl er.ContextHandl er.doHandle(Con textHandler.jav a:943)
at org.eclipse.jet ty.server.handl er.ContextHandl er.doScope(Cont extHandler.java :879)
at org.eclipse.jet ty.server.handl er.ScopedHandle r.handle(Scoped Handler.java:11 7)
at org.eclipse.jet ty.server.handl er.ContextHandl erCollection.ha ndle(ContextHan dlerCollection. java:250)
at org.eclipse.jet ty.server.handl er.HandlerWrapp er.handle(Handl erWrapper.java: 110)
at org.eclipse.jet ty.server.Serve r.handle(Server .java:345)
at org.eclipse.jet ty.server.HttpC onnection.handl eRequest(HttpCo nnection.java:4 41)
at org.eclipse.jet ty.server.HttpC onnection$Reque stHandler.conte nt(HttpConnecti on.java:936)
at org.eclipse.jet ty.http.HttpPar ser.parseNext(H ttpParser.java: 801)
at org.eclipse.jet ty.http.HttpPar ser.parseAvaila ble(HttpParser. java:224)
at org.eclipse.jet ty.server.Block ingHttpConnecti on.handle(Block ingHttpConnecti on.java:50)
at org.eclipse.jet ty.server.bio.S ocketConnector$ ConnectorEndPoi nt.run(SocketCo nnector.java:24 5)
at org.eclipse.jet ty.util.thread. QueuedThreadPoo l.runJob(Queued ThreadPool.java :598)
at org.eclipse.jet ty.util.thread. QueuedThreadPoo l$3.run(QueuedT hreadPool.java: 533)
at java.lang.Threa d.run(Thread.ja va:662)
Caused by: org.apache.ws.s ecurity.WSSecur ityException: General security error (Cannot load the resource com.orga.oslee. bsg.ra.ws.servi ceKeystore.prop erties)
at org.apache.ws.s ecurity.compone nts.crypto.Cryp toFactory.getPr operties(Crypto Factory.java:24 3)
at org.apache.ws.s ecurity.compone nts.crypto.Cryp toFactory.getIn stance(CryptoFa ctory.java:168)
at org.apache.cxf. ws.security.wss 4j.AbstractWSS4 JInterceptor.lo adCryptoFromPro pertiesFile(Abs tractWSS4JInter ceptor.java:202 )
at org.apache.ws.s ecurity.handler .WSHandler.load Crypto(WSHandle r.java:805)
at org.apache.ws.s ecurity.handler .WSHandler.load SignatureCrypto (WSHandler.java :726)
at org.apache.ws.s ecurity.handler .WSHandler.deco deSignaturePara meter2(WSHandle r.java:1090)
at org.apache.ws.s ecurity.handler .WSHandler.doRe ceiverAction(WS Handler.java:27 2)
at org.apache.cxf. ws.security.wss 4j.WSS4JInInter ceptor.handleMe ssage(WSS4JInIn terceptor.java: 242)


Please resolve this...........
Jul 17 '12 #1
0 2045

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

Similar topics

2
6153
by: Jan van Veldhuizen | last post by:
I try to use the Server Data on Insert property to return a column value swhich is set in a trigger. But it does not work. Why not? What am I doing wrong? (BTW I'm using Oracle version 10) My VB source is: Dim mConn As New ADODB.Connection Dim rs As New ADODB.Recordset
3
1547
by: Jake | last post by:
Hello, I have a file, (either .jpg, .doc, etc.) how can I insert this file into sql server and retrieve it, instead of storing it in the folder. Thanks in advance. Jake
10
6477
by: electric_r | last post by:
Hallo, I have 2 questions: with php and mysql : 1) How can I insert a text file into a TEXT field of a table ? 2) How can I insert a microsoft word file into a BLOB field of a table ?
1
4927
by: kundan0607 | last post by:
Hi all, How to insert csv file into clob column.
0
1673
by: prisesh26 | last post by:
hi, i am using struts in my project. all my errors are shows through action errors. now iam having a scenario where i need to display Errors from my action. so using addError. but i need to pass arguments to the property file. like location does not exist.
10
4557
by: dreamy | last post by:
Can i ask how to insert a file into mysql? what the different between basename, getElementsByTagName, DOMdocument and $_FILES? how to apply it? thz.
0
2087
by: ndedhia1 | last post by:
I am having trouble loading a property file and keep getting this error when running my shell script that loads and runs my jar files, etc: no property file loaded, using defaults... (java.io.FileNotFoundException: /home/dedhia/.jftp/jftp.properties (No such file or directory)) Here is my java code in which I get the property file: String propertyFile =...
1
2908
by: dougancil | last post by:
I have a web page written in asp.net that is basically an upload button that does a bulk insert into a sql table. When a user presses an upload button, a .txt file is uploaded to a directory on the web server, and also inserted into a sql server on my network. I can get the file to upload to the correct destination but when the server tries to bulk insert to the database I get the following error: Could not bulk insert because file...
1
2362
by: gm000 | last post by:
hi i m trying to insert .csv file in ms sqlserver but its not working my cvs file data formate below is "12.204.8.120","12.204.8.151","214698104","214698135","VI","Virgin Islands, U.S." "12.204.8.152","12.204.8.159","214698136","214698143","PR","Puerto
0
8694
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9041
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8928
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
7757
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
6538
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
4379
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
4634
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
2355
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.