//Inizio classe
URLConnection connection = null;
HttpsURLConnection httpsConn = null;
FileInputStream fin = null;
ByteArrayOutputStream bout = null;
URL url = null;
byte[] b = null;

public byte[] callWSfactory(String SOAPAction, String xmlFileSend) throws MalformedURLException,IOException,FileNotFoundExce ption, ProtocolException
{
try{
url = new URL("https://...");//esempio
if(SOAPAction != null)
{
if(SOAPAction.equalsIgnoreCase(""))
SOAPAction= null;
}
connection = (HttpsURLConnection)url.openConnection();

fin = new FileInputStream(xmlFileSend);

ByteArrayOutputStream bout = new ByteArrayOutputStream();

copy(fin,bout);

b = bout.toByteArray();

connection.setRequestProperty( "Content-Length",String.valueOf( b.length ) );
connection.setRequestProperty("Content-Type","text/xml; charset=utf-8");
connection.setRequestProperty("SOAPAction",SOAPAct ion);

//connection.setRequestMethod( "POST" );

connection.setDoOutput(true);
connection.setDoInput(true);
connection.setUseCaches(false);
}
//vari catch per gestire le eccezioni
return b
}


Questo è un pezzo del mio codice, il mio problema adesso è inserire il certificato ma non so quali funzioni utilizzare!!!ho visto le api e ce ne sono una miriade!!!
e non so nemmeno in quale parte di codice inserirle!!!E' la prima volta che ho a che fare con connessioni https!!
Per favore help meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee!!!! :master: