views:

302

answers:

2

I need to make a webservice call to a secured link(https:\). It is a two way SSL enabled link. So to access that link for making a webservice call, i need to set proxy server to the webservice link .Is there a sample code available for this ?

A: 

This depends on the webservice client you use. If you just use the default client in Java. You just need to setup these parameters,

    System.setProperty("https.proxyHost", proxyHost);
    System.setProperty("https.proxyPort", proxyPort);

Technically, you can't proxy HTTPS. This is called HTTPS or SSL tunneling. Unlike regular proxy, the proxy server can't inspect the HTTP request.

ZZ Coder
A: 

You don't mention what language you're working with, but a lot of web service APIs will work happily over SSL -- that is, you don't necessarily need a proxy. For example, I have some Python code that interact with an XML-RPC API, and this works just fine:

s = xmlrpclib.ServerProxy('https://www.example.com/rpc/xmlrpc')

If you can clarify your question and perhaps provide some examples of what you're trying to do I might be able to provide a better answer.

larsks
he did mention the language in the tags - java
Bozho
I'm pretty sure Java's web services libraries will work fine over an https: link, modulo some mucking about with keystores or something.
larsks