Issue with using the Axis2 JAX-WS Client using Rampart
I'm developing my Axis2 JAX-WS Client to consume the web service.
I'm using Axis2 1.5.4 and Rampart 1.5.1
When I ran the client with Axis2 1.4.1 and Rampart 1.4, it worked.
But when I try to use Axis2 1.5.x versions, I'm getting the null pointer 
exception 

 at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)

 at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)


When I compare the debug log of both, I could see that, rampart is receiving 
the 
response.
I could see the statement 
 "*********************** RampartReceiver received"
But after that I could not see the statement 
 "*********************** WSDoAllReceiver recieved".
I could see the WSDoAllReceiver statement in the log which is working(Axis2 
1.4.1+Rampart 1.4).

I'm attaching the debug log.
I'm engaging the rampart module in my client.axis2.xml.
 <module ref="rampart"/>
 <module ref="addressing"/>
 <parameter name="OutflowSecurity">
  <action>
   <items>Timestamp Signature</items>
   <signaturePropFile>crypto.properties</signaturePropFile>
   <user>SRVC_CLAIMS_SIT</user>
   <userCertAlias>SRVC_CLAIMS_SIT</userCertAlias>
   <encryptionUser>SRVC_CLAIMS_SIT</encryptionUser>
   <passwordCallbackClass>clientPasswordProvider</passwordCallbackClass>
   <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
   <signatureParts>
   {Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;

   {Element}{http://www.w3.org/2003/05/soap-envelope}Body
   </signatureParts>
   <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>

  </action>
 </parameter>
 <parameter name="InflowSecurity">
  <action>
   <items>Timestamp Signature</items>
   <signaturePropFile>crypto.properties</signaturePropFile>
   <passwordCallbackClass>clientPasswordProvider</passwordCallbackClass>
   <signatureKeyIdentifier>IssuerSerial</signatureKeyIdentifier>
   <enableSignatureConfirmation>false</enableSignatureConfirmation>
  </action>
 </parameter>

My policy.xml contains just the below content
 <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy";>
 </ramp:RampartConfig>

I'm loading the Policy.xml in the client like this:
 PartyService service = new PartyService();
 PartyServiceInterface stub = service.getPartyServiceInterface(); 
        String target = getEndPointAddress();
        BindingProvider provider = (BindingProvider)stub;
        provider.getRequestContext().put(RampartMessageData.KEY_RAMPART_POLICY, 
loadPolicy("C:/TestJAXWS/META-INF/policy/policy.xml"));
        
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
target);
My crypto.properties is like below :
 org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin

 org.apache.ws.security.crypto.merlin.keystore.password=ABC5JHGFWWEDSWCT
 org.apache.ws.security.crypto.merlin.file=srvc_claims_sit.jks

My WSDL has the below security configuration
 <wsp:UsingPolicy required="true"/>
 <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
wsu:Id="BTEndpointPolicy">
  <wsp:ExactlyOne>
   <wsp:All>
    <sp:AsymmetricBinding>
     <wsp:Policy>
      <sp:InitiatorToken>
       <wsp:Policy>
        <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>

         <wsp:Policy>
          <sp:WssX509V3Token10/>
         </wsp:Policy>
        </sp:X509Token>
       </wsp:Policy>
      </sp:InitiatorToken>
      <sp:RecipientToken>
       <wsp:Policy>
        <!-- .NET likes this -->
        <!-- 
        <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>

         <wsp:Policy>
          <sp:WssX509V3Token10/>
         </wsp:Policy>
        </sp:X509Token>
        -->
        <!-- .NET doesn't like this -->
        <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always";>

         <wsp:Policy>
          <sp:RequireEmbeddedTokenReference/>
          <sp:WssX509V3Token10/>
         </wsp:Policy>
        </sp:X509Token>
        
       </wsp:Policy>
      </sp:RecipientToken>
      <sp:AlgorithmSuite>
       <wsp:Policy>
        <sp:Basic256/>
       </wsp:Policy>
      </sp:AlgorithmSuite>
      <sp:Layout>
       <wsp:Policy>
        <sp:Lax/>
       </wsp:Policy>
      </sp:Layout>
      <sp:IncludeTimestamp/>
      <sp:OnlySignEntireHeadersAndBody/>
     </wsp:Policy>
    </sp:AsymmetricBinding>
    <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
     <wsp:Policy>
      <sp:MustSupportRefKeyIdentifier/>
      <sp:MustSupportRefIssuerSerial/>
     </wsp:Policy>
    </sp:Wss10>
    <wsaw:UsingAddressing required="true"/>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>
 <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTRequestSecureMessagePolicy">
  <wsp:ExactlyOne>
   <wsp:All>
    <sp:SignedParts>
     <sp:Body/>
     <sp:Header Name="Timestamp" 
Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>

    </sp:SignedParts>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>
 <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTResponseSecureMessagePolicy">
  <wsp:ExactlyOne>
   <wsp:All>
    <sp:SignedParts>
     <sp:Body/>
     <sp:Header Name="Timestamp" 
Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>

    </sp:SignedParts>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>
 <wsp:Policy xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTFaultSecureMessagePolicy">
  <wsp:ExactlyOne>
   <wsp:All>
    <sp:SignedParts/>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>

Can some one please help me in resolving this issue please.


      
2011-02-23 20:38:52,941 DEBUG: *********************** RampartReceiver received 
<?xml version='1.0' encoding='utf-8'?><soap-env:Envelope 
xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope";><soap-env:Header>
<wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 soap-env:mustUnderstand="true"><wsse:BinarySecurityToken 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";
 
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
 
wsu:Id="CertId--88714958">MIIDfTCCAuqgAwIBAgIQPIP03yO8y6dIWqlqKH04mTAJBgUrDgMCHQUAMIGCMQswCQYDVQQGEwJB
VTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxJDAiBgNVBAoTG1dlc3RwYWMgQmFua2lu
ZyBDb3Jwb3JhdGlvbjEUMBIGA1UECxMLSVQgc2VjdXJpdHkxGDAWBgNVBAMTD1dlc3RwYWMgUm9v
dCBDQTAeFw0xMDA5MjMxNDAwMDBaFw0xMTA2MjAxNDAwMDBaMIGpMQwwCgYDVQQIEwNOU1cxDzAN
BgNVBAcTBlN5ZG5leTELMAkGA1UEBhMCQVUxHjAcBgNVBAsTFUJUIEZpbmFuY2lhbCBTZXJ2aWNl
czEkMCIGA1UEChMbV2VzdHBhYyBCYW5raW5nIENvcnBvcmF0aW9uMTUwMwYDVQQDHiwAUwBSAFYA
QwBfAEkAQwBDAF8ARABFAFYAQABiAHQAZgBpAG4ALgBjAG8AbTCBnzANBgkqhkiG9w0BAQEFAAOB
jQAwgYkCgYEAvhNysLKEgNuAyNN7tQBal14HNOlsX4ZXKS9oADhnv33cGO/DWzcSeBUw9quJ8TKP
9YY41d8yxEjT2llZv3iBT+SIcBECCOqbz4hR3yR9OP0qimp2imXpuuegUhGe8jiOi1iu1yltzj7Q
Z9UqyudwX++fHNc0UuVABE+0kNjbJfUCAwEAAaOB0jCBzzATBgNVHSUEDDAKBggrBgEFBQcDATCB
twYDVR0BBIGvMIGsgBBcCf2QHoqFywSiGGxPO5UDoYGFMIGCMQswCQYDVQQGEwJBVTEMMAoGA1UE
CBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxJDAiBgNVBAoTG1dlc3RwYWMgQmFua2luZyBDb3Jwb3Jh
dGlvbjEUMBIGA1UECxMLSVQgc2VjdXJpdHkxGDAWBgNVBAMTD1dlc3RwYWMgUm9vdCBDQYIQO8yb
j70oz5ZO0p0Ea4ekDDAJBgUrDgMCHQUAA4GBALKgNCL24KJaKOZ+r7TUFqXQqoPlIy0OdvNtDXVF
c7kpiSi7IRpGkQzAknPJZsOy/pb3xZyNQBWS0EHOUb7KVItnW2NVocMFK0PkNvfg+gus6/C68Hhp
y1s7NYdlWeQY/aG6wMVmVrQuqPZcn6w8VOhEXMAvo+R7Ehnl6MgSE6jq</wsse:BinarySecurityToken><ds:Signature
 xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; 
/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"; />
<ds:Reference URI="#id-13773849">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
<ds:DigestValue>yldlHxXXl/3XcFwxbDbv/pNgY9E=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-5064912">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
<ds:DigestValue>wMUdFcAlRKXHSSxs55iaNANy0W4=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
tvnoZ2cv1LNfCl+qEh5UsN0+jHLeAxv8rbcKg7dnjsof5FT9GfKVoZ7J7b8J4ShTao6x0PVjF+Hx
xPJYL4PD9oQgtR+E5waRO7ShcXaQBSpwwiFL1BRWjGz/9N2SLV6fOtkFTDT8+rgTDbKyY48lKQHn
I742z3qIa0hRFA14b0o=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-18243519">
<wsse:SecurityTokenReference 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="STRId-31994023"><wsse:Reference URI="#CertId--88714958" 
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
 /></wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsu:Timestamp 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
wsu:Id="id-13773849"><wsu:Created>2011-02-23T09:38:52.985Z</wsu:Created><wsu:Expires>2011-02-23T09:40:22.985Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap-env:Header><soap-env:Body
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="id-5064912"><ns0:RetrievePartyDetailsResponseMsg 
xmlns:ns0="ns://btfin.com/Party/PartyService/PartyReply/V2_1">



///****I REMOVED THE CONTENT IN THE BODY HERE FOR CONFIDENTIALITY


</soap-env:Body></soap-env:Envelope> - at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:85) 
(org.apache.rampart.MESSAGE)
2011-02-23 20:38:52,957 DEBUG: Enter process(MessageContext msgCtx) - at 
org.apache.rampart.RampartEngine.process(RampartEngine.java:66) 
(org.apache.rampart.RampartEngine)
2011-02-23 20:38:52,957 DEBUG: Enter process(MessageContext msgCtx) - at 
org.apache.rampart.RampartEngine.process(RampartEngine.java:66) 
(org.apache.rampart.RampartEngine)
2011-02-23 20:38:52,957 DEBUG: Unknown top level PED found: 
org.apache.neethi.builders.xml.XmlPrimtiveAssertion - at 
org.apache.rampart.policy.RampartPolicyBuilder.build(RampartPolicyBuilder.java:113)
 (org.apache.rampart.policy.RampartPolicyBuilder)
