Questions tagged [webinvoke]

WebInvoke - Indicates a service operation is logically an invoke operation and that it can be called by the REST programming model

48 questions
2
votes
1 answer

WCF Custom Error Page when self-hosting service (Without IIS)

I have a self-hosted WCF service that exposes only one WebInvoked operation with address and parameters as such: www.myserver.com/myservice/SayHello?LuckeyNumber=3 (where LuckeyNumber : int) Now, when someone is trying to access this address but…
Felix
  • 1,034
  • 1
  • 9
  • 29
2
votes
1 answer

GET works, but POST fails when calling WCF from JQuery on remote server

I have two OperationContracts on my test WCF service, when I test it locally both CheckGet and CheckPost work. When I call them both on the web server from the web server they both work, but when I call them from the remote server from my local…
user1904444
  • 23
  • 1
  • 5
2
votes
3 answers

WCF WebInvoke JSON deserialization failed - 400 Bad Request

I am using WCF .NET 4.0 hosting inside WebServiceHost. Normaly all works until i use my own defined class array inside class. Server side function [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat =…
Alkeemik
  • 51
  • 1
  • 6
2
votes
1 answer

WCF rest api - [WebGet] working, but endpoint not found for [WebInvoke(...GET...)]

New to configuring anything server side ... thanks in advance for your help! I am trying to get a simple HelloWorld REST api working in VisualStudio2008 / .NET 3.5; eventually I'll be using it to CRUD test data/results back to the server from a…
some bits flipped
  • 2,592
  • 4
  • 27
  • 42
2
votes
1 answer

Passing parameters to WCF restful service with POST method

how can I use Fiddler to pass 2 parameters to a method with a signature like this : [WebInvoke(UriTemplate = "Login", Method = "POST", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.WrappedRequest)] bool…
Hamza_L
  • 644
  • 4
  • 18
2
votes
1 answer

Can the WCF WebInvoke attribute take GET as a method

Is it true that the WebInvoke attribute can take GET as a method? I can't see any notion of this in Microsoft documentation. I have seen it used in some forum examples though. In principle, shouldn't it be so, that when using webInvoke you are able…
netfed
  • 602
  • 8
  • 18
1
vote
1 answer

bad request from WCF web invoke

All my GET endpoints work like a champ, but I'm trying to implement a webinvoke method="POST". I think there is something wrong with my format, but I can't tell what it is, could someone help? [ServiceContract] interface iFlowRate { …
Matt
  • 97
  • 8
1
vote
1 answer

Is it possible to change the UriTemplate at runtime

I have the following WebInvoke Attribute: [OperationContract] [WebInvoke( Method = "POST", UriTemplate = "", BodyStyle = WebMessageBodyStyle.Bare, ResponseFormat =…
user280610
1
vote
1 answer

WebInvoke/DataContractJsonSerializer, '1,6276' cannot be parsed as 'double'

I am using WCF WebInvokeAttribute for declarative JSON requests (DataContractJsonSerializer), with DataContractAttribute/DataMemberAttribute based serialization. I'm using a service that supports returning JSON containing data based on different…
baretta
  • 7,385
  • 1
  • 25
  • 25
1
vote
2 answers

WCF Webinvoke POST giving (400) Bad Request for specific server

Good morning/evening, I am new to WCF and have created a sample application. The problem is I am passing a json string as a request but getting 400:Bad request error. The details of my sample is given below: ISampleService.cs: using System; using…
Soumya1008
  • 31
  • 4
1
vote
1 answer

OData Client for Obj-C and Parsing Out Scalar Return Values

I can't seem to find a way for the Objective-C OData client to return the value of a web service function that just returns something simple, like an integer. For example, [WebInvoke] public Int32 xyx() { return ( 3 ); } The proxy-generated…
1
vote
1 answer

WCF Error With WebInvoke BodyStyle Wrapped

I have a problem when trying to create a method that takes 2 or more parameters. I specified to use Wrapped BodyStyle on the operationcontract but anyways it gives an error like if I wasn't using it. Interface: [WebInvoke(BodyStyle =…
1
vote
1 answer

c# API "Unexpected character encountered while parsing value: S. Path '', line 0, position 0"

I use multiple API coded in c# that works well. I want to use one receiving an anonymous object (I don't want to create a Class). I have a problem when I try to deserialize the object. I have an API following this scheme, it works well when it's…
heythere
  • 13
  • 1
  • 1
  • 4
1
vote
1 answer

WCF RequestFormat for WebGet and WebInvoke

I have WCF services exposed using WebGet and WebInvoke that require the data to be wrapped in xml. I would prefer to be able to return raw data without it being wrapped in xml and also allow clients the ability to invoke my service without needing…
Sean
  • 2,453
  • 6
  • 41
  • 53
1
vote
2 answers

How to load data from HTTPPOST request in server side?

I have a WebInvoke method like this; [OperationContract] [WebInvoke( Method = "POST", UriTemplate = "/go", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat =…
EEE
  • 4,536
  • 3
  • 28
  • 34