I tried to look in Google and browse different issues here in the forum but couldn't find a solution.
I have a web-service and I want to create a method that returns information about the service and also about tomcat.
However, I couldn't find how to query tomcat.
I want to know for example on which port tomcat is listening, its JVM configuration, Memory Perm size and etc.
Thanks,
Clint
Look for the definitions in conf/server.xml - you can see the ports and threads definition.
What is your JAVA_OPTS at startup.sh or Catalina.sh? You can add there definition for jmx flags, XMx, garbage collection flags, etc
see this as example Tomcat jmx
Then you can also connect to your application from jconsole and see the tomcat jmx beans it is exposes.
Related
I have read a lot of posts on public forums about deploying JAX-WS on different servet containers
and I have following questions/queries based on that.
Following is my understanding :
1)sun-jaxws.xml is required ONLY BY Sun's RI (metro project) since com.sun.xml.ws.transport.http.servlet.WSServletContextListener class needs it.
(looking at source for this class , it reads this file from hardcoded location).
2)It is also required if servlet container is not Java EE 5 compliant.
3)Different application servers like Jboss , GlassFish can use their own JAX-WS implementations (like Apache CXF,Metro)
So my questions are :
1)If I use Sun's RI (metro) on Java EE 5 container like JBoss or GlassFish , do I still need to use sun-jaxs.xml ?
2)If I develope JAX-WS web service on Java EE 5 container like Jboss , can it be portable to another Java EE 5 container like GlassFish. What I mean is can I deploy the war as it is on another container ?
Please help me sort out above queries since I am really confused about Sun's RI and sun-jaxws.xml descriptor usage.
Application servers have own web service client frameworks. You can think these are like jaxws. When you deploy an app to app server default option app server use own framework for web service call. Therefore if server need a configuration file like as sun-jaxws.xml you must put it relevant directory. But I dont think you need it.
Second option is configuring the app server for using your third part jax-ws library. It is an extra option. For example I made in WAS. Because of that when you choose this choice you must use sun-jaxws.xml
Hopefully I have been clear in my answer :)
I'm using "spring-boot-starter-web" with jetty.
After I launch the application, I was able to call rest functions.
Is there any way I can access Jetty instance directly or I can wire Server/Servlet context after the jetty starts?
If you need more control over the embedded Jetty instance, think about using your own JettyEmbeddedServletContainerFactory. Look at the Spring Boot docs, especially the section Customizing ConfigurableEmbeddedServletContainer directly. There is an example for using an a TomcatEmbeddedServletContainerFactory but its the same for Jetty (both implementing ConfigurableEmbeddedServletContainer).
I came across an issue where a customer is able to open a SAP wsdl using net-beans as well as in .Net but not in soap UI.
When i checked the wsdl i found that service as well as binding tags are not defined or no such tags included. wsdl ends with port-type information.
In soap UI i got an error like no content in the file and when i try to open it in eclipse i am able to open it using web explorer window, but service as well binding information fields are empty. I could see ws-policy elements in customers wsdl.
How he might have produced a wsdl without binding and service information ?
What would be the reason he is telling it is working in .Net?
I am not sure about .Net tools.
Is there any web service client tool which can open the operations without endpoint /service information and send request/response ?..
please help
thank you for your time.
I only know a bit about the first question, can't help you with the other ones...
You can request two "flavors" of WSDL from a NW/ABAP system. This is related to the fact that the implementation (programming) of the service is usually performed on a different system and by different people than the configuration of the service.
After the service (or rather a service definition) has been implemented, you can get what's called a "design-time WSDL document". This document does not include the endpoint information - it cannot, because that would require technical information about the target system landscape and its configuration that is simply not available yet.
From the service definition, an administrator can create a configuration. This includes the binding information as well as stuff like base URL, security settings, transport layer settings and so on. With this configuration, you can generate a second WSDL document that contains the actual endpoint configuration.
I deployed a web service developed using Apache Axis2 on Openshift.
When I try accessing the axis2 index.jsp, I can see the index page which only contains the default Version.
Q:
How do I get to display the web service other web services I created as I can view them on my localhost through the browser in Eclipse?
I have done a few searches online and seen some suggestions as to making adjustments to axis2.xml. In that regard, I have tried changing the contextRoot parameter and the servicePath without no success though I am not too sure if I am making the right changes.
My project structure in Eclipse is shown below:
SieveService
+...
+Java Resources
++src
+++Model
++++some model classes
+++Services
++++SieveServiceService.java
++Libraries
+...
+WebContent
++axis2-web
+++...
I had the same problem and that's occurs because openshift's tomcat server only deploys services in aar format, meanwhile in localhost deploys aar and exploded files too.
You need to create a aar file with your services and put it into your WebContent/WEB-INF/services/ directory. You need to update the services.list file too with the name of your services.
After that you must see your services in your openshift server.
I deployed webservice written in .net language through IIS from my local machine,Is there any possible way to access remote HTTP server which contain different OS and different technologies
Sorry for being confused, but can you define:
different OS and different
technologies
Do you mean deploy your webservice to another host or
Do you mean consume a webservice from another host?
Option 1
If the host is not running IIS/ASP.NET I think you are going to have some issues as Mono may not run what your code base requires.
But you could try the following:
publish your site to a folder
zip up that folder
scp/ftp/upload this zip to the remote server
unzip the files (or upload individual files/folder) to directory configured by IIS Management
try to run
Option 2
You need to use either the svcutil tool to create the proxy clients to consume that webservice or you use the Add Web Reference in Visual Studio to automate this for you.
Hope this answers your requirements. Update your question with more information for the community to offer more support.
I think that is one of the main things that web services are for.