Search Results

Search found 9370 results on 375 pages for 'wcf rest contrib'.

Page 27/375 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • how to rest my app to support mobile phone

    - by qichunren
    I am now going to develop a mobile website both support common html format page and wml format page(Because now a usual web browser on mobile can view html page and some old mobiles only support wml ) First step: register content type for wml page config/initializers/mime_types.rb Mime::Type.register_alias "text/vnd.wap.wml", :wml Second: Create two format page for an action in view: class WelcomeController < ApplicationController def index @latest_on_sale_auctions = Auction.latest(15) respond_to do |format| format.html format.wml end end end It works well as I visit: http://localhost:3000/welcome But got: Routing Error No route matches "/welcome.wml" with {:method=:get} as I visit:http://localhost:3000/welcome.wml and it works well as I visit:http://localhost:3000/welcome?format=wml my config/routes.rb like this: ActionController::Routing::Routes.draw do |map| map.root :controller => "welcome" map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end My rails version is 2.3.5,please help me, I want a restful app,both support html and wml.

    Read the article

  • Rest WebService error handling.

    - by Pratik
    Hi there, I am using RestWebservice for few basic operations , like creating/searching. The request xml looks something like this <customer> <name/> ..... </customer> For a successful operation I return the same customer XML with extra fields populated in it(eg. systemId etc which we blank in the request) . with Response.Status=2000 For an unsuccessful operation i return something like this with different error codes . e.g Response.Status = 422(Unprocessable entity) Response.Status= 500(Internal Server Error) and few others.. <errors> <error> An exception occurred while creating the customer</error> <error> blah argument is not valid.</error> </errors> Now i am not sure , whether this is the correct way of sending the errors to the client. Maybe it should be present in the header of the response. I will really appreciate any help. Thanks!

    Read the article

  • Building URL or link in REST ASP.NET MVC

    - by AWC
    I want to build a URL at runtime when a resource is render to either XML or JSON. I can do this easily when the view is HTML and is rendering only parts of the resource, but when I render a resource that contains a links to another resource I want to dynamically generate the correct URL according the host (site) and resource specific URI part. <components> <component id = "1234" name = "component A" version = "1.0"> <link rel = "/component" uri="http://localhost:8080/component/1234" /> </component> <components> How do I make sure the 'uri' value is correct?

    Read the article

  • Rails, REST Architecture and HTML 5: Cross domain requests with pre-flight requests

    - by Orion
    While working on a project to make our site HTML 5 friendly, we were eager to embrace the new method for Cross Domain requests (no more posting through hidden iframes!!!). Using the Access Control specification we begin setting up some tests to verify the behaviour of various browsers. The current Rails RESTful architecture relies on the four HTTP verbs: GET, POST, PUT, DELETE. However in the Access Control spec, it dictates that non-simple methods (PUT, DELETE) require a pre-flight request using the HTTP verb OPTIONS. In addition during testing we discovered that Firefox 3.5.8 pre-flight POST requests as well. My question is this. Is anyone aware of any project for the Rails framework working to address the issue? If not, any opinions about the best strategy to support the OPTIONS method, since it has to support the routes for all the POST, PUT, DELETE methods?

    Read the article

  • Qooxdoo REST JSON request problem - unexpected token and then timeout

    - by freiksenet
    Hello! I am learning Qooxdoo framework and I am trying to make it work with a small Django web service. Django webservice just returns JSON data like this: { "name": "Football", "description": "The most popular sport." } Then I use the following code to query that url: var req = new qx.io.remote.Request(url, "GET", "application/json"); req.toggleCrossDomain(); req.addListener("completed", function(e) { alert(e.getContent()); }); req.send(); Unfortunately when I execute the code I get unexpected token error and then request timeouts. Uncaught SyntaxError: Unexpected token : Native.js:91013011 qx.io.remote.RequestQueue[246]: Timeout: transport 248 Native.js:91013011 qx.io.remote.RequestQueue[246]: 5036ms > 5000ms Native.js:91013013 qx.io.remote.Exchange[248]: Timeout: implementation 249 JSLint reports that this is a valid JSON, so I wonder why Qooxdoo doesn't parse it correctly.

    Read the article

  • What to do when you need more verbs in REST

    - by Richard Levasseur
    There is another similar question to mine, but the discussion veered away from the problem I'm encounting. Say I have a system that deals with expense reports (ER). You can create and edit them, add attachments, and approve/reject them. An expense report might look like this: GET /er/1 => {"title": "Trip to NY", "totalcost": "400 USD", "comments": [ "john: Please add the total cost", "mike: done, can you approve it now?" ], "approvals": [ {"john": "Pending"}, {"finance-group": "Pending"}] } That looks fine, right? Thats what an expense report document looks like. If you want to update it, you can do this: POST /er/1 {"title": "Trip to NY 2010"} If you want to approve it, you can do this: POST /er/1/approval {"approved": true} But, what if you want to update the report and approve it at the same time? How do we do that? If you only wanted to approve, then doing a POST to something like /er/1/approval makes sense. We could put a flag in the URL, POST /er/1?approve=1, and send the data changes as the body, but that flag doesn't seem RESTful. We could put special field to be submitted, too, but that seems a bit hacky, too. If we did that, then why not send up data with attributes like set_title or add_to_cost? We could create a new resource for updating and approving, but (1) I can't think of how to name it without verbs, and (2) it doesn't seem right to name a resource based on what actions can be done to it (what happens if we add more actions?) We could have an X-Approve: True|False header, but headers seem like the wrong tool for the job. It'd also be difficult to get set headers without using javascript in a browser. We could use a custom media-type, application/approve+yes, but that seems no better than creating a new resource. We could create a temporary "batch operations" url, /er/1/batch/A. The client then sends multiple requests, perhaps POST /er/1/batch/A to update, then POST /er/1/batch/A/approval to approve, then POST /er/1/batch/A/status to end the batch. On the backend, the server queues up all the batch requests somewhere, then processes them in the same backend-transaction when it receives the "end batch processing" request. The downside with this is, obviously, that it introduces a lot of complexity. So, what is a good, general way to solve the problem of performing multiple actions in a single request? General because its easy to imagine additional actions that might be done in the same request: Suppress or send notifications (to email, chat, another system, whatever) Override some validation (maximum cost, names of dinner attendees) Trigger backend workflow that doesn't have a representation in the document.

    Read the article

  • REST service with binary data

    - by user179437
    Hi I want to create Restful service which can accept binary data. I've implemented javax.xml.ws.Provider interface, but i can't get content of request. If I use javax.xml.ws.Dispatch then its send only XML data, but I need transfer binary data. Please give some solution, but I don't prefer to use JAX-RS or Restlets. Thanks.

    Read the article

  • Ajax And REST: Can I send an ajax request to a REST service and recieve response?

    - by Morteza M.
    Hi everybody here, I want to use mootools and SqueezBox class to handle a request to a RESTful service. I don't want to use any server-side script. I am using AJAX. I send a request to the following url using GET method. http://www.idevcenter.com/api/v1/links/links-upcoming.json but I receive a 404 error. Is it because cross-site scripting? here is my code: SqueezeBox.initialize({handler:'url',ajaxOptions:{method:'GET'}}); $('a.modal').addEvent('click',function(e){ new Event(e).stop(); SqueezeBox.fromElement($('a.modal')); }); In Firebug console, sometimes 'aborted' is shown and sometimes '404'.what is wrong with that?

    Read the article

  • REST, HTTP verbs and current development in .NET and silverlight

    - by vtortola
    Hi, I've read several posts in the internet about that Silverlight only supports GET and POST, and that the most of the web browsers too. Is this true? has it changed lately? I'm developing a RESTful web service for a Silverlight application, still in early stage, and I'd like to know if I should use just POST and GET, or otherwise I could use PUT and delete. Cheers

    Read the article

  • How to create a RESTful web service in asp.net?

    - by jonhobbs
    Hi Guys, I simply want to create a fairly basic REST service, so that I can expose some of the data in my asp.net/SQL server application to the outside works, like this..... http://domain.com/api/offices - would return an xml set of office locations. http://domain.com/api/offices/15 - would return all the details of office 15. It's all fairly standard stuff (including basic authentication) but there seem to be several ways to achieve this using Microsoft technologies and I don't really know where to start. These seem to be the options... 1) WCF 2) ASP.NET MVC 3) ADO.NET Data Services 4) Rest Starter Kit project templates? Which of these is the easiest and most "up-to-date" solution to creating a web service?

    Read the article

  • Generic Open Source REST Client?

    - by Dean J
    I want a simple client that takes a few parameters (Method, URL, Parameters), makes an HTTP request, and shows me the results that were returned. A browser obviously can easily send GET and POST requests, but I have no good ideas on DELETE and UPDATE. Did I miss something in browser 101, or is there a common freeware tool to do this? I've seen other threads that give me Java APIs for a simple client, but that's not what I'm looking for.

    Read the article

  • How to map non-REST URLS to REST ones?

    - by Krzysztof Luks
    I have a small rails app that has default scaffold generated routes eg. /stadia/1.xml. However I have to support legacy client app that can't construct such URLs correctly. What I need to do is to map URL in the form: /stadia?id=1?format=xml to /stadia/1.xml Or even something like: /myApp?model=<model_name>?id=<id>?format=xml to /<model_name/<id>.xml Is it possible to craft appropriate route in Rails?

    Read the article

  • What to use for space in REST URI?

    - by Droo
    What should I use: /findby/name/{first}_{last} /findby/name/{first}-{last} /findby/name/{first};{last} /findby/name/first/{first}/last/{last} etc. The URI represents a Person resource with 1 name, but I need to logically separate the first from the last to identify each. I kind of like the last example because I can do: /findby/name/first/{first} /findby/name/last/{last} /findby/name/first/{first}/last/{last}

    Read the article

  • Java REST implementation: Jersey vs CXF

    - by dexter
    What do you think is the advantages/disadvantages between this two libraries? Which of these two are best suited for production environment? By the way I will be using JSON instead of XML. I also would like to know what library is most supported by the community e.g. tutorials, documentation.

    Read the article

  • How to do REST with PUT and DELETE

    - by Svish
    It says about the type option of the jQuery.ajax() method that The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers. So... Does that mean that PUT and DELETE won't work if the browser does not support it, or just that PUT and DELETE can not be done natively by the user in the browser? If I can't or shouldn't use those, what do people usually do instead? Send the method as a a GET or POST parameter instead? Or?

    Read the article

  • Get REST Call is not returning the string I put in url

    - by wizage
    I have very simple code: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace Calculator.Controllers { public class CalcController : ApiController { public string Get(string type) { return type; } } } And this is what it returns when I type in http://www.example.com/api/calc/test <string xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" i:nil="true"/> When I use http://www.example.com/api/calc/?test=test it returns this: <string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">type</string> How to I make it so I can just do the top one instead of the bottom one?

    Read the article

  • rails - REST or create another method

    - by user1304740
    Let's assume we have two models linked with a 1-to-many relationship (like clients and invoices - a client can have many invoices). In a view of a 'client' (let's say the 'show' view), there is a form to capture an 'invoice'. I found 2 approaches: This form should be handled by the 'invoice' controller (method create), having client_id passed as a parameter This form should be handled by a new method in 'client' controller, probably a PUT method defined in routes.rb. Is there a 'Rails way', or both of them are good? Is there a preffered way? Thanks!

    Read the article

  • How to connect to a WCF service using IP of the host machine where the service is hosted?

    - by Kumar
    I have a secured WCF service (https://<MachineName>:sslport/services) self hosted in a machine. Different instances of same service are deployed in differnt machines. From a client app, I am able to connect to theses services through code, i.e. using ChannelFactory() with the same endpoint address. But if I try to access the service using the endpoint address as https://<ipAddress>:sslport/services replacing machines name with machine IP address, I am getting some error stating "could not establish trust relationship". I know this is an error caused by SSL certificate that it could not establish a trust relationship. Are there any settings or any possibilities to make this work?

    Read the article

  • WCF wsHttpBinding PHP call

    - by Andrew Kalashnikov
    Hello colleagues. I've written secured WCF service and use complex wsHttpBinding. My so-workers try to consume it from php5.0, but there are errors. When I go to basicHttpBinidng all is ok. Is there any way to consume secured wcf service through php. Thanks a lot.

    Read the article

  • Quartz .Net Job calling WCF service

    - by mattcole
    Hi, What's the best way for me to call a WCF Service from within a Quartz .Net job? Is the easiest way to write a separate exe that spins up a WCF proxy and have that exe called from within the job? This seems like it would work but is a bit convoluted. It'd be nicer if I could somehow have the Job have the proxy injected in someway. Thanks, Matt

    Read the article

  • Application Architecture using WCF and System.AddIn

    - by Silverhalide
    A little background -- we're designing an application that uses a client/server architecture consisting of: A server which loads server-side modules, potentially developed by other teams. A client which loads corresponding client-side modules (also potentially developed by those other teams; each client module corresponds with a server module). The client side communicates with the server side for general coordination, and as well as module specific tasks. (At this point, I think that means client talks to server, client modules talk to server modules.) Environment is .NET 3.5, and client side is WPF. The deployment scenario introduces the potential to upgrade the server, any server-side module, the client, and any client-side module independently. However, being able to "work" using mismatched versions is required. I'm therefore concerned about versioning issues. My thinking so far: A Windows Service for the server. Using System.AddIn for the server to load and communicate with the server modules will give us the greatest flexibility in terms of version compatability between server and server modules. The server and each server module vend WCF services for communication to the client side; communication between the server and a server module, or between two server modules use the AddIn contracts. (One advantage of this is that a module can expose a different interface within the server and outside it.) Similarly, the client uses System.AddIn to find, load, and communicate with the client modules. Client communications with client modules is via the AddIn interface; communications from the client and from client modules to the server side are via WCF. For maximum resilience, each module will run in a separate app-domain. In general, the system has modest performance requirements, so marshalling and crossing process boundaries is not expected to be a performance concern. (Performance requirement is basically summed up by: don't get in the way of the other parts of the system not described here.) My questions are around the idea of having two different communication and versioning models to work with which will be an added burden on our developers. System.AddIn seems quite powerful, but also a little unwieldly. (I'm also unsure of Microsoft's commitment to it in the future.) On the other hand, I'm not thrilled with WCF's versioning capabilities. I have a feeling that it would be possible to implement the System.AddIn view/adapter/contract system within WCF, but being fairly new to both technologies, I would have no idea of where to start. So... Am I on the right track here? Am I doing this the hard way? Are there gotchas I need to be aware of on this road? Thanks.

    Read the article

  • Streaming live video from WCF service to Silverlight

    - by Yuval Peled
    Hi, I need to stream live captured data (from a screen/web cam) from a WCF service to a Silverlight client. Since it's live data I don't mind losing packets... More important that it will be real-time data. Any suggestions how can I do it? How does the WCF service transfer it? How does the Silverlight client should consume the stream?

    Read the article

  • WCF security when it is used with sync services

    - by malik
    I am using following architecture for sync process. http://www.codeproject.com/KB/smart/sync_services.aspx And for server i use WCF service, can anybody guide me how can i secure my wcf service without using certificate that is hosted on IIS. Can i get a way to pass credential or some token to authenticate? I need to authenticate and encrypt the communication, when syncagent call synchronise method.

    Read the article

  • WCF with 3.5 and 4.0 together

    - by Pharabus
    Has anyone managed to run wcf successfully in 2.0 integrated mode on IIS7 when .net 4 has been installed? I found that installing .net 4 removed the 2.0 handlers for svc and replaced them with .net 4 versions (this led to a 404.17 error in my v3.5 site), I managed to get my 3.5 site working again by running ServiceModelReg.exe /i from the v3.0 folder (Windows Commuication Foundation) but that removed the 4.0 mappings so they seem to be mutually exclusive? any advise on how to run a 4.0 and 3.5 WCF site on the same IIS7 server?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >