I wish to generate a P12 certificate with certificate chain by using Ejbca WSDL webservice with certificateRequest method. Even though, I just get only the end entity certificate without certificate chain. It works if I generate the certificate by Ejbca web platform.
The xml content below is the input for the webservice.
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<certificateRequest xmlns="http://ws.protocol.core.ejbca.org/">
<!-- Optional -->
<arg0 xmlns="">
<caName>caExample</caName>
<cardNumber></cardNumber>
<certificateProfileName>Class hardware_token</certificateProfileName>
<certificateSerialNumber></certificateSerialNumber>
<clearPwd>false</clearPwd>
<email>123@example.com</email>
<endEntityProfileName>ExampleEndEntityProfile</endEntityProfileName>
<endTime></endTime>
<!-- Optional -->
<extendedInformation>
<name></name>
<value></value>
</extendedInformation>
<hardTokenIssuerName></hardTokenIssuerName>
<keyRecoverable>false</keyRecoverable>
<password>123</password>
<sendNotification>false</sendNotification>
<startTime></startTime>
<status>10</status>
<subjectAltName></subjectAltName>
<subjectDN>CN=ID:123 JOHN</subjectDN>
<tokenType>P12</tokenType>
<username>ID:123</username>
</arg0>
<arg1 xmlns="">Mdsdsldsklkdslkds Content of CSR</arg1>
<arg2 xmlns="">0</arg2>
<arg3 xmlns=""></arg3>
<arg4 xmlns="">CERTIFICATE</arg4>
</certificateRequest>
</Body>
</Envelope>
Question: What is missing in the xml content?
You need to use the pkcs12Req WS method to generate a PKCS#12 file (server generated). The certificateRequest will only return PEM encoded certificate.