standalone ssl web service in java

Behnam Safari

I published a standalone web service with java in a http://my-IP/ and it works.

import javax.xml.ws.Endpoint;

public class Publisher
{
    public static void main(String[] args) throws Exception
    {

        Endpoint.publish("http://172.16.58.13/", new TicketQueryImpl());
        System.out.println("UP");

    }
}

now I want to make it in SSL and publish it on https://my-IP/.

I searched a lot but i didn't find any good sample or help. most of them were not for standalone and used Tomcat or other servers. any body could help me please!

Xavier Rubio Jansana

SSL is a really complicated beast (from a programming side of things). Why not using something like nginx or Apache of your webservice proxying the requests? i.e. It gets an SSL connection requests, and forwards to your webservice listening in port 80.

server {
    listen              443 ssl; # Listen to SSL connections
    ssl_certificate     www.example.com.crt;
    ssl_certificate_key www.example.com.key;
    ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;

    server_name         my-IP.com www.my-IP.com;
    access_log          /var/log/nginx/example.com.access.log main;
    access_log          /var/log/nginx/example.com.cache.log cache;
    error_log           /var/log/nginx/example.com.error.log error;

    location / {
        proxy_pass   http://localhost:80; # Forward requests to your webservice
    }
    Include     /etc/nginx/proxy.conf; # Proxy configuration
}

See also http://nginx.org/en/docs/http/configuring_https_servers.html for more information on configuring SSL server correctly.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

JAX-WS :: ways to call a web service from a standalone Java 7 SE client

From Dev

Proxy Java Web Service

From Dev

Amazon Web Service S3 shows SSL cURL error

From Dev

Calling a web service SOAP in java

From Dev

Is it possible to run SSL and non-SSL web applications on same standalone Wildfly?

From Dev

SSL error calling Perl web service via https using LWP

From Dev

Calling a REST web service over SSL

From Dev

Java synchronization in web service

From Dev

Java SSL: Invalid service principal name

From Dev

Using a self signed SSL certificate just for a web service

From Dev

Passenger Standalone - Force Redirect to SSL

From Dev

Android Https web service communication (SSL / TLS 1.2)

From Dev

configuring a java bean as a web service

From Dev

How to configure SSL on a self hosted Web API in Azure Service Fabric

From Dev

java web service client trying to access web service through SSL - TrustManagerFactoryImpl is not initialized

From Dev

Bypass SSL when I'm using SUDS for consume web service

From Dev

Proxy Java Web Service

From Dev

Amazon Web Service S3 shows SSL cURL error

From Dev

Java to a web service and mysql

From Dev

Is it possible to run SSL and non-SSL web applications on same standalone Wildfly?

From Dev

Java/MySQL scheduler, reminder for web app and standalone app

From Dev

Java synchronization in web service

From Dev

Using a self signed SSL certificate just for a web service

From Dev

SSL Certificate for Web Service in the Cloud

From Dev

Consuming .asmx Web Service in java?

From Dev

java web service client trying to access web service through SSL - TrustManagerFactoryImpl is not initialized

From Dev

Could not create SSL/TLS secure channel from plugin to web service

From Dev

Amazon Web Service ECS (SSL/HTTPS) Issue

From Dev

Calling web service with ssl certificates

Related Related

  1. 1

    JAX-WS :: ways to call a web service from a standalone Java 7 SE client

  2. 2

    Proxy Java Web Service

  3. 3

    Amazon Web Service S3 shows SSL cURL error

  4. 4

    Calling a web service SOAP in java

  5. 5

    Is it possible to run SSL and non-SSL web applications on same standalone Wildfly?

  6. 6

    SSL error calling Perl web service via https using LWP

  7. 7

    Calling a REST web service over SSL

  8. 8

    Java synchronization in web service

  9. 9

    Java SSL: Invalid service principal name

  10. 10

    Using a self signed SSL certificate just for a web service

  11. 11

    Passenger Standalone - Force Redirect to SSL

  12. 12

    Android Https web service communication (SSL / TLS 1.2)

  13. 13

    configuring a java bean as a web service

  14. 14

    How to configure SSL on a self hosted Web API in Azure Service Fabric

  15. 15

    java web service client trying to access web service through SSL - TrustManagerFactoryImpl is not initialized

  16. 16

    Bypass SSL when I'm using SUDS for consume web service

  17. 17

    Proxy Java Web Service

  18. 18

    Amazon Web Service S3 shows SSL cURL error

  19. 19

    Java to a web service and mysql

  20. 20

    Is it possible to run SSL and non-SSL web applications on same standalone Wildfly?

  21. 21

    Java/MySQL scheduler, reminder for web app and standalone app

  22. 22

    Java synchronization in web service

  23. 23

    Using a self signed SSL certificate just for a web service

  24. 24

    SSL Certificate for Web Service in the Cloud

  25. 25

    Consuming .asmx Web Service in java?

  26. 26

    java web service client trying to access web service through SSL - TrustManagerFactoryImpl is not initialized

  27. 27

    Could not create SSL/TLS secure channel from plugin to web service

  28. 28

    Amazon Web Service ECS (SSL/HTTPS) Issue

  29. 29

    Calling web service with ssl certificates

HotTag

Archive