How to convert curl_init() code to Java code
How to convert curl_init() code to Java code
(OP)
Hi everyone
I had PHP code but i need help how to convert it to Java code.
I search lots of examples but raerly on non of them has what i need.
So i need to convert this code to Java
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_CONNECTTIMEOUT => 25,
CURLOPT_USERAGENT => 'PP-TTT',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $soap_post,//contains some SOAP code
CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
CURLOPT_URL => $url , // contains some https://x.x.x.x/someWebService
CURLOPT_SSLCERT => '/www/data/certificate.pem',
CURLOPT_SSLCERTPASSWD => 'pass123');
curl_setopt_array($ch , $options);
$answer = curl_exec($ch);
Any help will be appricate. Tnx
I had PHP code but i need help how to convert it to Java code.
I search lots of examples but raerly on non of them has what i need.
So i need to convert this code to Java
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_CONNECTTIMEOUT => 25,
CURLOPT_USERAGENT => 'PP-TTT',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => $soap_post,//contains some SOAP code
CURLOPT_HTTPHEADER => array('Content-Type: text/xml'),
CURLOPT_URL => $url , // contains some https://x.x.x.x/someWebService
CURLOPT_SSLCERT => '/www/data/certificate.pem',
CURLOPT_SSLCERTPASSWD => 'pass123');
curl_setopt_array($ch , $options);
$answer = curl_exec($ch);
Any help will be appricate. Tnx
RE: How to convert curl_init() code to Java code
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
RE: How to convert curl_init() code to Java code
Actually the OP posted it there first : thread269-1761873: How to convert curl_init() code to Java code .
As far as I know, cURL is not really popular among Java developers, so I would not expect much interest for the question in this format.
Feherke.
feherke.ga
RE: How to convert curl_init() code to Java code
Okay, not in my list of forums that I visit here, so I had not seen that.
Chris.
Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
RE: How to convert curl_init() code to Java code
Thank you Feherke you are right not much people use this kind
of code in Java . I had found some examples on net but nothing much
complex that i need to use .
So if someone find or know about this it will be great help
tnx