473,320 Members | 1,600 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,320 software developers and data experts.

How to Insert .property file in WsService?

3
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.SoapFault: General security error (Cannot load the resource serviceKeystore.properties)
at org.apache.cxf.ws.security.wss4j.WSS4JInIntercepto r.createSoapFault(WSS4JInInterceptor.java:643)
at org.apache.cxf.ws.security.wss4j.WSS4JInIntercepto r.handleMessage(WSS4JInInterceptor.java:308)
at org.apache.cxf.ws.security.wss4j.WSS4JInIntercepto r.handleMessage(WSS4JInInterceptor.java:85)
at org.apache.cxf.phase.PhaseInterceptorChain.doInter cept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.o nMessage(ChainInitiationObserver.java:123)
at org.apache.cxf.transport.http_jetty.JettyHTTPDesti nation.serviceRequest(JettyHTTPDestination.java:32 3)
at org.apache.cxf.transport.http_jetty.JettyHTTPDesti nation.doService(JettyHTTPDestination.java:289)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandl er.handle(JettyHTTPHandler.java:72)
at org.eclipse.jetty.server.handler.ContextHandler.do Handle(ContextHandler.java:943)
at org.eclipse.jetty.server.handler.ContextHandler.do Scope(ContextHandler.java:879)
at org.eclipse.jetty.server.handler.ScopedHandler.han dle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCol lection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerWrapper.ha ndle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java :345)
at org.eclipse.jetty.server.HttpConnection.handleRequ est(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHan dler.content(HttpConnection.java:936)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpPa rser.java:801)
at org.eclipse.jetty.http.HttpParser.parseAvailable(H ttpParser.java:224)
at org.eclipse.jetty.server.BlockingHttpConnection.ha ndle(BlockingHttpConnection.java:50)
at org.eclipse.jetty.server.bio.SocketConnector$Conne ctorEndPoint.run(SocketConnector.java:245)
at org.eclipse.jetty.util.thread.QueuedThreadPool.run Job(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.r un(QueuedThreadPool.java:533)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.ws.security.WSSecurityException: General security error (Cannot load the resource com.orga.oslee.bsg.ra.ws.serviceKeystore.propertie s)
at org.apache.ws.security.components.crypto.CryptoFac tory.getProperties(CryptoFactory.java:243)
at org.apache.ws.security.components.crypto.CryptoFac tory.getInstance(CryptoFactory.java:168)
at org.apache.cxf.ws.security.wss4j.AbstractWSS4JInte rceptor.loadCryptoFromPropertiesFile(AbstractWSS4J Interceptor.java:202)
at org.apache.ws.security.handler.WSHandler.loadCrypt o(WSHandler.java:805)
at org.apache.ws.security.handler.WSHandler.loadSigna tureCrypto(WSHandler.java:726)
at org.apache.ws.security.handler.WSHandler.decodeSig natureParameter2(WSHandler.java:1090)
at org.apache.ws.security.handler.WSHandler.doReceive rAction(WSHandler.java:272)
at org.apache.cxf.ws.security.wss4j.WSS4JInIntercepto r.handleMessage(WSS4JInInterceptor.java:242)


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

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

Similar topics

2
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...
5
by: mac | last post by:
thanks, mac
3
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
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
by: kundan0607 | last post by:
Hi all, How to insert csv file into clob column.
0
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...
10
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
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......
1
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...
1
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,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.