Who will create WADL file in Application based on JERSY 2.0 - rest

As i am automatically able to access the WADL file for my application without doing any manual effort, through below formatted URL:
http://{host}:{port}/{context_root}/{resource}/application.wadl
But now need to know, how this will be generated, I am using jersy 2.0 API over Weblogic Server for REST implementation.
If it is automatically generated then what environment and API needed for this ?
Some wiki Or docs URL will be appreciated.

I think you are looking for this from the Jersey Documentation, which seems to be responsible for the WADL Generation.
17.2. Configuration
WADL generation is enabled in Jersey by default. This means that
OPTIONS methods are added by default to each resource and an
auto-generated /application.wadl resource is deployed too. To override
this default behavior and disable WADL generation in Jersey, setup the
configuration property in your application:
jersey.config.server.wadl.disableWadl=true
This property can be setup in a web.xml if the Jersey application is
deployed in the servlet with web.xml or the property can be returned
from the Application. getProperties(). See Deployment chapter for more
information on setting the application configuration properties in
various deployments.
WADL support in Jersey is implemented via ModelProcessor extension.
This implementation enhances the application resource model by adding
the WADL providing resources. WADL ModelProcessor priority value is
high (i.e. the priority is low) as it should be executed as one of the
last model processors. Therefore, any ModelProcessor executed before
will not see WADL extensions in the resource model. WADL handling
resource model extensions (resources and OPTIONS resource methods) are
not added to the application resource model if there is already a
matching resource or a resource method detected in the model. In other
words, if you define for example your own OPTIONS method that would
produce "application.wadl" response content, this method will not be
overridden by WADL model processor. See Resource builder chapter for
more information on ModelProcessor extension mechanism.
https://jersey.java.net/documentation/latest/wadl.html#d0e13189

You can check in Weblogic documentation as well:
http://docs.oracle.com/cd/E24329_01/web.1211/e24983/develop.htm#RESTF240

Related

Can I define Spring Cloud Contract to act as proxy, and only make stubs for subset of endpoints?

With Wiremock you can define a proxy so that if none of defined stub mappings match for a given request, Wiremock forwards that request to a given host:port. Is that behaviour available with Spring Cloud Contract DSL ?
I could not find anything of that feature in SCC documentation (with my browser find command).
That approach is not present via the dsl. You can create wiremock proxies and package them to a stub jar yourself. Then stub runner could pick those and start such a proxy.

How can I configure the path Quarkus uses for openapi and health?

As an experiment I am migrating a Spring Boot service to Quarkus.
In the Spring service all the Spring-provided endpoints (including swagger and health) are under /manage (it makes it easy for us to prevent external access to them).
I can see how to change the path for Swagger UI in Quarkus, and I can see how to change the base path for RESTeasy, but I can't see any way to change the paths for the other Quarkus-provided endpoint.
Thanks.
The short answer:
quarkus.resteasy.path=/api
quarkus.smallrye-health.root-path=/manage/health
quarkus.smallrye-openapi.path=/manage/openapi
It seems Quarkus has 'secret' (well, build-time) dependencies on deployment components like SmallRyeHealthProcessor.java.
Once that's been located it's pretty simple to find the Config class that contains the path.

Adding an AuthorizationHandler via config

In WCF, you can add an authorization policy through the web.config by using the serviceAuthorization node in a service behavior. Is there a way to include an AuthorizationHandler in .NET Core WebAPI via config?
To be clear, I'm trying to replace this line in Startup.cs with something in the web.config:
services.AddSingleton<IAuthorizationHandler, MyAuthorizationHandler>();
web.config is only used for IIS specific config. Because of .net-core's cross platform nature they ditched coupling to web config for application configuration.
A web.config file is required when hosting the app in IIS or IIS Express. Settings in web.config enable the ASP.NET Core Module to launch the app and configure other IIS settings and modules.
Reference Configure an ASP.NET Core App: The web.config file
Startup is your entry point into the application where you can have some settings in the json file and have your code add/update the configuration based on that.
My thinking is that it would save having to recompile every time you want to add something because configuration options allows you to Reload configuration data with IOptionsSnapshot
Requires ASP.NET Core 1.1 or later.
IOptionsSnapshot supports reloading options with minimal processing overhead. In ASP.NET Core 1.1, IOptionsSnapshot is a snapshot of IOptionsMonitor<TOptions> and updates automatically whenever the monitor triggers changes based on the data source changing. In ASP.NET Core 2.0 and later, options are computed once per request when accessed and cached for the lifetime of the request.
Your authorization handler(s) would depend on the options and perform its function based on the configurations provided.

How does using the javax.ws.rs-api-2.0.jar works at runtime as it is only the API

We were working on creating a RESTful service. We have thought of using frameworks like jersey or cxf. But apparently we found that just using the javax.ws.rs-api-2.0.jar and the related annotations, we can get the service working.
Question is:
How does it work? Is it dependent on the application servers?
What if we application server does not support or have the implementation of the API?
If it is dependent on application servers, can I find out the library which the server is using especially tomcat?
EDIT 1
This question is invalid. javax.ws.rs-api-2.0.jar is just an API. Using this jar does not suffice. It will not give compilation errors.
But at run-time, you need providers which will implement the rs-api. And thus we need the frameworks like jersey or cxf.
In our application, these jars were added to the war during ant-build from external location and that is why it confused us.
I am closing this question.

WSIT, policy settings for client side in Netbeans and Metro JAX-WS RI

The published wsdl of the web-service we work with has a Policy tag.
But after we create a client using wsimport and Netbeans, it would not allow to edit any attributes of WSIT settings. In Apache CXF you can supply the attributes via API. As far as we see, in case of Metro and Netbeans it needs an xml file with the policy attributes set.
Documentation says that those attributes can be edited via Web service client' settings and xml automatically generated. But in our case no WSIT (Security) tab is accessible.
Here, documentation presents how the properties should look like. http://metro.java.net/nonav/1.2/guide/Configuring_Security_Using_NetBeans_IDE.html#gfrds
(Security tab)
Is there any easy way to provide the client with options as message signing, keystore and trustore (as published service required)?