Search Posts

Category: rest

Centralized session in multiple product having different domain

I am developing centralized admin module for multiple product. Trying to maintain same session across multiple product. For Product1 : Authenticate successfully and send token in response header Request URL:http://localhost:8080/admin-web/rest/authenticate/ Request Headers Accept:application/json, text/plain, */* Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.8 Cache-Control:no-cache Connection:keep-alive Host:localhost:8080 Origin: Pragma:no-cache Referer: User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.109 Safari/537.36 Response Headers Set-Cookie:token=asdf123sfs1f23sfsf321sfsf21; Version=1; Comment=””; Domain=localhost; Path=/ Access-Control-Allow-Credentials:true Access-Control-Allow-Origin: Content-Encoding:gzip Content-Type:application/json Date:Mon, 13 Nov 2017 12:38:27 GMT Server:Apache-Coyote/1.1 Transfer-Encoding:chunked Vary:Origin Vary:Accept-Encoding […]

Angular $http DELETE method return 404 to NodeJS server

I have this code in my Angular controller function deleteStudent(st_id, name){ if(confirm(‘Anda yakin akan menghapus siswa (‘ + name + ‘)’)){ var url = baseURL + ‘/student/’ + st_id; console.log(‘deleteStudent function with URL [‘ + url + ‘]’); var p = $http.delete(url); p.then(function(response){ alert(response.message); }); } } When I’m using Postman to this url http://localhost:1234/api/student/41 data on my database deleted successfully, but when I try using my angularJS controller I got this error Chrome Console […]

Master detail in AngularJS

I try to write a small app that get a list from REST API and displays details for each selected item. I was looking for a simple tutorial on how to transfer the selected id from the list view to the detail view, but couldn’t figure out. I assume I need to use the Master-detail technique. Here’s the code: The list view: <ul> <li ng-repeat=”gadgetDetails in gadgettDetails”> <div> <a href=”#/gadgets/{{}}”><p>{{gadgetDetails.type}}</p></a> <p>{{gadgetDetails.manufacturer}}</p> </div> <hr /> </li> […]

Wcf REST service POST Method return Error wiht Angular JS Application

I am consuming Wcf REST Service into Angular JS Application . I am Posting the required the values from Angular JS Application .When i clicked the save button ,its showing error 404 bad request . I generate the Entity model from the database and I have local class to string properties . I assigned this string properties to local class. The enter the required the values into input fileds but its invocking single part of […]

How to bring special characters with angular 1.6 and RestController (spring)?

Hello to the community I commented that I am using angular 1.6, and I am sending a json with special characters (ñ, é), but when checking in the controller I get distorted. service – angular var json_ins = { … } ; // special characters var data = encodeURIComponent(JSON.stringify(json_ins)); $http.get(VAR_CONTEXT+’/team/update?data=’ + data).then( function (response) { deferred.resolve(response); }, function (errResponse) { console.error(‘Error: Service Users’); deferred.reject(errResponse); } ); RestController @RequestMapping(value = “/team/update”, method = RequestMethod.GET) public String […]

Wcf REST Service DELETE Method is Undefined in Angular JS Application

I am consuming wcf rest service into Angular JS Application. But I can do delete the post from Angular Js Application . I access the method from localhost and result i got the End Point not Found.I checked debugging mode. I got following error . The creator of this fault did not specify a Reason. I check Google Chrome console window . I got this result .. DELETE http://localhost:52098/HalifaxIISService.svc/DeleteCreateCurrentAccount/undefined 400 (Bad Request) Here is the […]

Angular JS Application unable to POST Data to Wcf REST Service

I am consuming Wcf Service into Angular JS application but its not working according my expection. I am trying to send money to one account to another account using Sql transaction method. When i clicked the submit button in angular js application it is unable to post the input values to wcf service. I put break point into wcf service and its not receiving any values. Here is the local class named Money Transfer… { […]

How to return Wcf service method into Angular Js Application

I am consuming Wcf REST Service into Angualar JS Application. I am facing some problems . As I know WCf REST Service allow GET ,POST,PUT and DELETE Operation. But I want to return a method true or flase from Wcf Service into Angular JS application. For Example if ueranme is exist into Database then i want to return true and displaying message in angular js application that username is exist otherwise the information will be […]

REST Client application with Topology diagram

I suppose to develop a network management REST client with topology diagram (as an image showing below). With that application, the user should able to create a topology diagram by drag and drop, change the nodes positions by dragging, edit nodes properties and delete node elements. Now I’m doing some feasibility study how can I approach this task with HTML 5 client or Java thick client. I have seen some API called esri but it […]

Next Page »