Re: Axis2 embeded https server

Andreas Veithen <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <CADx4_uWUSf9_XEftKZy0Fm7OLdxT=MnvZ7OX2EfcydaFGJV9rw@mail.gmail.com>
SimpleHTTPServer doesn't support SSL. To get HTTPS support on the
server side, you need to deploy AxisServlet into a servlet container.

Andreas

On Mon, Jun 27, 2016 at 10:09 AM, Sterpu Victor <[email protected]> wrote:
> Hello
>
> I'm trying to make a 2 way authentication https server with axis2 and I
> don't know how to activate https from code.
> Server starts from code on http and works fine.
> This is my code:
>
>     public static void test() {
>         try {
>             ConfigurationContext configContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
> null);
>
>             SimpleHTTPServer server = new SimpleHTTPServer(configContext,
> 8080);
>             server.start();
>
>             File serviceArchiveFile = new
> File("C:\\Users\\victor\\Documents\\NetBeansProjects\\sr010\\jar\\axis2-1.7.3\\repository\\services\\StockQuoteService.aar");
>             AxisServiceGroup serviceGroup =
> DeploymentEngine.loadServiceGroup(serviceArchiveFile, configContext);
>
>             AxisConfiguration axiConfiguration =
> configContext.getAxisConfiguration();
>             axiConfiguration.addServiceGroup(serviceGroup);
>         } catch(Exception ex) {
>
> Logger.getLogger(Axis2ServerTest.class.getName()).log(Level.SEVERE, null,
> ex);
>         }
>     }
>
> I read the documentation here:
>
> "Please note that by default HTTPS works only when the server does not
> expect to authenticate the clients (1-way SSL only) and where the server has
> the clients' public keys in its trust store. If you want to perform SSL
> client authentication (2-way SSL), you may use the Protocol.registerProtocol
> feature of HttpClient. You can overwrite the "https" protocol, or use a
> different protocol for your SSL client authentication communications if you
> don't want to mess with regular https. Find more information at
> http://jakarta.apache.org/commons/httpclient/sslguide.html"
>
>
>
>
> But I don't know how how to set 1 way HTTPS yet.
>
> Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.