2011-02-23 20:38:52,957 DEBUG: Unknown top level PED found: 
org.apache.neethi.builders.xml.XmlPrimtiveAssertion - at 
org.apache.rampart.policy.RampartPolicyBuilder.build(RampartPolicyBuilder.java:113)
 (org.apache.rampart.policy.RampartPolicyBuilder)
2011-02-23 20:38:52,972 DEBUG: Loading Signature crypto - at 
org.apache.rampart.util.RampartUtil.getSignatureCrypto(RampartUtil.java:374) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Loading Signature crypto - at 
org.apache.rampart.util.RampartUtil.getSignatureCrypto(RampartUtil.java:374) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Processing security header in normal path - at 
org.apache.rampart.RampartEngine.process(RampartEngine.java:153) 
(org.apache.rampart.RampartEngine)
2011-02-23 20:38:52,972 DEBUG: Processing security header in normal path - at 
org.apache.rampart.RampartEngine.process(RampartEngine.java:153) 
(org.apache.rampart.RampartEngine)
2011-02-23 20:38:52,972 DEBUG: Loading encryption crypto - at 
org.apache.rampart.util.RampartUtil.getEncryptionCrypto(RampartUtil.java:292) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Loading encryption crypto - at 
org.apache.rampart.util.RampartUtil.getEncryptionCrypto(RampartUtil.java:292) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Trying the signature crypto info - at 
org.apache.rampart.util.RampartUtil.getEncryptionCrypto(RampartUtil.java:326) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Trying the signature crypto info - at 
org.apache.rampart.util.RampartUtil.getEncryptionCrypto(RampartUtil.java:326) 
(org.apache.rampart.util.RampartUtil)
2011-02-23 20:38:52,972 DEBUG: Root Cause:java.lang.NullPointerException - at 
org.apache.axis2.jaxws.ExceptionFactory.logRootCause(ExceptionFactory.java:308) 
(org.apache.axis2.jaxws.ExceptionFactory)
2011-02-23 20:38:52,972 DEBUG: Root Cause:java.lang.NullPointerException - at 
org.apache.axis2.jaxws.ExceptionFactory.logRootCause(ExceptionFactory.java:308) 
(org.apache.axis2.jaxws.ExceptionFactory)
2011-02-23 20:38:52,972 DEBUG: stack:java.lang.NullPointerException
        at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.handleToken(BinarySecurityTokenProcessor.java:84)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:155)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
        at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:554)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:118)
        at 
