Consume Odata Service in Eclipse HTML5

Hi Experts,
     I am trying to consume SAP Odata service. But i was stuck in one problem. While creating my model object i got following message.
This code i have written in the index.html file.
var oModel = new sap.ui.model.odata.ODataModel("https://eccdemo.localhost.com:port/sap/opu/odata/sap/ZAU_GP_SRV/ZGPSet/",false, "[username]","[password]" );
when i trying to directly execute the same service using Google chrome it gives me data. But if the same service i was trying using the eclipse i got this message. Can u please tell how to create object for the oModel or is there any other thing  that i have missed, One thing i was noticed here that automatically $metadata is appended in the service while calling and how we can overcome this problem.
OPTIONS https://eccdemo.Localhost.com:8001/sap/opu/odata/sap/ZAU_GP_SRV/ZGPSet/$metadata  datajs.js:17
o.defaultHttpClient.requestdatajs.js:17
E2datajs.js:17
o.requestdatajs.js:17
O._loadMetadataODataMetadata.js:6
sap.ui.base.EventProvider.extend.constructorODataMetadata.js:6
M.extend.constructorODataModel.js:6
sap.ui.lazyRequire.osap-ui-core.js:116
(anonymous function)index.html:22
Please help me how to solve this problem. Initially, i am just trying to create the model object.
Regards,
Nishant

Hi Nishant,
If you are unambe to access your service from Eclipse, we need to check few point from Gateway developer.
In the link provided, http://scn.sap.com/docs/DOC-46724 
After step12, please see the note in troubleshooting, hope it should help you..
Thanks,
Vijay V

