This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This client extends the ususal SoapClient to handle mtom encoding. Due | |
| * to mtom encoding soap body has test apart from valid xml. This extension | |
| * remove the text and just keeps the response xml. | |
| */ | |
| class MTOMSoapClient extends SoapClient { | |
| public function __doRequest($request, $location, $action, $version, $one_way = 0) { | |
| $response = parent::__doRequest($request, $location, $action, $version, $one_way); | |
| //if resposnse content type is mtom strip away everything but the xml. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static org.mockito.Matchers.any; | |
| import static org.mockito.Mockito.mock; | |
| import static org.mockito.Mockito.when; | |
| import java.lang.reflect.InvocationTargetException; | |
| import java.util.HashMap; | |
| import java.util.Locale; | |
| import java.util.Map; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Convert it into pkcs12 format | |
| openssl pkcs12 -export -out jenkins.p12 -inkey certificate.key -in certificate.crt -name "jenkins-cert" | |
| # Create keystore if not exist | |
| https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html | |
| # Import | |
| keytool -importkeystore -srckeystore jenkins.p12 -srcstoretype pkcs12 -destkeystore keystore.jks |