I would like open a html page in a web service, i succedded to do that but i need to take all the rights to do this to anonymous... not good !!
So i try to take the login and password in url and it doesn't work !
public static String genererHtml(String docid, String cheminBase, String nomVue, String nomServeurNotes, LogWSDTO logDTO) throws ExceptionWS {
String str2 = null;
try
{
StringBuffer sb ;
InputStream streamIn = null ;
InputStreamReader str ;
BufferedReader binIn ;
URL docURL ;
String URL_FIN = "?OpenDocument";
String notesURL = "http://" + "nomServeur/names.nsf?login&username=login&password=password&redirectto=http://nomServeur" + SEPARATEUR + cheminBase + SEPARATEUR + nomVue + SEPARATEUR + docid + URL_FIN;
docURL = new URL(notesURL);
streamIn = docURL.openStream();
str = new InputStreamReader(streamIn);
binIn = new BufferedReader(str);
String lineNext;
sb = new StringBuffer();
while ((lineNext = binIn.readLine()) != null)
{
sb.append(lineNext);
}
str2 = new String(sb.toString().getBytes(),"UTF-8");
streamIn.close();
str.close();
binIn.close();
sb = null;
} catch
i can't open the line docurl.openStream() ? Anyone have an idea ?
I have
"java.io.ioexception server returned http response code 401 for url"
I works with SSO and kerberos, spenego
Please ?!!
thanks !