my web.xml file is as below:-
my .properties file is:-
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...........
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) Orga Systems GmbH and/or its affiliates, 2011 - 2012 All
Rights Reserved. The software contained on this media is proprietary to and
embodies the confidential technology of the copyright holder. Possession,
use, duplication or dissemination of the software and media is authorized
only pursuant to a valid written license from the copyright holder. This
copyright notice must appear in all copies of this software. -->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<!-- webservice bean defintions can refer to parent "webserviceImplParent"
(defined in ws-core-context.xml) to inherit injection of mandatory dependecies
and init-method. Can be overridden here if required -->
<bean id="getAccountImpl" class="com.orga.oslee.bsg.ra.ws.GetAccountImpl" parent="webserviceImplParent" />
<bean id="ServerPasswordCallback" class="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
<jaxws:endpoint xmlns:tns="http://oslee.orga.com/bsg/ra/ws"
id="getAccount" implementor="#getAccountImpl"
wsdlLocation="OSLEE_INSTALL_PATH/conf/com.orga.oslee.ra.bsgws.BSGStandardWebservice-@COMPONENT_VERSION@/BSGAccountServices.wsdl"
endpointName="tns:GetAccountPort" serviceName="tns:GetAccountService"
address="http://WS_IRA_HOST:WS_IRA_PORT/getaccount">
<jaxws:outInterceptors>
<ref bean="TimestampSignEncrypt_Response" />
</jaxws:outInterceptors>
<jaxws:inInterceptors>
<ref bean="TimestampSignEncrypt_Request" />
</jaxws:inInterceptors>
</jaxws:endpoint>
<!-- WSS4JInInterceptor for decrypting and validating the signature of the
SOAP request. -->
<bean id="TimestampSignEncrypt_Request" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<constructor-arg>
<map>
<entry key="action" value="Timestamp Signature Encrypt" />
<entry key="signaturePropFile"
value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
<entry key="decryptionPropFile"
value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
<entry key="passwordCallbackClass" value="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
</map>
</constructor-arg>
</bean>
<!-- WSS4JOutInterceptor for encoding and signing the SOAP response. -->
<bean id="TimestampSignEncrypt_Response" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
<constructor-arg>
<map>
<entry key="action" value="Timestamp Signature Encrypt" />
<entry key="user" value="myservicekey" />
<entry key="signaturePropFile"
value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
<entry key="encryptionPropFile"
value="com.orga.oslee.bsg.ra.ws.serviceKeystore.properties"/>
<entry key="encryptionUser" value="useReqSigCert" />
<entry key="passwordCallbackClass" value="com.orga.oslee.bsg.ra.ws.ServerPasswordCallback" />
<entry key="signatureParts"
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" />
<entry key="encryptionParts"
value="{Element}{http://www.w3.org/2000/09/xmldsig#}Signature;{Content}{http://schemas.xmlsoap.org/soap/envelope/}Body" />
<entry key="encryptionSymAlgorithm" value="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
</map>
</constructor-arg>
</bean>
</beans>
Code:
org.apache.ws.security.crypto.merlin.keystore.file=serviceKeystore.jks org.apache.ws.security.crypto.merlin.keystore.password=sspass org.apache.ws.security.crypto.merlin.keystore.type=jks org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey
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...........