org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:82)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:317)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
        at $Proxy11.retrievePartyDetails(Unknown Source)
        at JAXWSPartyClient.<init>(JAXWSPartyClient.java:52)
        at JAXWSPartyClient.main(JAXWSPartyClient.java:155)
 - at 
org.apache.axis2.jaxws.ExceptionFactory.logRootCause(ExceptionFactory.java:309) 
(org.apache.axis2.jaxws.ExceptionFactory)
2011-02-23 20:38:52,972 DEBUG: stack:java.lang.NullPointerException
        at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.handleToken(BinarySecurityTokenProcessor.java:84)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:155)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
        at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:554)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:118)
        at 
org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:82)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:317)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
        at $Proxy11.retrievePartyDetails(Unknown Source)
        at JAXWSPartyClient.<init>(JAXWSPartyClient.java:52)
        at JAXWSPartyClient.main(JAXWSPartyClient.java:155)
 - at 
org.apache.axis2.jaxws.ExceptionFactory.logRootCause(ExceptionFactory.java:309) 
(org.apache.axis2.jaxws.ExceptionFactory)
2011-02-23 20:38:52,988 DEBUG: Create Exception: - at 
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:179)
 (org.apache.axis2.jaxws.ExceptionFactory)
javax.xml.ws.WebServiceException: java.lang.NullPointerException
        at 
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
        at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
        at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:559)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:118)
        at 
