开发者

Webservice call through proxy server

开发者 https://www.devze.com 2022-12-14 13:47 出处:网络
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 toset proxy serverto the we

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 ?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消