NullPointerException in AbstractHTTPSender.java:126 leading to "Unexpected 
number of certificates: 0"
-----------------------------------------------------------------------------------------------------

                 Key: RAMPART-191
                 URL: https://issues.apache.org/jira/browse/RAMPART-191
             Project: Rampart
          Issue Type: Bug
    Affects Versions: 1.4
         Environment: Win32
            Reporter: Thomas Poetter
            Assignee: Ruchith Udayanga Fernando
            Priority: Critical


After explicitly sending this SOAP message

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";><soapenv:Header 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
<wss:Security 
xmlns:wss="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 soapenv:mustUnderstand="1"><xenc:EncryptedKey 
Id="EncKeyId-urn:uuid:5DEA5B431B487FCBAC12198464728422">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"; />
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<wss:SecurityTokenReference><ds:X509Data>
<ds:X509IssuerSerial>
<ds:X509IssuerName>CN=Interpay Root CA,O=Interpay Nederland 
B.V.,C=NL</ds:X509IssuerName>
<ds:X509SerialNumber>55252242111564161950309905587486021998</ds:X509SerialNumber>
</ds:X509IssuerSerial>
</ds:X509Data></wss:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData><xenc:CipherValue>FIFTSD1lLC2PqnZV8Q85HeYUEQ+enQqD99J7WjShURp7EGJxu933+4sNh3cZq8KV2ZMMvIA7JGYidW1jzrGxTqpxLkCVvE6dtSQncDVBjsRnGKCTbUKDG7q5TG5pWGpuL41zA3/ztmVLMhLPu28gGbwT+udZRN+gS2ORw0YgIy0=</xenc:CipherValue></xenc:CipherData><xenc:ReferenceList><xenc:DataReference
 URI="#EncDataId-19509473" 
