Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor swarupk2007's Avatar
    Join Date
    Feb 2008
    Posts
    118
    I am creating a sample widget to call apibridge plugin sample app api.
    I am using visual studio and s60 5th edition.
    Here is the code that i have used :
    I am getting error code 500 as reply from apibridge.
    Can anyone tell whats wrong or missing in below code ?


    <script type="text/javascript" src="bindings/js/apibridge.js"></script>
    <script type="text/javascript" src="bindings/js/sample.js"></script>

    <script type="text/javascript" src="bindings/js/apibridge.js"></script>
    <script type="text/javascript" src="bindings/js/sample.js"></script>
    <!-- <script type="text/javascript" src="basic.js"></script>-->
    <script type="text/javascript" src="WRTKit/WRTKit.js"></script>
    <meta name="generator" content="Nokia WRT extension for Visual Studio 2.0" />
    </head>
    <!--<body onload="init()">-->
    <body>
    <script type="text/javascript">
    var par1;
    var err;
    var msg;
    msg = "before calling echo"
    Sample.echo(
    par1,
    err,
    function(res) {
    alert("Done");
    msg = "Done";
    },
    function(res) {
    alert("ERROR: " + res.status);
    msg = "ERROR: " + res.status + err.responseText;
    }
    );
    </script>
    </body>


    binding code in sample.js :

    var Sample = {
    echo: function( msg, err, onSuccess, onError) {
    APIBridge.Internal._sendRequest(
    "/sample/echo?msg="+encodeURIComponent(msg)+"&err="+encodeURIComponent(err),
    null,
    function(req){
    if (req.responseText)
    onSuccess(req.responseText);
    else
    onError(500);
    },
    onError );
    }
    }

  2. #2
    Regular Contributor swarupk2007's Avatar
    Join Date
    Feb 2008
    Posts
    118
    anyone know this ???

  3. #3
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    Hi swarupk2007,

    have you also tried if using a S60 3rd edition emulator solves the issue?

    Pit

  4. #4
    Regular Contributor swarupk2007's Avatar
    Join Date
    Feb 2008
    Posts
    118
    Actually the sample app echoservelet provided with API bridge plugin is working fine on S60 5th SDK emulator and also emulator is also provided in API bridge plugin development kit.

  5. #5
    Regular Contributor swarupk2007's Avatar
    Join Date
    Feb 2008
    Posts
    118
    I haven't done any changes in apibridge.js. Is there any changes needed in this file as the error is related to Session Authentication. It is first replying response code 403 and then 401 and after 500. So does I need to do changes related to SessionID etc...... Though i tried with changing session id response is same.

  6. #6
    Regular Contributor swarupk2007's Avatar
    Join Date
    Feb 2008
    Posts
    118
    issues resolved there was silly mistake need to initialize variables :

    par1 = "Hello";
    err = "";

Similar Threads

  1. browser hangs on http status code 500 ( urgent)
    By harshith in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2010-01-21, 00:15
  2. RSocket Connect fails with Error Code -46
    By arunmdevan in forum Symbian C++
    Replies: 2
    Last Post: 2009-10-08, 12:05
  3. HTTP 500 responce code
    By HasithaRandika in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-02-25, 13:31
  4. Dialogless responses to SendRequest
    By zinedinesmith in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-08-02, 14:53
  5. HttpConnection.POST return error code 500
    By djypanda in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2006-04-07, 17:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved