protected void customizeWSDLGetInterceptor ( Class < ? > implBeanClass ) { String wsdlLocation = endpointInfo . getWsdlLocation ( ) ; URL wsdlUrl = JaxWsUtils . resolve ( wsdlLocation , jaxWsModuleMetaData . getModuleContainer ( ) ) ; boolean wsdlLocationExisted = true ; boolean wsdlLocationEmpty = StringUtils . isEmpty ( wsdlLocation ) ; //check whether there is jax-ws-catalog enabled if ( ! wsdlLocationEmpty && wsdlUrl == null ) { wsdlLocationExisted = false ; OASISCatalogManager catalogManager = jaxWsModuleMetaData . getServerMetaData ( ) . getServerBus ( ) . getExtension ( OASISCatalogManager . class ) ; String resolvedLocation = null ; if ( catalogManager != null ) { try { resolvedLocation = catalogManager . resolveSystem ( wsdlLocation ) ; if ( resolvedLocation == null ) { resolvedLocation = catalogManager . resolveURI ( wsdlLocation ) ; } } catch ( MalformedURLException e ) { //do nothing } catch ( IOException e ) { //do nothing } } if ( resolvedLocation != null ) { wsdlLocationExisted = true ; } } // if (!wsdlLocationEmpty && wsdlUrl == null) { // wsdlLocationExisted = false; // } if ( ! wsdlLocationEmpty && wsdlLocationExisted ) { return ; } String protocolBinding = endpointInfo . getProtocolBinding ( ) ; if ( ! JaxWsUtils . isWSDLGenerationSupported ( protocolBinding ) || ! wsdlLocationExisted ) { List < Interceptor < ? extends Message > > inInterceptors = server . getEndpoint ( ) . getInInterceptors ( ) ; inInterceptors . remove ( WSDLGetInterceptor . INSTANCE ) ; inInterceptors . add ( new LibertyJaxWsCompatibleWSDLGetInterceptor ( implBeanClass . getCanonicalName ( ) , wsdlLocation , wsdlLocationExisted ) ) ; } }
Customize WSDL Intercepter when no need to generate WSDL .