/></xenc:ReferenceList></xenc:EncryptedKey><xenc:EncryptedData 
Id="EncDataId-19509473" 
Type="http://www.w3.org/2001/04/xmlenc#Element";><xenc:EncryptionMethod 
Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"; /><ds:KeyInfo 
xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<wss:SecurityTokenReference><wss:Reference 
URI="#EncKeyId-urn:uuid:5DEA5B431B487FCBAC12198464728422" 
/></wss:SecurityTokenReference>
</ds:KeyInfo><xenc:CipherData><xenc:CipherValue>X7utbAVqUJ3Y0Psjp7jiq7RF1yC9r2vi/uNDUb/3DI9U8c9E7Ir3PdriuXt/kCnS8GtBnapSzAPa
jrgbp0IPFjMrHSUoH9X0LDVIzCOcik22E+ObSfx2l6APepxnUx7IALz1P+aGda8Ybr6EbCuZZHZw
Eo1qxlIO1kPrFWMB3jgBm4skD6BxKxssHKNi+jO8xnlAN9veQaz65vya2tgqkscwDVtH2LT3ls3j
izBSMMaPXb8D6oje0lYYUX7UDD2NNi84tRohbD61Ufvw/wB95CCl/ScRyEWk0fKXMxUImE7SeBra
tNgThRhJd9f4oi93G65UKhtAY+V1TLgayk2aWpo3RG1tVO6mhZ/RRTZm0W/ZPW7p6uoS+9AqWFT5
T7kbGxMXyZlB7ockcHxcoO8hSgCBQAz7+5spvFfgsx0d6xYMvNJ2Kva9hRhbrIMRhcyZR8WEqQ72
D8tcilnoKJGN6dnUaLqHGkNFGJsb2yJtfNfHsZlCGbXr/4eNIi2OsIBFHjIORQ+Vl3bj7mE+Xnbj
Nrk2ctXUMbN2Giskb4vUgf9KZ60XRKuf9IG7le/m/rVJJ9DzESoZP0A14C6tODc99UINlbpT70RE
tfgAB4SBGlPBaGa46tbnFsNa/p0POYsb2+GDlWVp3mVlvUiTFZhw8JKGVCtff31bzOwrIAKanQGP
ZBlADF5F2Io7UROg7zAsL+StlKr5a0vW14J5b2e72AZP2Ih87xA4JIbMmJuviBmk3nAHyM1dlcbR
qWqIUboK04DoKSg7SbnFfMqxTYKTOofrlepUdBAc</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData><wss: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-7372569">MIIDrzCCApegAwIBAgIQKZEx26RT1bHlKhFFY7tZbjANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJOTDEgMB4GA1UEChMXSW50ZXJwYXkgTmVkZXJsYW5kIEIuVi4xGTAXBgNVBAMTEEludGVycGF5IFJvb3QgQ0EwHhcNMDgwNTMwMDAwMDAwWhcNMDkwNTMwMjM1OTU5WjCBhTELMAkGA1UEBhMCTkwxEDAOBgNVBAgTB0hvbGxhbmQxEjAQBgNVBAcTCUFtc3RlcmRhbTEXMBUGA1UEChMOQ29tbWVyemJhbmsgQUcxHDAaBgNVBAsTE0NvbW1lcnpiYW5rIEhvbGxhbmQxGTAXBgNVBAMTEENvbW1lcnpiYW5rQUNDMDEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAJGxfSyS/xgxuJI7M0XrULaHJ7AwUAurlLF/0PAylOBoPSXM6eDaPBYEdW4URIcYUi16Ge7582E+isH9pT4/s/0VVFGK7uz27ZnSSGTRnp1QwE5dwqK0Pgw+XD28jipzhYFH0+rvIUuXnqOh9Llhv37iaLPto6aYfn7CFY8QwiWNAgMBAAGjgdgwgdUwCQYDVR0TBAIwADBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vcGtpLnBpbmtyb2NjYWRlLmNvbS9jcmwvSW50ZXJwYXlOZWRlcmxhbmRCVjAwMS9MYXRlc3RDUkwuY3JsMAsGA1UdDwQEAwIFoDAdBgNVHQ4EFgQUXUNgKhGRzKR31ndW1YxFaAnxErIwHwYDVR0jBBgwFoAUfbEauTTVMqlH71dQRwBn6dhsTwkwJQYDVR0RBB4wHIEaZmVycnkuZWRlbkBjb21tZXJ6YmFuay5jb20wDQYJKoZIhvcNAQEFBQADggEBAKvN+Rr5u5yBAtgqoAJ3lbzCp2WqdrrD3Nu9Tuyl7zfDKYIpq4bNav1pWSt1+l0D8p8FP18UsZO8ny1NshCL4lsSocjisvXs2u85L+8pS2KDaZBI9AOqeeMAFijxAvBxXvvGCt/MOXT891tKI+XiWMhOpb3hVJElxvH1MQh7+xtLAVltrCsugr1NeL3VAD2uRr
f9c
dAbjxJz0E1XEncIky608abKLouURtxdKrdd6yrUyRtoQvyqQHU7NqwWatk0syLW2IKWniah7m/VT7NNyZsRsSfoofFfmaVX4vQHDenDKVTcOYsm/uDCLBj+zqRmNMRs/OMW0nncuDRrfayg4Lybjw=</wss:BinarySecurityToken><ds:Signature
 xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; Id="Signature-13655059">
<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-13878947">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; />
<ds:DigestValue>sCmpnHR3m7AVBZHFoUet0k/wXusbteQps9d9JeZkQOE=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-17908832">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; />
<ds:DigestValue>hgYyLfqIwRwP77MvUGZu1teIg7GtIwzNAogpRlsBqHQ=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-10485311">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; />
<ds:DigestValue>HkuXKYCNc2glTeAz5Gd/JE58/b9JWK3+NJzfgjCZINQ=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#id-32316171">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; />
<ds:DigestValue>STsUtmVDSAIS6ywKy3ExQSEKxQjnXbGSsz3pnnHGxbk=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#UsernameToken-31022504">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"; />
<ds:DigestValue>u4eALEt5c6AMHP41khqykzFz+5QnsqCdIXpGWQ3sBWE=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
F9DOX2RO/40iWUkNbOMZIxJtlg4R5UGHMeL0+P6NyK9FgUpe52WWW3AZK/+nGzdagu5cwS1Qbi41
1mCrH2w6uoM2/dZecCpnVc3p3foIztHbJADnlFDsYpbQ10tUDZUgBYADz4X1yfSbiJVhqgHXLHa8
YJY00Glp3HvYVkqeXgk=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-29087666">
<wss:SecurityTokenReference 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="STRId-28113457"><wss:Reference URI="#CertId-7372569" 
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
 /></wss:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature></wss:Security><wsa:To 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