Similar Messages

  • Consume OData service in SUP 2.1.3

    Hello,
    How to consume of OData service in SUP 2.1.3 for creating MBO for HWC?
    Our OData service is having mandatory filters which needs to be passed.
    http://xxx:8000/sap/opu/odata/sap/Z_TEST_V2_SRV/Entity_Set_Name/?$filter=Filter1 eq 'value1'and Filter2 eq 'value2'
    So, while creating XSD from XML should we need to use the above URL or http://xxx:8000/sap/opu/odata/sap/Z_TEST_V2_SRV/?$format=xml
    If we are using http://xxx:8000/sap/opu/odata/sap/Z_TEST_V2_SRV/?$format=xml and convert it in XSD then we are not able to see FEED in the MBO creation.
    Also, if we are using http://xxx:8000/sap/opu/odata/sap/Z_TEST_V2_SRV/Entity_Set_Name/?$filter=Filter1 eq 'value1'and Filter2 eq 'value2' and convert it into XSD then we are able to see the FEED in MBO creation but while choosing the fields it is throwing us java.lang.nullpointer exception.
    Can anyone explain us the solution for the problem?
    Regards,
    Rahul

    Is there a particular reason why SUP 2.1.3 is used and not the latest 2.3.4?  It is recommended to move to the most recent version if possible/new project.
    For HWC consuming OData service, you can connect directly from your JavaScript without using MBOs.  Please take a look at this link:
    Develop OData-based Hybrid Apps
    Thanks,
    Andrew.

  • How to consume OData service in  sapui5

    hi,
        how to consume Odata service  in sapui5 (table).
      If any idea  please share with me.

    i tryed but  some error comes:-
    Failed to load resource: the server responded with a status of 401 (Unauthorized) https://xxxxxxxxxxxxxx.com/sap/opu/odata/sap/Z_BANK/$metadata
    Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:55176' is therefore not allowed access.

  • Consuming oData service from SSIS 2008 R2

    Is there possibilities to consume oData service feed from SSIS 2008-R2, any component that can be used ?

    There is no such built in specific functionality, but an OData feed is typically merely a WebService which an HTTP call away that you can do using the WebServies task, download as XML and process.
    Arthur My Blog

  • Error while consuming Odata service from Gateway client i.e /iwfnd/gw_client

    Hello Experts.
       I am facing below an error while consuming the Odata service from GW client... The error is "No service found for the namespace /IWFND/,name ZTEST_STOREROOM_SRV,version 001". Even i have tried to deep dive in /IWFND/Error_log but no use..
      Actually what I was doing :- My aim is to connect multiple back end systems in the same server with the help of Aliasing concept.. I have created multiple aliases and added in the /IWFND/MAINT_Service transaction.. but i am not getting how to consume the service..
       I have followed the solution upto some extent in the link => Multiple Origin Composition - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library
      Can you please let me know how to resolve this.. Also please let me know, the syntax for the URI...
      Your help is highly appreciated..
      Please find the screenshot attached.
    Thanks,
    Srinivas.

    Hello @Nrisimhanadh_Yandamuri
      Thanks for your reply..
      I have got all the required authorization.. But still I am not able to hit the service.. Please let me know what could be the solution..
    Thanks,
    Srinivas.

  • Consume oData service in WebDynpro ABAP

    Hi All,
    Is it possible to consume a oData service from one SAP system in to another system (assume in a report program or WebDynpro application)?
    If yes, can you please guide me?
    Thanks in advance....
    -Chandra

    Hello Chandra,
    Do u have a scenario/requirement where u want to consume a GW Service from WebDynpro screens ?
    Is it really required ? if at all you want to consume GW service from WebDynpro screens, i think using GW is not a correct solution.
    There would be some other ways to consume your Back-end business logic from WebDynpro screens.
    I don not know if we can call GW Service in a WebDynpro screens. Technically if its possible also then i think its not correct to do that.
    In my opinion GW has to be used in combination with UI5 for light weight applications.
    Regards,
    Ashwin

  • AppBuilder:create oData service

    Hi
    I have an error when I am trying to create a new odata service in appbuilder.
    As you can see below
    I enter the name of my database in the field of name and
    in the field of URL I put the URL that appears when I click on "open service document" in Gateway Management Cockpit, which is http://localhost:8080/gateway/odata/sap/intgwtest;v=1
    But when I press confirm an error message appears:
    How can I solve my problem?
    thank you in advance
    Angeliki

    SAP AppBuilder is a browser-based application development tool for developers to easily build HTML5/JavaScript mobile applications.
    I have an error when I am trying to create a new odata service in appbuilder.
    As far as i know App builder can only consume Odata services to quickly develop few applications. but not to develop Odata services.
    --> If you are working to consume the services with Appbuilder - Please try the opening the URL in the browser to check if any data / metadata is retrieved .

  • SUP 2.1.3 MBO creation using ODATA service

    Hi All,
    I am using SUP 2.1.3 and trying to consume OData service created using SEGW transaction on gateway. following an older document i moved ahead by creating XSD files from the XML file.
    But,after uploading the XSD file , i chose the root element as 'feed' .
    After this , one XSLT file is generated automatically.
    But , when I click the XSLT file to edit , it shows error saying  'java.lang.NullPointerException' .
    I have to follow the methodology of creating MBO's using OData service and then deploying it on server.
    Please help me to move ahead with ODATA service in SUP 2.1.3 version. 
    Appreciate your quick help and assistance on this.
    Regards
    Rahul

    Hi
    If i ignore the Null exception error and move ahead with the XSLT format and preview the data source i receive the below error:
    Execution failed: HTTP status code is [401], expected [200]; response body is [<html><head><title>Logon Error Message</title><META http-equiv="Content-Type" content="text/html;charset=UTF-8"><style type="text/css">body { font-family:tahoma,helvetica,sans-serif;color:#333333;background-color:#FFFFFF; }td { font-family:tahoma,helvetica,sans-serif;font-size:70%;color:#333333; }h1 { font-family:tahoma,helvetica,sans-serif;font-size:160%;font-weight:bold;margin-top:15px;margin-bottom:3px;color:#003366; }h2 { font-family:verdana,helvetica,sans-serif;font-size:120%;font-style:italic;font-weight:bold;margin-top:6px;margin-bottom:6px;color:#999900; }p { font-family:tahoma,helvetica,sans-serif;color:#333333;margin-top:4px;margin-bottom:4px; }ul { font-family:tahoma,helvetica,sans-serif;color:#333333;list-style-type:square;margin-top:8px;margin-bottom:8px; }li { font-family:tahoma,helvetica,sans-serif;color:#33333;margin-top:4px; }.emphasize { color:#333333;background-color:#C8E3FF;padding:5px;}.note { color:#CC6600; }a { font-family:tahoma,helvetica,sans-serif;text-decoration:underline;color:#336699; }a:visited { color:#001166; }a:hover { text-decoration:none; }</style></head><body><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><h1>Anmeldung fehlgeschlagen</h1><br><h2>Was ist passiert ?</h2><p>Der Aufruf der URL http://10.5.1.150:8000/sap/opu/odata/sap/ZCM_TEST_V5_SRV/PayrqSet/ wurde aufgrund fehlerhafter Anmeldedaten abgebrochen.</p></td></tr><tr><td> </td></tr><tr><td class="emphasize"><strong>Hinweis</strong><br>Die Anmeldung wurde im System GWD ausgeführt. Hierbei wurden keine Anmeldedaten bereitgestellt.</td></tr><tr><td> </td></tr><tr><td><p>  </p><h2>Was können Sie tun ?</h2><ul><li> Falls Sie noch über keine Benutzerkennung verfügen, so wenden Sie sich an Ihren Systemadministrator. </li></ul></br><p class="note">Fehlercode: ICF-LE-http-c:001-l:-T:-C:6-U:-P:-L:6-X:CBC8A013038D1EE486AE76E3D8B54E1D_CBC8A013038D1EE486AE76E3D3D34E1D_1-x:B77319E4C51EF1AFAE1DCBC8A013038D</p></br><p> HTTP 401 - Unauthorized</br><p> Ihr SAP Internet Communication Framework Team</p></td></tr></table></body></html>
    Please let me know if anyone has worked on ODATA+MBO+SUP2.1.3. I know this is not the recommended approach but i have to follow this scenario and i know it can be achieved through this approach. JUst need your assistance experts.
    Thanks & Regards
    Rahul

  • How to consume OData from SNWG in Windows Phone

    Hi Friends,
    I want to consume OData from SNWG in Windows Phone 8 app. I already have a post on this.
    Please refer the 2nd last post for what I have tried finally.
    Getting Started with SAP NetWeaver Gateway
    Regards
    Somnath

    Hi Holger,
    I have already tried this steps( http://msdn.microsoft.com/en-us/library/windowsphone/develop/gg521145(v=vs.105).aspx  &  OData client for Windows Phone 8 )  and are able to consume OData service from my Windows Phone 8 app with the OData service link (http://services.odata.org/Northwind/Northwind.svc/ ) provided in the example.
    But when I try to use some other  remote service like (http://<Gateway_Host><Gateway_Port>/>/sap/opu/sdata/iwfnd/RMTSAMPLEFLIGHT?sap-client=100 ) it doesn't work, even I don't find any service.
    Could you please tell me if this is a value document and will support for my development, if then where do I get SAP NetWeaver Gateway for my dvelopment.
    http://wiki.scn.sap.com/wiki/download/attachments/250646828/WP7%20-%20How%20to%20Guide.pdf?version=1&modificationDate=13…
    Regards
    Somnath

  • REST and ODATA service

    Hi,
    I am using PI 7.4.
    I have few queries regarding REST and ODATA service -
    What is REST based services in PI?
    If there is an ODATA service in SAP, how can we use that in PI for mapping needs?
    Where we need to use BAPIs and where we can consume odata services that are being built for SAP UI5 project.

    Hi
    Kindly check the following links:
    REST Adapter on Advanced Adapter Engine (New) - What's New in SAP NetWeaver 7.4 (Release Notes) - SAP Library
    REST Adapter on Advanced Adapter Engine (New) - What's New in SAP NetWeaver 7.3 EHP1 (Release Notes) - SAP Library
    https://www.advantco.com/product/REST
    PI REST Adapter - Blog Overview
    Regards,
    Xineohpi

  • Cnsuming Lightswitch Odata service in c# winform to perform crud Operations

    HI
    I have created light switch html application which is having  sql as datasource.
    I want to consume the Odataservices that will be created from light switch in c# winforms to perform crud operations .
    Can any one help me how to handled crud operations.
    Thanks and regards
    Venkat

    I found:
    https://social.msdn.microsoft.com/Forums/en-US/71338428-faa6-4e2f-87fb-5ef86f02c69d/how-to-consume-odata-service-made-in-lightswitch-in-a-windows-forms-application?forum=LightSwitchDev11Beta
    https://msdn.microsoft.com/en-us/library/hh973174.aspx
    and a bunch more when I googled "windows forms consuming lightswitch odata"
    These are REST services
    http://blogs.msdn.com/b/bethmassi/archive/2012/03/09/creating-and-consuming-lightswitch-odata-services.aspx
    If you google "windows forms consuming rest services" there are a stack more hits.
    http://www.codeproject.com/Questions/648106/Consuming-REST-WCF-Service-in-Windows-Forms-Applic
    http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/create-and-consume-wcf-restful-service/
    I would recommend you create a "proper" wcf data service rather than using a lightswitch one.
    Hope that helps.
    Recent Technet articles: Property List Editing;
    Dynamic XAML

  • Odata services in Design studio 1.2 ?

    Hello All,
    I am exploring Design studio at the moment and I know that we can do scripting along with drag and drop functionalities.
    But I would like to know if it also possible to consume Odata services or send Odata requests to HANA database to get data back and display on charts or tables and so on.
    Any help would be appreciated.
    Thanks

    Hi Sangamesh,
    Based on what you've described, I'd say it's most likely you will need to create a Calculation View.  For more general information about using HANA with Design Studio you may find the following posts useful:
    Using Design Studio with SAP HANA end to end-Part 1
    Using Design Studio with SAP HANA end to end-Part 2
    Regards,
    Mustafa.

  • Access cloud for customer Odata Service from HCP

    Hi 
    I have a UI(sapui5) which consumes ODATA Service from "cloud for customer" system.
    I am using connectivity proxy servlet(using destinations) to avoid cross origin issue.  when i deploy and access this UI from cloud, the response of the odata service is " HTTP status 500 javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated".
    I tried giving the http url and that says "502 bad gateway".
    How to resolve SSL issue for cloud.?
    Is there any other configuration that needs to be done to consume ODATA from "Cloud for customer" system
    Regards
    Priyal

    Hi Priyal:
    For the SSL handshake at the destination level either you would have to set the property "TrustAll=TRUE" or you have to create a JKS keystore which contains the Server Certificate for the Cloud for customer system and then upload this either via the Admin cockpit (at destination level) or deploy the same via the NEO console tool.
    Best regards
    Venki

  • OData Service not able to consume in Excel PowerBI

            I created a XSOData Service and published it online. The service is exposing the data while checking it browser. But while consuming this service in Excel PowerBI, it is throwing an error "DataSource.Error: Cannot parse OData response result.  Error: A missing or empty content type header was found when trying to read a message. The content type header is required."
         But while checking the service we are able to see content header in it as "<content type="application/xml">" . Can anyone help how to solve this issue?

    Hi,
         At last i solved this issue. I updated Microsoft.Data.Services" dll to 5.5.0 version and everthing is working fine now.

  • Create SAPUI5 application consuming Gateway service with the help of SAP NW Gateway Plug-in for Eclipse

    Hi,
    I followed the amazing SAPUI5 blog :
    How to create SAPUI5 application consuming Gateway service with the help of SAP NW Gateway Plug-in for Eclipse
    I was able to resolve all errors mentioned in this blog but then i get another error :
    Uncaught TypeError: Cannot read property 'dataServices' of undefined
    Any idea what is the problem.
    Thanks a lot!
    Amina

    Hi,
    I followed the amazing SAPUI5 blog :
    How to create SAPUI5 application consuming Gateway service with the help of SAP NW Gateway Plug-in for Eclipse
    I was able to resolve all errors mentioned in this blog but then i get another error :
    Uncaught TypeError: Cannot read property 'dataServices' of undefined
    Any idea what is the problem.
    Thanks a lot!
    Amina

Maybe you are looking for

  • Open file can't be saved to server

    Just got a new computer and started using OS10.5.6 and have noticed that it seems to be dropping the connection to our Windows 2003 Server. (not happening on my other machine using OS10.4). I am working on a Photoshop file for 30 minutes and when I h

  • DNS replicating but not being dynamically updated by other DCs

    Background on setup: Our campus runs BIND for the DNS solution Campus servers do not allow for dynamic updates of the root zone (school.university.edu), but are set to allow dynamic updates of the AD-related zones (_msdcs, _sites, _tcp, _udp, DomainD

  • Blind link in EPM 11.1.2 "Installation Start Here"  document

    Hi there Oracle EPM people, in the "Installation Start Here" document there are several references (e.g.Table 1 Documentation That You Need) to this link: http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html However

  • Photoshop CS3 / ImageReady and Slices

    Mac OSX We've upgraded to CS3 and it has absorbed ImageReady which is most unfortunate. I use ImageReady to copy slices from one psd to another. I've searched quite a bit to see how to do this in CS3 but haven't had any luck. Do you have any ideas? I

  • BDBG : IDOC_INPUT_INTERNAL_ORDER_CREA deleted

    Hi, I tried to change BUS2075 business object's CREATE interface's inbound function module in BDBG . I created a Z copy of IDOC_INPUT_INTERNAL_ORDER_CREA in a Z function group and input it in the dialogue box. BDBG asked me for an access key for whic