How to programatically discover unregistered web services deployed in Weblogic? - web-services

There are a number of teams who have deployed applications to a shared Weblogic application server. There has been some effort to maintain a registry but it hasn't been kept up to date. How can you programmatically discover all the web services deployed to a server and retrieve their WSDL?
Interactively, from the console, you can navigate to Deployments->Monitoring->Web Services and then enable the URI field, which is hidden by default. From this list, I can construct the WSDL: [host]:[port][URI]?WSDL
I think it is doable using JMX and have been playing with the WLST shell. The "listApplications()" command gives a list of the application names, but its not clear how to get more information.

Related

Azure web app service Django server log

I have been working with Azure's web app service using Resource Manager to deploy a Django app. It has been working in fits and starts. I really like the auto-deployment from GitHub but I have been frustrated by the ability to work with the underlying machine. There is a "Console" tool through the Azure portal but it has limited functionality and when there is an internal server error on my app, I can't find the server output log.
Can someone share insight into how to view the server logs?
Azure web apps have a number of logs however, the applications logs provided out of the box only support Asp.Net applications. That being said there is an article about django on web apps and how to store and view its logs here.
What'll you'll have to do, as described in the link, is to setup the django application to store its logs on the azure file system. Another option is to setup the django application to email the devs but the better option is to store the logs on the file system properly.

Sharing sessions between webapps in Jetty 8

I am looking into migrating from Tomcat to Jetty 8 for a custom web application that will essentially be a portal (though it won't be using a JSR-168 or similar portal container). The key concept for the purposes of this post is that the user will only need to log in once, and then he will need to access URLs from several different web applications all running on the same Jetty server. Once the user has logged in they should automatically be authenticated to any other web application running on the server.
Tomcat has the org.apache.catalina.authenticator.SingleSignOn valve which accomplishes this exact task. Once you log into a web application, the SingleSignOn valve will automatically log you into any other web applications.
So, is there a similar way to provide this same functionality in Jetty 8? It seems that there is a separate SessionManager for each web application. Can you configure or programatically assign the same SessionManager instance to each web application? Is there some other solution that is provided by Jetty out of the box?
HashSSORealm provides a simple way to use SingleSign on with Jetty. See:
http://docs.codehaus.org/display/JETTY/Single+Sign+On+-+Jetty+HashSSORealm

Best way to deploy a web site alongside an axis2 web service via Tomcat?

I am using Axis2 (1.5.3 currently) and Tomcat (6.0.26 currently) and am running a web service. I would like to also host HTML pages for configuring the web service.
What is the best way to go about this? I assume keeping the same context is key, but perhaps it is not.
My current distribution is located under a folder structure similar to this:
Tomcat/webapps/mycompany
With the actual service code here:
Tomcat/webapps/mycompany/WEB-INF/services/myService
In a browser, I can hit my web service by going to here:
/mycompany/services/myService
I note that I can drop actual HTML files in this path and Tomcat will, indeed serve them up.
For instance, if I put "index.html" under Tomcat/webapps/mycompany, I can navigate to /mycompany/index.html and see my html.
What I want to do is have this HTML be attached to JAR/class files that can interact with the already-existing service class files in the same context as the service. Therefore, I can have the browser configure the web service directly.
Is this possible, and is there a tutorial or something out there that will help me with this? Note that I have been working with Tomcat and Axis2 for a while now for this particular web service, but I have never actually deployed a web application/html using Tomcat before.
Thanks.
First of all what do you mean by a configuring a service. Normally in SOA world services are analogous to interfaces. IMHO you can just change a service, since their are other users that rely on the services you are exposing.
If i want to change a service i would rather introduce a new version of the service after deprecating the existing one.
Are you talking about applying QoS to existing serviecs. Then that makes sense.
Anyway, If you want to have a web-app alongside with axis2 service engine, it is possible. If you look inside the axis2 war file you'll find the web.xml entry to Axis2Servlet. It is this servlet that serves the web services requests.
So, what you need is the Axis2Servlet mapping in your web-app along with your usual servlet-mappings. Number of possible ways to configure your services using web-app files. One options is to use web-services call itself to (with authentication) to configure it.
By "configure a service", take this example:
The service has a set of datasets.
Each dataset exists in a separate database.
The service can manage 0..n datasets.
The service must be configured to know about each dataset.
This is what I'm configuring. I'm not trying to configure Axis itself or redefine the service.
I would like to host the HTML using the same instance of Tomcat that I'm hosting the web service with. It needs to manage sessions, have login capability, an whatnot, and has to be able to configure the web service live.
From what I'm reading, it's probably best to make an interface to the web service that the web application module can call into from a different context.
Is there a better way?

How to expose biztalk orchestration as a web service

I have a hypothetical request to pull in 3 data fields into an orchestration but only via a web service.
how can I do this with biztalk?
thanks
As #Tim has mentioned, the WCF Publishing Wizard is a good starting point.
Overview:
http://msdn.microsoft.com/en-us/library/bb226350
More here : http://msdn.microsoft.com/en-us/library/bb226564.aspx
A couple of notes:
You'll need to build and deploy your BTS project to a dev environment before you publish.
Make sure that when you publish you deploy to an app pool with the same user as the BizTalk Isolated host.
You don't actually need IIS / WAS to host the service - Biztalk can self host with e.g. WCF-Custom. So you can avoid the Isolated host in your production environment and turn off IIS entirely. This has performance and resource benefits.
Note that you may need to open up permissions for BizTalk to listen see here or here
Publishing and 'refreshing' the WSDL in a dev environment so that peer systems can create proxies etc can be a pain. After using the publishing wizard, you can use this tool to refresh your WSDL publication without having to redo the wizard.
http://www.microsoft.com/en-us/download/details.aspx?id=21973
Use the "BizTalk WCF Service Publishing Wizard". It will walk you through all the steps you need.

Web Service on Netbeans

I have created a Web Service in Net Beans 6.9 and deploy it locally. And I am using it via a java SE application by adding Web Service client in this application. How to obtain the link of the Web Serice so that it can be used from anywhere ?
2) From where to obtain WSDL file of Web Service ?
3) How to host a Web Service on the internet ?
Thank a ton in advance..!!!
You could create a new project of type web application in Netbeans.
In the web application, you will then create a web service (NOT a web service client).
For publishing and testing the web application, you will have to deploy it to a web server (e.g. GlassFish).
After publishing the web application, the WSDL file will be typically located at: http://localhost:<port>/<your web app>/<your service>?wsdl
For GlassFish, the default port is 8080.
If your current Netbeans installation doesn't support web projects or you don't have GlassFish installed, I suggest you download and install the latest version of Netbeans with Java EE support (bundled Apache Tomcat and GlassFish server in the same setup).
http://netbeans.org/downloads/index.html
Hosting SOAP web services on the internet at large has not been terribly successful. For example Google had SOAP based web services initially, and they switched to REST based services in the end. You may want to reconsider and deploy a REST based interface. If the bulk of your code is not embedded in the web service, then you should not have that difficult of a time switching the interface.
To deploy a SOAP or a REST web service, you would need to deploy a 'full' Java EE container (e.g. Glassfissh or JBoss) on a machine with access to the internet. You might virtual hosting e.g. Westhost, Amazon, or there are turnkey solutions like Heroku (note: I'm not endorsing any of the companies listed here; they're just examples). If you just want to deploy a REST based service, any web container will do e.g. Tomcat or Jetty. In addition to services mentioned above you could probably host a rest web service on any service that will let you upload a war file.