on 01-10-2013 4:33 AM
Hello,
Do you have any idea if the ES workplace flight example service is available ?
I've looked up many threads and tried the recommendations but still stuck up with the same issue. The code is the same from the Blog http://scn.sap.com/community/developer-center/front-end/blog/2012/10/15/consume-netweaver-gateway-se...
I get empty tables in chrome/ff/ie. Even in the disable-web-security mode.
My code:
index.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="./resources/sap-ui-core.js" type="text/javascript"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.ux3, sap.ui.commons, sap.ui.table"
data-sap-ui-theme="sap_goldreflection">
</script>
<script type="text/javascript">
// Create a SAP UI5 shell element
var oShell = new sap.ui.ux3.Shell("flightAppShell", {
appIcon : "http://www.sap.com/global/images/SAPLogo.gif",
appTitle : "Flight manager", });
// Just take the shell and place it in the html area called shellArea
oShell.placeAt("shellArea");
sap.ui.localResources("sitmil");
var view = sap.ui.view({
id : "idFlightService1",
viewName : "sitmil.retrieveFlight",
type : sap.ui.core.mvc.ViewType.JS });
oShell.addContent(view);
</script>
</head>
<body class="sapUiBody" role="application">
<div id="shellArea"></div>
</body>
</html>
retrieveFlightView.js
sap.ui.jsview("sitmil.retrieveFlight", {
getControllerName : function() {
return "sitmil.retrieveFlight";
},
createContent : function(oController) {
var layout = new sap.ui.commons.layout.MatrixLayout('layout');
layout.setWidth('80%');
var rPannel = new sap.ui.commons.Panel('rPannel');
var rTitle = new sap.ui.commons.Title('rTitle');
rTitle.setText('All - Flights');
rPannel.setTitle(rTitle);
var oTable = new sap.ui.table.DataTable();
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "AirLine"}),
template: new sap.ui.commons.TextField().bindProperty("value", "AirLineID"),
sortProperty: "AirLineID"
}));
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Flight Number"}),
template: new sap.ui.commons.TextField().bindProperty("value", "FlightConnectionID"),
sortProperty: "FlightConnectionID"
}));
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Date"}),
template: new sap.ui.commons.TextField().bindProperty("value", "FlightDate"),
sortProperty: "FlightDate"
}));
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Airfare"}),
template: new sap.ui.commons.TextField().bindProperty("value", "AirFare"),
sortProperty: "AirFare"
}));
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Airline Currency"}),
template: new sap.ui.commons.TextField().bindProperty("value", "LocalCurrencyCode"),
sortProperty: "LocalCurrencyCode"
}));
oTable.addColumn(
new sap.ui.table.Column({
label: new sap.ui.commons.Label({text: "Type of the plane"}),
template: new sap.ui.commons.TextField().bindProperty("value", "AirCraftType"),
sortProperty: "AirCraftType"
}));
var oModel = new sap.ui.model.odata.ODataModel(
"proxy/http/gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2",
false,
"GW@ESW",
"ESW4GW");
oTable.setModel(oModel);
oTable.bindRows("/FlightCollection");
rPannel.addContent(oTable);
layout.createRow(rPannel);
this.addContent(layout);
}
});
The developer trace shows the error: GEThttp://GW%40ESW:ESW4GW@localhost:8080/SITMIL/proxy/http/gw.esworkplace.sap.com/sap/opu/odata/IWBEP/R...500 (Internal Server Error)
I have tried the Sales Order example in another blog by Sunil Sharma and I encounter the same problem: http://GW%40ESW:ESW4GW@localhost:8080/SalesOrderService/proxy/http/gw.esworkplace.sap.com/sap/opu/od...2013-01-07 15:47:52 The following problem occurred: HTTP request failed500,Internal Server Error I believe its an issue with the availability of the Gateway Service now. What do you guess ?
Hi Prem,
Why is this the URL you are using to get the OData from?
proxy/http/gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2
it should just be
http://gw.esworkplace.sap.com/sap/opu/odata/IWBEP/RMTSAMPLEFLIGHT_2
BR,
Saar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any help on this please ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.