Can JAX-WS host "web" service in desktop program? - java

Can Java (JAX-WS) host "web" service in desktop program?
For example .net wcf can host services anywhere.
Tnx all.

This should be possible using the javax.xml.ws.Endpoint class (and the server from the JDK). You can learn more about this in the following article.
Another option would be to use an embeddable container like Jetty, to embed it in your desktop app and to deploy your JAX-WS web services on it.

As long as there is a tool to handle HTTP - yes. Jetty can be embedded in desktop applications. Here is some documentation about standalone http transport with cxf.

Related

iis 8 java and .net web services

I currently have web services written in .NET being hosted on a Windows 2012 server with IIS 8. The .Net services were written by someone else. My experience is mostly in Java so I figured I'd write my web services in Java. Now I'd like to host the Java web services on the same server. I know I can't use Java web services directly in IIS 8 but is there a way to have Tomcat hosted through IIS 8 and then have the Java web services routed through IIS 8 to Tomcat? I've seen the Tomcat connectors being used but the main thing I want to do is host both Java and .Net web services.
Is this possible and if so, how?
Both IIS and tomcat are web application servers. When they work, what they do is to listen to http requests on some specific port and handle them. So, as long as they are configured on different ports, there should be no problems.

Resource for learning the details of Java Web Services?

I'd like to build a Java Web Service using JAX-WS and GlassFish 3. All of the guides showing the basics of Web Services in Java using tools like wsgen and wsimport to generate a lot of the boilerplate code to implement the Web Service. Is this just how it is done or does anyone know of some resources that go into more of the details?
IF you want to learn from the very beginning:
Heavyweight Web Services (SOAP/RPC) with JAX-WS
SOAP Contract (WSDL) and the Contract-first vs Code-First debate
Lightweight Web Services (RestFul) with JAX-RS
RESTFul Contract (WADL)
Web Service Deployment (Frameworks + JAX-* deployed in some App Servers)
Web Service Clients (i.e. usage of wsimport)
Introduction to Web Service Security, Addressing, etc
I recommend you Java Web Services. Up and Running by Martin Kalin. After that, if you need to go further with one of these subjects, I suggest you to get any of the 'cookbooks' published by O'Reilly.
Good starter point is Official Java EE Tutorial.

Processing web requests in Java desktop application through tor network?

I write Java desktop applications sometimes and sometimes I would like for my web requests to be processed through the tor network.
How can I go about configuring this properly in Windows and/or Linux?
Have a look at the netlib library to push all your JVM traffic through TOR.
I think you have to using Web Service technology. Web Service is independent technology and by it can connect several application with different technology together. For example you can develop server with .Net platform and develop client with Java,Php,Python or others (or vice versa). Web Service in java has JADX-RPC(older) and JAX-WS standards.

Web service client with Java application and SSL

I am developing a Java desktop application and I want to consume a web service in it. The web service requires two-way SSL connection with message level security using binarysecuritytoken. I am using NetBeans IDE 6.9.1 with JDK 1.6.0.23 and JAX-WS as ws wrapper. How can I communicate with the ws without using any web server on client machine. Most of the stuff I read needs to have tomcat or some other web server on client machine (configuring the keystore in tomcat or so...). Is it possible to do? Please suggest some article for SSL based ws client for Java desktop application.
Consuming web services in JavaSE - see NetBeans tutorial
Use BindingProvider to set your properties before you invoke the service. See example of using BindingProvider here

Integration JS and Java

I have two systems to integrate: 1)desktop application (Java6) and 2)web-application (HTML,JS). I want first application to share some services to the second one. How could simply I do that ? I want some simple solution.
Thanks!
Expose them as standards Web Services or RESTful web-services
For an application to serve services, it should start server socket on port and listening on it. Or it should be using webservices. JDK6 comes with WebServices support. May be you can look at it.

Categories

Resources