• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Disabling WADL Generation with WebLogic 12cR2

 
Marshal
Posts: 3149
466
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to disable WADL generation with an application deployed on WebLogic 12cR2.  WebLogic uses the Jersey implementation of JAX-RS.

I have used something like this on previous projects:
but with WebLogic, I get this exception:
I am assuming that there is a way to through deployment descriptors, but I can't seem to find that documented anywhere.

Any suggestions?
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have never extended ResourceConfig on my @ApplicationPath classes. Instead I extended Application. This has method getProperties that you can override to add properties like these. I used that in the past to disable bean validation (ServerProperties.BV_FEATURE_DISABLE) (because we had our own handling of ConstraintViolationExceptions).
 
Ranch Hand
Posts: 356
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

ResourceConfig FEATURE_DISABLE_WADL "com.sun.jersey.config.feature.DisableWADL"

https://blogs.oracle.com/pavelbucek/jersey-server-and-client-side-configuration


This property can be setup in a web.xml if the Jersey application is deployed in the servlet with web.xml
https://web.archive.org/web/20160414104253/https://jersey.java.net/documentation/latest/wadl.html

 
Ron McLeod
Marshal
Posts: 3149
466
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

German Gonzalez-Morris wrote:ResourceConfig FEATURE_DISABLE_WADL "com.sun.jersey.config.feature.DisableWADL"


I have tried "com.sun.jersey.config.feature.DisableWADL" and "com.sun.jersey.config.server.wadl.DisableWADL" - neither disables WADL generation.

Jersey does seem to understand ServerProperties.WADL_FEATURE_DISABLE, but this results in a UnsatisfiedDependencyException being thrown when used with WebLogic 12.2.1.3.0 (not sure about other versions).

I'll try to provide a custom WadlGenerator which returns nothing.
 
German Gonzalez-Morris
Ranch Hand
Posts: 356
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just for the record, this works in WLS 12.1.3 :


 
German Gonzalez-Morris
Ranch Hand
Posts: 356
2
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
other approach would be to disable wald through JMX :
https://docs.oracle.com/middleware/1213/wls/WLAPI/weblogic/management/runtime/JaxRsApplicationRuntimeMBean.html#setWadlGenerationEnabled(boolean)

RuntimeServiceMBean --> ServerRuntimeMBean --> ApplicationRuntimeMBean --> WebAppComponentRuntimeMBean --> JaxRsApplicationRuntimeMBean

 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic