Search code examples
javasoaphttpsweblogictls1.2

SOAP webservice app init fails with Unsupported protocol: https'


I have a SOAP webservice backend only application which fails to start(deploy) since March 30th with the error //Unsupported protocol: https'// (including the single quote next to https), no code change went in since an year or so and none of the other system URL's are configured within the application code or property file other than xlmns namespace uri in the XSD. I get that error during the application deployment (initialization) even before testing any webservice within the application.

I am on JDK 1.6.0.45 on a weblogic 10.3.6 server. (Sorry, I know I need to upgrade to newer, I will get there eventually I promise)

The full stacktrace is as below, I did enable ssl debug logs during weblogic start up but I do not see any error that would convey a missing certificate.

<Apr 5, 2022 2:31:49 PM IST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection#0': Invocation of init method failed; nested exception is org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection#0': Invocation of init method failed; nested exception is org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
        Truncated. see log file for complete stacktrace
Caused By: org.springframework.xml.xsd.commons.CommonsXsdSchemaException: Schema [ServletContext resource [/WEB-INF/xsd/AcmeAppGateway.xsd]] could not be loaded; nested exception is org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
        at org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection.afterPropertiesSet(CommonsXsdSchemaCollection.java:147)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
        Truncated. see log file for complete stacktrace
Caused By: org.apache.ws.commons.schema.XmlSchemaException: Unsupported protocol: https'
        at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:710)
        at org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema(SchemaBuilder.java:706)
        at org.apache.ws.commons.schema.SchemaBuilder.handleImport(SchemaBuilder.java:538)
        at org.apache.ws.commons.schema.SchemaBuilder.handleSchemaElementChild(SchemaBuilder.java:1513)
        at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:658)
        Truncated. see log file for complete stacktrace
Caused By: java.net.ProtocolException: Unsupported protocol: https'
        at weblogic.net.http.HttpClient.openServer(HttpClient.java:384)
        at weblogic.net.http.HttpClient.New(HttpClient.java:252)
        at weblogic.net.http.HttpURLConnection.connect(HttpURLConnection.java:213)
        at weblogic.net.http.HttpURLConnection.followRedirect(HttpURLConnection.java:698)
        at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:464)
        Truncated. see log file for complete stacktrace
>

The xsd mentioned in the error has xlmns URI's as below, is it possible these are causing the problem by being on higher TLS version (TLS 1.2 which is not supported on JDK 1.6)?

xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

There is no other URL configured in that xsd other than above. I came across another similiar error here, but that was due to a missing certificate. Much appreciated if anyone can point me in the right direction.


Solution

  • Okay finally figured out what the problem was after trial and error.

    On our SOAP WS project we have set schemaLocation as below:

    enter image description here

    I believe* this site schemas.xmlsoap.org has turned on TLS1.2 on March 30th (*I am open to other reasons but this is my assumption at this time) which is why our application was working fine until that day and start to fail post that date. I verified the TLS configuration of that URL on SSLABS which said anything below TLS1.2 was disabled for that site.

    enter image description here

    Since I am still on JDK 1.6 there is no way to connect to this site which is on higher TLS than the one supported by 1.6, which is why the application initialization was failing while establishing connection to that url. The solution was to manually download the xml content of the soap encoding from the URL to a xml file and place this file within the project folder and then refer this file within the XSD for schemaLocation as shown below. This did the trick!!

    enter image description here