Expand|Select|Wrap|Line Numbers
- <?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="/data/AJENA/Sec_Aks/JavaProducts_oslee_bsg_dev_R1.1_security_test_Sec_Aks/install/conf/com.orga.oslee.ra.bsgws.BSGStandardWebservice-dev-R1.0.0/BSGAccountServices.wsdl"
- endpointName="tns:GetAccountPort" serviceName="tns:GetAccountService"
- address="http://kolps12:33333/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="serviceKeystore.properties" />
- <entry key="decryptionPropFile" value="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="serviceKeystore.properties" />
- <entry key="encryptionPropFile" value="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>
My Keystore.properties file was:-
Expand|Select|Wrap|Line Numbers
- org.apache.ws.security.crypto.merlin.keystore.file=/data/AJENA/Sec_Aks/JavaProducts_oslee_bsg_dev_R1.1_security_test_Sec_Aks/Component/build/ORGA/OSLEE/ws-standard/src/com/orga/oslee/bsg/ra/ws/temp/keys/Keystore.jks
- org.apache.ws.security.crypto.merlin.keystore.password=abpass
- org.apache.ws.security.crypto.merlin.keystore.type=jks
- org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey
But my problem is when ever I am trying to send any request using SOAP UI it will show the error i.e. :-
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)
Caused by: org.apache.ws.security.WSSecurityException: General security error (Cannot load the resource serviceKeystore.properties)
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)
According to a document I also tried by inserting the class folder of key.jks class in the Libraries of my Web Service project.
Please tell me what to do to resolve this?