0

Here is the problem

I have an jaxws-maven-plugin (version 2.5, jaxws-tools 2.3.0) generated code for an wsdl (for a soap service)

It generated code with @WebServiceClient (javax.xml.ws java1.8) client.

When I run this client in Junit against an site, everything is normal, I get the sslconnection correct, and received response. But when I runned the application using this client towards the same site in wildfly 10.1, I actually got the SSLHandshakeException, unrecognized_name, which is an indication on SNI was missing. I had an own client I wrote using HttpsURLConnection, it works fine. So I am really stuck why this happens.

The code generated from maven looks like following (I can only have peudo code)

@WebServiceClient(name = "service_name", targetNamespace = "https://namespace.com/xxxxxx/v2", wsdlLocation = "/wsdl/targetwsdl.wsdl")
public class DTServerModuleServiceV2
    extends Service
{

}
Eugène Adell
  • 3,089
  • 2
  • 18
  • 34
user2412555
  • 1,055
  • 1
  • 16
  • 32

1 Answers1

0

I only see one parameter which could change this behaviour. From the JSSE Reference Guide , try -Djsse.enableSNIExtension=false as by default it is set to true. There is one long discussion and one technical explanation here , but your question is not really a duplicate. Let us know if it is resolved.

By the way, your Java version is old and known to have SSL bugs.

Eugène Adell
  • 3,089
  • 2
  • 18
  • 34