How to consume OData service in  sapui5

    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)$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.

Similar Messages

  • 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.

    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..

  • Consume OData service in SUP 2.1.3

    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?

    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

  • How to consume web service in Agentry in SMP 3.0

    Dear All , I am using web service in Agentry to retrive data but could not able to fetch it . I have made connection with HTTP-XML for consuming webservices. and also give proper information in Agentry.ini files Ex : [HTTPXML-2] name=HTTP-XML Back End authenticationCertificateStore=MY authenticationCertificateStorePassword= authenticationCertificateStorePasswordEncoded=false autoDequote=true ;baseURL=http://localhost:81 baseURL= basicAuthenticationPassword=123456 basicAuthenticationPasswordEncoded=false basicAuthenticationUserID=P1466405733 constantsFile=httpxml_sd.ini enableAuthentication=false enablePreviousUserAuthentication=false httpConnectTimeout=300 httpReceiveTimeout=300 httpResolveTimeout=300 httpSendTimeout=300 listenOn= timeout=300 timeZoneName= useSSL=false xmlAllowXSLTScript=true xmlNamespaces= xmlResolveExternals=true xmlValidateOnParse=true for more information i have attached agentry XML screen shot as well . Can you please guide me how to consume web services in Agentry correct way ? Note : Currently i am using standard netweaver demo web services . Thanks & Regards ,   Kunal Varaiya
    Tags edited by: Michael Appleby

    The XML Steps URL will be added to the Agentry.ini BaseURL.  So you dont' need the full URL on the step.
    So when Agentry Runs the step to call the backend it will go:
    <BaseURL>/<Step's URL>
    This way if you need to change the base URL, IE, going from Dev to QA to Production Server you only need to change the Base, and not go into every step and update it.
    URL: This attribute contains the URL to which the Agentry Server will make a request. This value will be appended to the value configured as the base URL for the HTTP-XML system connection. This base URL is configured within the HTTP-XML system connection configuration options for the Agentry Server. Proper use of both this base URL option and the URL entered in the requests of the step definitions can support portability for the application, with the base URL being the implementation-specific portion and the step’s URL being the portion not likely to change for the same back end system from one implementation to the next. 

  • How to consume Web Service in ABAP WebDynpro

    I want to know the entire details about how to consume Web Service in WebDynpro application.

    hI piyush,
    Have a look at this Blog by Thomas Jung.
    on consuming webservies thru webdynpro ABAP

  • 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

    Hi Holger,
    I have already tried this steps(  &  OData client for Windows Phone 8 )  and are able to consume OData service from my Windows Phone 8 app with the OData service link ( ) 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.…

  • How to consume Web Services form ABAP ?

    Please advise how to consume web services from ABAP Code ? is there any automatic generating proxy class in order to consume web services ?
    I am using NW 7.0 SP15
    Thank You and Best Regards
    Fernand Lesmana

    Hi Fernand,
    chk out for this link
    Consume an ABAP Webservice (WAS 620) from .Net
    Send SMS to India from ABAP
    working web service from ABAP

  • How to consume WEB SERVICES from ABAP ??

    Q: How to consume WEB SERVICES from ABAP program??
         the point here is i am using SAP release 620 and the creation of proxy is out of scenario
         and also no XI.    Its only through ABAP program i need to consume one web service (its a HTTPS one ),
        Using cl_http_client... i tried it but i am totally confused of whats happening ???
    Req some senior ppl advice on the same/approach.
    any hints will suffice my way of approach...!!!
    Please do put in your valuable advices..!!
    Thanks in advance..!!!!

    Hello Srinivas,
    Following is the code for calling web service:
    data: client type ref to if_http_client,
          host   type string value 'server url',
          service type string value '8080',
          path type string value '/sap/public/ping',
          errortext type string,
          proxy_service type string,
          scheme type i value 1.
    call method cl_http_client=>create
    exporting host  = host
            service  = service
         proxy_host  = host
       proxy_service = service
       scheme        = scheme
    importing client  = client
        argument_not_found = 1
        internal_error     = 2
        plugin_not_active  = 3
        others             = 4.
    case sy-subrc.
      when 0.
         write 'Server reached successfully'.
      when others.
         write: 'sy-subrc =', sy-subrc.
    Once you got the client object you can call following methods:
    "Set the requrie URL for the web service you want to call. This is not WSDL anyway!!
    cl_http_utility=>set_request_uri( request = client->request
    uri =' url 2 be called ').
    *Then you can call send method with proper inputs for sending request to WS
    CALL METHOD client->send
    Then you can use receive method for getting the response
    CALL METHOD client->receive
    *You can get last error in case of exceptions
    CALL METHOD cl_http_client=>get_last_error
    *Close the client object
    CALL METHOD client->close
    For more information on full code refer my link in previous replay.
    Edited by: Augustarian on Aug 18, 2009 1:49 PM

  • How to consume SOA service in SSRS

    I am working on SSRS.I deployed my application in reporting server 2012 R2.I am having only RDL files and HTML file.Through HTMl with parameters i am calling RDL files.
    Now i need to consume SOA service for the live data.Please help me how to consume SOA service in SSRS.

    Hi RSingh,
    Thanks for your help and could you please let me know how exactly we need to consume SOA service.
    In my datset Query part i am having the Query like this
    <Method Name=""   Namespace="">
    <Parameter Name=""></Parameter>
    Is this the way of consuming SOA??.Please let me know on this.

  • 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

  • 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("",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$metadata  datajs.js:17
    (anonymous function)index.html:22
    Please help me how to solve this problem. Initially, i am just trying to create the model object.

    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, 
    After step12, please see the note in troubleshooting, hope it should help you..
    Vijay V

  • How to consume oData from HANA?

    Hi All:
    I am starting using HANA (the trial public version), and I want to expose an oData service that allows me to feed an aplication. How it is possible to do this? Is possible to do it from HANA Studio?

    I am not sure if I understand - at the moment SAP HANA is not supporting oData - you can choose from following interfaces:
    u2022 SQLDBC (only on windows) - SAP native database SDK
    u2022 ODBO (OLE DB for OLAP)
    u2022 ODBC
    u2022 JDBC
    Or you might use other SAP technology to provide this... maybe SAP NetWeaver Gateway
    I will also quote what Juergen said about oData (Dec 5, 2011)
    Re: HANA with Mobility?
    Later versions of HANA may include an ODATA interface, so you can talk to your tables and models in the same way you talk to NW Gateway. It won't require a Gateway system, it will just look like one from a protocol point of view. No definite roadmap published as far as I know, so take this information with the appropriate amount of salt..

  • 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....

    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.

  • How to consume SOAP service in Agentry?

            I am new in Agentry and I want to consume .asmx service in agentry.for that can I do changes in work manager or I have to create new project.what I have to do please guide me for the same.I am using Eclipse with agentry plugins and WM client and server.

    How can I use Http-xml system connection in agentry.

  • How to consume Web Service with Password digest from PLSQL

    We have Oracle 10g ( 64 bit. We have a situation where we need to consume web service whose security header looks like as follow,
    <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="" xmlns:wsu="">
    <wsse:UsernameToken wsu:Id="UsernameToken-50">
    <wsse:Password Type="">d2enK45chjBPVvvukbYU6OX56kI=</wsse:Password>
    <wsse:Nonce EncodingType="">YAhEtLJfp4lzycLd3hZYjQ==</wsse:Nonce>
    Here we need passowrd digest, Nonce and Timestamp.
    How to create password digest from PLSQL? or if any other alternatives available please response soon.

    I do not see why it will not be possible to do digest authentication with a web server using PL/SQL.
    As for the digest password - the web server supplies a token (a nonce) which you need to use for creating the hashed authentication token (the digest password). The URL I posted explains this authentication process.
    As for the technical how-to in PL/SQL - as I mentioned, never had to do this (only dealt with Basic and NTLM authentication thus far). But as other auth methods (such as Microsoft's NTLM) can be implemented, I do not see why digest authentication could not.
    Suggest you spend some time googling for technical articles/sample code on the subject - and try to find specific PL/SQL related sample code too.

Maybe you are looking for