Error while connecting with the url using odata...please help

hi All,
I was trying to do one basic ODATA example which i got from the threads.
<!DOCTYPE html>
<html><head>
  <meta http-equiv='X-UA-Compatible' content='IE=edge' />
  <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
  <title>Table with OData Binding</title>
     <script id='sap-ui-bootstrap' type='text/javascript'
        src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js'
        data-sap-ui-libs="sap.m,sap.ui.commons,sap.ui.table"
  data-sap-ui-theme="sap_bluecrystal"></script>
  <script>
  // the root URL of the OData service - prefixed with a local URL to a proxy which forwards the request,
circumventing cross-domain restrictions
  // IMPORTANT: this proxy must be available for the code example to run!
  var url = "http://services.odata.org/Northwind/Northwind.svc";
// create an ODataModel from URL
  var oModel = new sap.ui.model.odata.ODataModel(url, true);
  var oTable = new sap.ui.table.Table("sampleTable");
  oModel.read("/Customers",null,null,null,function(){
  var metadata = oModel.getServiceMetadata();
  var entityCustomerRef = metadata.dataServices.schema[0].entityType[2];
  var listOfProperties = entityCustomerRef.property;
  for ( var i = 0; i < listOfProperties.length; i++) {
  oTable.addColumn(new sap.ui.table.Column().setLabel(
  new sap.ui.commons.Label({
  text : listOfProperties[i].name,
  })).setTemplate(
  new sap.ui.commons.TextField().bindProperty("value",
  listOfProperties[i].name))) }
  oTable.setModel(oModel); // set model to Table
  oTable.bindRows("/Customers");
  oTable.placeAt("content"); // place model onto UI
  </script>
  </head>
  <body class='sapUiBody'>
  <div id='content'></div>
  </body>
</html>
but when i try to execute the same it is not loading any data and showing the error as :
2014-07-21 16:04:05 (default) : https://sapui5.hana.ondemand.com/resources/ - sap.ui.ModuleSystem sap-ui-core.js:80 
2Failed to load resource: the server responded with a status of 501 (Not Implemented) http://services.odata.org/Northwind/Northwind.svc/$metadata
XMLHttpRequest cannot load http://services.odata.org/Northwind/Northwind.svc/$metadata. Invalid HTTP status code 501 odata.html:1
2014-07-21 16:04:16 The following problem occurred: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://services.odata.org/Northwind/Northwind.svc/$metadata'. -  sap-ui-core.js:80
Failed to load resource: the server responded with a status of 501 (Not Implemented) http://services.odata.org/Northwind/Northwind.svc/CustomersXMLHttpRequest cannot load http://services.odata.org/Northwind/Northwind.svc/Customers. Invalid HTTP status code 501 odata.html:1
2014-07-21 16:04:17 The following problem occurred: HTTP request failed0,, -  sap-ui-core.js:80;;
But i can launch the url with metadata through browser..kindly help???

Hi Arun,
replace the following line in your code:
var url = "http/services.odata.org/Northwind/Northwind.svc";
with the following:
var url = "proxy/http/services.odata.org/Northwind/Northwind.svc";
It will either work fine or this error will be skipped.

Similar Messages

  • Error while connectng with the database

    hi,
    I am working with the oracle load testing for web application and now it is using the default database 10g.Then i have installed 11g database in my desktop And also by using oracle application testing suite database configuration i have connected with 11g database also both system are in same network.
    while connecting with the database the following error has occured
    Error opening database '11g'
    Error connecting to the database.
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Driver's SQLSetConnectAttr failed
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    solution needed

    hi asif,
    i have configured the tnsnames and listener file with the following
    tnsnames.ora
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    XE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    orcl =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.103)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    OTM_CONNECTION_DATA_1 =
    (DESCRIPTION =
         (ADDRESS_LIST =
         (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xx)(PORT = 1521))
              (CONNECT_DATA =
              (SERVER = DEDICATED)
         (SERVICE_NAME = orcl)
    and listener.ora contains
    # lISTENER.ORA Network Configuration File: /u01/app/oracle1/product/11.1.0/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xx)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle1/product/11.1/db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = orcl.localdomain)
    (ORACLE_HOME =/u01/app/oracle1/product/11.1/db_1)
    (SID_NAME = orcl)
    )

  • Error while connecting to the database from a JSP Page

    Hi,
    I am using a simple JSP page which is based on the sample JSP pages from OTN.
    When I try to connect to my database using the following code:
    InitialContext ic = new InitialContext();
    OracleDataSource ds = (OracleDataSource)ic.lookup("jdbc/OTN9iDS");
    m_connection = ds.getConnection();
    I get the following error:
    Naming exception Error while connecting to the database : javax.naming.NameNotFoundException: jdbc/OTN9iDS not found in JDBCTest-JDBCTestProject-webapp
    Does anybody know wht this is happening?
    Any help would be appreciated
    FRank

    Hi Frank,
    Are you using standalone OC4J or 9iAS ? If you are using standalone OC4J then you need to add a proper data source entry in %OC4J_HOME%j2ee\home\config\data-sources.xml file.
    If you are using 9iAS the you can log in to the Enterprise Manager console and add the data source entry by using wizard provided by 9iAS.
    Ensure the case of the JNDI lookup string, since, it is case sensitive.
    Hope this helps.
    Abhijeet

  • Error while communicating with the server

    Hi Experts,
    I'm having the following issue, when I try to send data using an input schedule the server says that there was an error while communicating with the server and don't send the data, I took a look at the log file and it says the following,
    ==============[BPC Logging]==============
    [Message Type] : ERROR
    [Job Name]     : OSoft.Services.Application.FileAccessService.FileAccessServiceProxy
    [DateTime]     : 4/6/2011 8:42:44 AM
    [UserId]       : CAMESAP\BPC_SYSADMIN
    [Message]       : UJF_EXCEPTION E018     Cannot find document/directory 0
    ==============[BPC Logging End ]==============
    Also i went to take a look at the default script logic, because i remember that this error happened to me when i wrongly program an script logic in the default.lgf  but it shows me the following error when I open it,
    System.InvalidCastExeption: Specified cast is not valid
    at System.data.DataColumnCollection.get_Item(String name)
    at System.data.DataRow.get_Item(String columnName)
    at Osoft.Consumers.Admin.AdminLogicClient50.LogicMain.GetLogic()
    If I compile the file, the error stop appearing, put with all new logic files it happens at first, I think that these two errors are very deep related, if anyone can help me will be very appreciated,
    Thanks in advanced

    Hi,
    I have faced the similar kind of problem in BPC NW 7.5 SP5.
    The main reason is when you are trying to send any data via input schedule, you will get this web server communication issue.
    1) Check if any thing you are calling script logic under default.LGF. Exclude the logic out from default and test it.
    2) Process all the dimensions in application
    3) Perform Lite optimization and check are there any errors.
    4) Finally check BPC COM+ services  and check if any service stopped and also check osoft send governer service in microsoft services.
    5) Diagnoise usign server manager.
    6) Try input some thing in apshell and check if u face the same web server communication error?

  • I am getting error while connecting to sqlplus by using apps account in 11i

    i am getting error while connecting to sqlplus by using apps account in 11i. Does anyone has similar error.
    [applmgr@appsc05t01 admin]$ sqlplus
    SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 13 14:34:52 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter user-name: apps
    ERROR:
    ORA-12514: Message 12514 not found; product=RDBMS; facility=ORA
    Enter user-name:
    Thanks
    Rao

    yes.
    login as: gorantla
    [email protected]'s password:
    Last login: Mon Sep 13 14:39:23 2010 from glng3wy9g1.actuant.pri
    [gorantla@appsc05t01 ~]$ sudo su - applmgr
    [applmgr@appsc05t01 ~]$ ora_setup
    Available databases:
    x = ATUXX
    y = ATUYY
    z = ATUZZ
    Select database: \c
    y
    ORACLE_SID=ATUYY
    IAS_ORACLE_HOME=/apps/ATUYY/atuyyora/iAS
    ORACLE_HOME=/apps/ATUYY/atuyyora/8.0.6
    APPL_TOP=/apps/ATUYY/atuyyappl
    [applmgr@appsc05t01 ~]$
    [applmgr@appsc05t01 ~]$
    [applmgr@appsc05t01 ~]$
    [applmgr@appsc05t01 ~]$ tnsping ATUYY
    TNS Ping Utility for Linux: Version 8.0.6.3.0 - Production on 13-SEP-2010 15:42:32
    (c) Copyright 1997 Oracle Corporation. All rights reserved.
    Attempting to contact (ADDRESS=(PROTOCOL=tcp)(HOST=dbrac05t01-vip.actuant.pri)(PORT=1611))
    OK (0 msec)
    [applmgr@appsc05t01 ~]$ sqlplus
    SQL*Plus: Release 8.0.6.0.0 - Production on Mon Sep 13 15:42:40 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter user-name: apps
    ERROR:
    ORA-12514: Message 12514 not found; product=RDBMS; facility=ORA
    Enter user-name:
    Thanks
    Rao

  • Trouble to connect to wireless G routers after installed the latest update 10.10.2  . Anyone with the same problem? Please help Apple support team!! Macbook Pro mid 2010. PS.: Only with wireless G routers, the rest are fine (N, B...)

    Trouble to connect to wireless G routers after installed the latest update 10.10.2  . Anyone with the same problem? Please help !!! Macbook Pro mid 2010. PS.: Only with wireless G routers, the rest are fine (N, B..., and both radio bands)

    Trouble to connect to wireless G routers after installed the latest update 10.10.2  . Anyone with the same problem? Please help !!! Macbook Pro mid 2010. PS.: Only with wireless G routers, the rest are fine (N, B..., and both radio bands)

  • I have problem when transferring book (PDF/Epub) from Computer to iPad with the new iTune? Please Help....

    I have problem when transferring book (PDF/Epub) from Computer to iPad with the new iTune? Please Help....

    With iTunes 11 you can enable the left-hand sidebar via control-S on a PC, option-command-S on a Mac. If you are trying to get it to the iBooks app then with the sidebar enabled the process should be similar to how it was on previous versions of iTunes e.g. add it to your iTunes library via File > Add To Library, connect the iPad and select it on the left-hand sidebar, and then use the Books tab on the right-hand side to select and sync it to the iBooks app.

  • HT204269 itunes showing 'backup is corrupt or not compatible with the firmware you restored'.Please help.

    itunes showing 'backup is corrupt or not compatible with the firmware you restored'.Please help.

    Hi Ckuan,
    Thanks a lot for your advice.    
    Deleting the correupted back up means to delete the information of one month since the last back up I made is one month ago.....right? 
    This back up I made right before I restored my iphone.  During the restore however my OS was upgraded to 5.1.1. and reading the comments on the internet it seems I am not the only one whom experience this problem. 
    Can it be that if I downgrade my OS back to 5.1. the back up will not be considered as corrupted?  If so, how do I downgrade the iphone?
    Thanks in advance.

  • Error in connecting with the database

    Hi,
    when i try to connect with the database the following error has occured
    ORA-12504: TNS:listener name was not given the service name in connect data
    solution want

    hi,
    i has the following in my tnsnames.ora file
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    XE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    ORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl.localdomain)
    )

  • Palm 680 Issue - "Connecting with the deskop using Cradle" msg

    I have a curious problem with my 680 Smartphone.  When not connected to the cable it is continously and spontaneously attempting to connect with the desktop.  Is this some sort of HW short or malfunction?  The phone is unusable.  Everytime I clear the msg it goes back into synch mode.
    Even stranger, if I connect the cable from my PC to the phone, it will become usable again.  I can clear it out of synch mode and use all the features of the phone. 
    Has anyone ever experienced this?  I have done all the suggested troubleshooting on the support site.
    Post relates to: Treo 680 (AT&T)

    Hello GlennPalm1000, Welcome to the Palm Support Community.
    This issue seems to appear when the bottom Hotsync connector gets wet or otherwise contaminated.  You might try cleaning it with isopropyl alcohol or contact cleaner from an electronics store.
    Any chance the phone got wet?
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • I changed my email address for my apple id but icloud still has old email adress and when I try to signout so I can sign in with new address it asks for password and then says invalid so I cannot delete the account to sign in with the new one! Please help

    I changed my email address for my apple id but icloud still has old email adress and when I try to signout so I can sign in with new address it asks for password and then says invalid so I cannot delete the account to sign in with the new one! Please help

    OK...now I appear to 'progressed' I changed my email address back to original on Apple id and then was able to delete icloud account. Apparently I couldnt do it as it kept requesting password  when I entered passsword ( both old and new one, it wouldnt accept it as it had my old email address in ) It didnt do that on ios6 . Anyway I deleted account, but now I tried to login in with my new id/password and it says unable as already in use!!! More help needed please! Its a nightmare!!

  • My Ipad on version 6.1.2 , I can not updated to 6.1.3  and I can not restore it as we'll . I have tried with ITunes and with the device it self , please help

    I can not restore my IPad and I can not update it  . I tried with ITunes and with the device as well
    Any help. Please

    It really helps if you describe what is happening, otherwise there is no way to offer meaningful suggestions. Just saying "I can't ..." Doesn't tell us anything helpful.

  • Getting an error while validating with the help of domain

    This is strange. I am validating an email address column in employees table by creating a domain and then associating it with the email column in the table. This is the code
        protected void validate() {
            //  ### Implement custom domain validation logic here. ###
            int atpos = mData.indexOf('@');
            int dotpos = mData.lastIndexOf('.');
            if (atpos > -1 || dotpos > -1) {
                throw new DataCreationException(null, "Invalid Email Address", null);
        }But while committing records, I am receiving the following error:
    Cannot convert testmailid of type class java.lang.String to class model.common.DomainEmail
    Can anyone help me?
    Oh yes, I am using JDev 11.1.2.3

    I suspect that you are using an <af:inputText> with no converter for entering the email on the page. The purpose of a converter would be to convert the String value entered by the user in the field to another datatype (e.g. to model.common.DomainEmail type) which is expected by the model layer (e.g. by the target VO attribute). If there is no such converter, JSF does not perform any datatype conversion and it tries to assign the java.lang.String value to the VO attribute (which is of model.common.DomainEmail datatype), so a type casting error occurs. If that is the case, then you should implement and attach a proper JSF converter to the <af:inputText> component.
    Dimitar

  • Error while connecting to the LDAP server

    In LDAP Server, i have configured OU with the following characteres.
    OU=Administración.
    Now when i try to connect LDAP server from my application, am getting the following exception.
    [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0]
    javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db0]
         at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3041)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2987)
         at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2789)
         at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2703)
         at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
         at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)
         at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)
         at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)
    When i search for this, i got the this [link |http://esupport.trendmicro.com/solution/en-us/1037285.aspx/] saying some Accent characters are not converted correctly into 8-bit Unicode Transformation Format (UTF-8).
    Here i have used URLEncoder.encode(mySearchbase, "UTF-8"); to encode the special characters into UTC-8.
    I would like to know whether its a known issue with accent characters or anything else i missed here to handle those characters.
    Thanks,
    -Konanki

    Well, if you're passing an array of bytes to that LDAP access code, then that isn't the right way to encode a String to an array of bytes in UTF-8 encoding. And anyway it's been a long time since I wrote LDAP access code, but I don't recall having to pass arrays of bytes to any of those JNDI classes, so that idea is probably wrong in any case.
    I would suggest, if that page you linked to is actually relevant, that you just install the hot-fix it refers to. On the other hand if it doesn't actually apply to your situation, then you should just ignore it.
    My guess is that UTF-8 or not, your OU value on the server is in fact not "Administraci&oacute;n" -- that's based on the number of mis-encoded characters I see there. So perhaps what you are passing to the JNDI classes does in fact not match the server's value and it isn't an encoding issue at all.

  • Error while connect to the server?

    Signing in ICloud (www.icloud.com) on my PC it says: ICloud encountered an error while trying to connect to the server. But everything is ok with iCloud panel on my control panel. What could i do?

    Last time there was not thiskind of problem.

Maybe you are looking for

  • Sharepoint 2013 BI solutions using Performance point services is can be compatible with Analysis server 2008 R2?

    HI In Sharepoint 2013 BI solutions using Performance point services  is can be compatible with Analysis server 2008 R2? here in sp 2013 i upgraded sp 2010 BI site and when i open dashboard pages they not display the pointers. and when i open dashboar

  • Invalid UTF8 encoding & XSU

    I am using XSU version 1.2. to generating an XML document from data which contains German (d,|,v). The XML parser (2) cannot handle this. The error i get is: ERROR at line 1: ORA-20100: Error occurred while parsing: Invalid UTF8 encoding. ORA-06512:

  • How can I include the time & date

    .... when printing an iPhoto picture? I have the information on the right hand side but cannot find a way of printing it with the picture.

  • A little stuck, need help =)

    Hey all, Im fairly new here and new to Java as well. I just started college this month and am moving along quite well but I kinda wrote myself into a wall if you will. I just finished writing a program to calculate commission based on some data the u

  • Compete spcial offer restrictions

    How is that I don't qualify for the special offer when as  Student I Bought the MASTER COLLECTION CS3 for $800 Yet a friend got Photoshop CS5 on special for $250 and qualifies for the special. I make a lot larger investment in Adobe and now they want