org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:82)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:317)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
        at $Proxy11.retrievePartyDetails(Unknown Source)
        at JAXWSPartyClient.<init>(JAXWSPartyClient.java:52)
        at JAXWSPartyClient.main(JAXWSPartyClient.java:155)
Caused by: java.lang.NullPointerException
        at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.handleToken(BinarySecurityTokenProcessor.java:84)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:155)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
        at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:554)
        ... 7 more
2011-02-23 20:38:52,988 DEBUG: Create Exception: - at 
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:179)
 (org.apache.axis2.jaxws.ExceptionFactory)
javax.xml.ws.WebServiceException: java.lang.NullPointerException
        at 
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
        at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
        at 
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:559)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:118)
        at 
org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:82)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:317)
        at 
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:159)
        at $Proxy11.retrievePartyDetails(Unknown Source)
        at JAXWSPartyClient.<init>(JAXWSPartyClient.java:52)
        at JAXWSPartyClient.main(JAXWSPartyClient.java:155)
Caused by: java.lang.NullPointerException
        at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:94)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTokenProcessor.java:109)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.handleToken(BinarySecurityTokenProcessor.java:84)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:328)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:245)
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:155)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:318)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:254)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:160)
        at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:417)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        at 
org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:554)
        ... 7 more
client.axis2.xml
================
        <module ref="rampart"/>
        <module ref="addressing"/>
        <parameter name="OutflowSecurity">
                <action>
                        <items>Timestamp Signature</items>
                        <signaturePropFile>crypto.properties</signaturePropFile>
                        <user>SRVC_CLAIMS_SIT</user>
                        <userCertAlias>SRVC_CLAIMS_SIT</userCertAlias>
                        <encryptionUser>SRVC_CLAIMS_SIT</encryptionUser>
                        
