on 11-24-2008 4:06 PM
hello guys,
we have developped service on the netweaver platforme , and while we were trying to call the services (xml)
through xmlhttp request , it didn't work , cuz the xmlhttp request object isn't cross-domaine.
so i am trying to go through proxy servlet wich will delegate the request to the external sap url, get the xml
then return it back to the client .
URLConnection urlcon = real.openConnection();
urlcon.setConnectTimeout(1000000);
InputStream ins =urlcon.getInputStream();
in = new BufferedReader(
new InputStreamReader(ins));
String inputLine;
while ((inputLine = in.readLine()) != null)
out.println(inputLine);
} catch(java.net.MalformedURLException ex){ System.out.println(ex.getMessage()); }
catch(IOException ex){System.out.println(ex.getMessage());}
}
it works with every website except the sapportal service url .
i don't if sap portal have some specific practises , or shall we just treat it as an ordinary xml page .
best regards
here is the error the server returns "401 unauthorized"
i started wondering .. what's so special about an sap portal and a normal page ?
cuz every other website work , except the one , it work right away in the web browser , but not in java code
eventhough the proxy is the same .
i('m very new to sap portal developement , very confused in the time being ... whether i should use the sap portal connector middleware , or just a normal urlconnection.
plz help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
26 | |
10 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.