wsu:Id="id-17908832">http://localhost:8090/axis2/services/AccountInformation</wsa:To><wsa:ReplyTo><wsa:Address>http://185.1.23.205:6060/axis2/services/AccountInformation1219846471470_1</wsa:Address></wsa:ReplyTo><wsa:MessageID
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
wsu:Id="id-10485311">urn:uuid:69F3E5917A891EDE651219846471858</wsa:MessageID><wsa:Action
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 
wsu:Id="id-32316171">https://ws.equens.com/payments/AccountInformation/GetInfo</wsa:Action></soapenv:Header><soapenv:Body
 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="Id-13878947"><InterActiveRequest 
xmlns="https://ws.equens.com/payments/AccountInformation"; 
xmlns:axis2ns1="http://www.interpay.nl/InterActive/schemas/accountinformation/v1.0/";
 
axis2ns1:schemaLocation="file:///C:/AIS/schemata/InterActive-accountinformation-v1.0.xsd"><Hdr><Sdr
 
xmlns="http://www.interpay.nl/InterActive/schemas/core/v1.0/";>http://XXX.com/</Sdr><SdrAppId
 
xmlns="http://www.interpay.nl/InterActive/schemas/core/v1.0/";>AIS_AXIS2_XMLBeans</SdrAppId><MsgRef
 
xmlns="http://www.interpay.nl/InterActive/schemas/core/v1.0/";>http://XXX.com/559985a9-e08f-4105-b816-77f9c90c66a0</MsgRef><CreDtTm
 
xmlns="http://www.interpay.nl/InterActive/schemas/core/v1.0/";>2008-08-27T14:14:31.688+00:00</CreDtTm></Hdr><ReqBdy><AccInfReq><Ctry>NL</Ctry><Acct><Id
 
xmlns="urn:interpay:iso:std:iso:20022:xsd:pain.001.001.01"><DmstAcct><Id>0123456789</Id></DmstAcct></Id></Acct><ReqRef>e67a6d57-8a8c-4abb-8fe5-fcef9a0ebc23</ReqRef><SwtchOvReq>false</SwtchOvReq></AccInfReq></ReqBdy></InterActiveRequest></soapenv:Body></soapenv:Envelope>


This error stack is output at the server

PasswordCallbackHandler: Called for id: cobanl, with Usage: 1
PasswordCallbackHandler: Called for id: cobanl, with Usage: 5
[ERROR] General security error (Unexpected number of certificates: 0)
org.apache.axis2.AxisFault: General security error (Unexpected number of 
certificates: 0)
        at 
org.apache.rampart.handler.RampartReceiver.setFaultCodeAndThrowAxisFault(RampartReceiver.java:166)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:95)
        at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
        at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:163)
        at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
        at 
org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:278)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
        at 
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.ws.security.WSSecurityException: General security error 
(Unexpected number of certificates: 0)
        at 
org.apache.ws.security.message.token.X509Security.getX509Certificate(X509Security.java:89)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.getCertificatesTokenReference(BinarySecurityTok
enProcessor.java:93)
        at 
org.apache.ws.security.processor.BinarySecurityTokenProcessor.handleToken(BinarySecurityTokenProcessor.java:74)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:311)
        at 
org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:228)
        at org.apache.rampart.RampartEngine.process(RampartEngine.java:146)
        at 
org.apache.rampart.handler.RampartReceiver.invoke(RampartReceiver.java:92)
        ... 11 more
Exception in thread "HttpConnection-8080-6" java.lang.NullPointerException
        at 
org.apache.axis2.transport.http.AbstractHTTPSender.obtainHTTPHeaderInformation(AbstractHTTPSender.java:126)
        at 
org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:210)
        at 
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:285)
        at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:364)
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:208)
        at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:530)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:320)
        at 
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
        at 
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to