Posts

AutoFirma ins and outs (1). Downloading Autofirma and jmulticard. Using Gradle instead of Maven in jmulticard project

Image
0. Introduction There are 2 main projects to download  clienteafirma  and jmulticard jmulticard should not be necessary to be downloaded, but there is an error in clienteafirma that cannot find the pom.xml of jmulticard , and it is recommended to download the jmulticard project. Let's begin with creating a workspace folder to store the required files. In this case WS-AUTOFIRMA3 1. clienteafirma download  1. Go to this url  https://github.com/ctt-gob-es/clienteafirma  and click on tags . You will be sent to https://github.com/ctt-gob-es/clienteafirma/tags 2. You can select the version you prefer Let's select the last one (in this case 1.7.2) and download it to the WS_AUTOFIRMA3 folder and uncompress it in that folder 2. jmulticard download  1. Go to this url  https://github.com/ctt-gob-es/jmulticard  and click on  tags . You will be sent to https://github.com/ctt-gob-es/jmulticard/tags Let's select the last one (in this case 1.7) and downl...

WFC a solo odyssey

1. Introduction WCF has evolved to newer and securer web services. That's nice. But nobody else agree with them. WCF has offered new protocols such as ws2007httpbinding that can only be used in Windows systems using .NET Framework. None of these systems can use the newer WCF WS: Apache Axis Apache CSF Metro Mono .NET Core And these WS Client projects cannot be migrated using "dotnet" command as follows (in a Windows machine) dotnet publish -c release -r linux-x64 /p:PublishSingleFile = true /p:PublishTrimmed = true -o E: \C ONF \M yResources \l inux-64A dotnet publish -c release -r win10-x64 /p:PublishSingleFile = true /p:PublishTrimmed = true -o E: \C ONF \M yResources \w in10-64A You must do it only with Visual Studio publish option!!!! So if you want to use this WS, you must use a Windows machine! But you can delegate the WS to a Windows machine and use SSH to execute the command form Linux.

How to fix SSLHandshakeException

Image
Introduction I have received this message when accessing a web service as a client in this URL The WSDL document could not be parsed.The following error occured while parsing the WSDL location - WSDLException: faultCode=PARSER_ERROR: Failed to read wsdl file at: "https:/xxx?WSDL", caused by: javax.net.ssl.SSLHandshakeException. : javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target In StackOverflow is the solution  The CA-ROOT certificate must be included in the cacert file in java-home/lib/security/cacerts Getting the CAcert certificate Use Firefox and click in the padlock Click in this symbol Get more info Show certificate Click on the URL to download de CA certificate and the CA certificate is downloaded as ACCOMP .crt in this case. Importing the certificate into the java keystore Now the certificate ...

WS Dynamic Client with https and user and password. SOAPUI util

Image
Let's create a client that should be authenticated with https protocol. 1. The URL of the WSDL It is https://192.XXX.XXX.XXX:8443/gexflow/ws/RegistroV3?wsdl 2. Creating the classes with Apache cxf It is interesting creating the classes with wsdl2java shell as it can be seen in an elder post . So you can use these classes for several purposes and analyzing cxf interpretation of the WSDL. 3. Bypassing server authentication. NOT WORKING!!! skip this step! If your server has a problematic certificate, (expired, not valid...) you can use a static method in the service class... but you cannot fool the cxf security (in new versions) as cxf redirects to a new DefaultHostServerVerifier . In older versions, this trick can work. 1 2 3 4 5 6 7 8 static { javax . net . ssl . HttpsURLConnection . setDefaultHostnameVerifier ( new javax . net . ssl . HostnameVerifier () { @Override public boolean verify ( String hostname , javax . net . ssl . SSLSession sslSession ) { ...