cancel
Showing results for 
Search instead for 
Did you mean: 

500 Internal server Error on SAPUI5 calling ES workplace

Former Member
0 Kudos

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 ?

Accepted Solutions (0)

Answers (2)

Answers (2)

saar_dagan
Employee
Employee
0 Kudos

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

SandipAgarwalla
Active Contributor
0 Kudos

Prem

It could be a temporary issue with the GW server availability..Try again..

Saar - the URL is correct with the prefix "/proxy"...The proxy is a servlet which is designed to  suppress the SOP policy issue, between 2 domains..

Sandip

saar_dagan
Employee
Employee
0 Kudos

I see, Thanks for the explanation Sandip.

In that case I would guess something is wrong with that proxy servlet since I can get that data from the url I posted.

BR,

Saar

Former Member
0 Kudos

Any help on this please ?

0 Kudos

Hi Prem,

           If you are connected in any VPN connection, please come out of that and try again.