<passwordCallbackClass>clientPasswordProvider</passwordCallbackClass>
                        
<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
                        <signatureParts>
                        
{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;
                        {Element}{http://www.w3.org/2003/05/soap-envelope}Body
                        </signatureParts>
                        
<optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
                </action>
        </parameter>
        <parameter name="InflowSecurity">
                <action>
                        <items>Timestamp Signature</items>
                        <signaturePropFile>crypto.properties</signaturePropFile>
                        
<passwordCallbackClass>clientPasswordProvider</passwordCallbackClass>
                        
<signatureKeyIdentifier>IssuerSerial</signatureKeyIdentifier>
                        
<enableSignatureConfirmation>false</enableSignatureConfirmation>
                </action>
        </parameter>


policy.xml
==========
        <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy";>
        </ramp:RampartConfig>

Client
======
        PartyService service = new PartyService();
        PartyServiceInterface stub = service.getPartyServiceInterface();        
        String target = getEndPointAddress();
        BindingProvider provider = (BindingProvider)stub;
        provider.getRequestContext().put(RampartMessageData.KEY_RAMPART_POLICY, 
loadPolicy("C:/TestJAXWS/META-INF/policy/policy.xml"));
        
provider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, 
target);

crypto.properties
=================
        
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
        org.apache.ws.security.crypto.merlin.keystore.password=ABC5JHGFWWEDSWCT
        org.apache.ws.security.crypto.merlin.file=srvc_claims_sit.jks


WSDL security configuration
===========================
        <wsp:UsingPolicy required="true"/>
        <wsp:Policy 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; 
wsu:Id="BTEndpointPolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:AsymmetricBinding>
                                        <wsp:Policy>
                                                <sp:InitiatorToken>
                                                        <wsp:Policy>
                                                                <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
                                                                        
<wsp:Policy>
                                                                                
<sp:WssX509V3Token10/>
                                                                        
</wsp:Policy>
                                                                </sp:X509Token>
                                                        </wsp:Policy>
                                                </sp:InitiatorToken>
                                                <sp:RecipientToken>
                                                        <wsp:Policy>
                                                                <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always";>
                                                                        
<wsp:Policy>
                                                                                
<sp:RequireEmbeddedTokenReference/>
                                                                                
<sp:WssX509V3Token10/>
                                                                        
</wsp:Policy>
                                                                </sp:X509Token>
                                                                
                                                        </wsp:Policy>
                                                </sp:RecipientToken>
                                                <sp:AlgorithmSuite>
                                                        <wsp:Policy>
                                                                <sp:Basic256/>
                                                        </wsp:Policy>
                                                </sp:AlgorithmSuite>
                                                <sp:Layout>
                                                        <wsp:Policy>
                                                                <sp:Lax/>
                                                        </wsp:Policy>
                                                </sp:Layout>
                                                <sp:IncludeTimestamp/>
                                                
<sp:OnlySignEntireHeadersAndBody/>
                                        </wsp:Policy>
                                </sp:AsymmetricBinding>
                                <sp:Wss10 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
                                        <wsp:Policy>
                                                
<sp:MustSupportRefKeyIdentifier/>
                                                <sp:MustSupportRefIssuerSerial/>
                                        </wsp:Policy>
                                </sp:Wss10>
                                <wsaw:UsingAddressing required="true"/>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
        <wsp:Policy 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTRequestSecureMessagePolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:SignedParts>
                                        <sp:Body/>
                                        <sp:Header Name="Timestamp" 
Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
                                </sp:SignedParts>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
        <wsp:Policy 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTResponseSecureMessagePolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:SignedParts>
                                        <sp:Body/>
                                        <sp:Header Name="Timestamp" 
Namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
                                </sp:SignedParts>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
        <wsp:Policy 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"; 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="BTFaultSecureMessagePolicy">
                <wsp:ExactlyOne>
                        <wsp:All>
                                <sp:SignedParts/>
                        </wsp:All>
                </wsp:ExactlyOne>
        </wsp:Policy>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to