on 09-22-2006 9:15 AM
Hi guys!
I have a requirement for getting a web page into SAP. Is it possible?
I do not know about any way, how to send GET request from XI and then receive HTML content back into XI and send it into SAP..
Any ideas?
Thanx, Peter
Hi Peter,
with the standard adapters it is not possible.
If you'll write your own module you can use this:
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
public class testhttp {
/**
@param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
try {
System.setProperty("https.proxyHost", "87.555.1.80");
System.setProperty("https.proxyPort", "8000");
System.setProperty("http.proxyHost", "proxy");
System.setProperty("http.proxyPort", "8000");
URL url = new URL("http://www.openbc.com/<http://www.openbc.com/> ");
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
System.out.println(conn.getResponseCode());
InputStream stream = conn.getInputStream();
int b;
while ((b = stream.read()) != -1) {
System.out.print((char) b);
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}//catch
Regards Mario
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter,
Based on my understanding,
From your web page , you should be having an option to send the contents as a http request to XI.
In XI you can convert this request to a BAPI XML using some mapping and post the result to R3 using RFC adapter.
At the R3 End , you should have a BAPI which does the posting to R3 and send back the response to your web page.
The whole process would be a synchronous.
Let me know if this is helpful.
Rgds,
Senthil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi guys, thanx for answers!
Senthilnatan, I didn't mean it this way. I meant, that you want to get some web page from internet into your R/3. So R/3 sends request to XI, XI gets the page and sends it into R/3. There is no prob R/3<->XI, but XI<->web page.. XI could send GET request, but can not handle response.. To get any (for example HTML) content into XI is via HTTP receiver adapter, which is in fact HTTP server and you MUST send the data via POST method and the HTML content is one of the params.
Haowever, thanx guys!
We probably try to solve it woth Java proxies..
Thanx for hint, Mario!
Peter
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.