Questions tagged [uritemplate]

80 questions
1
vote
1 answer

Special character in WCF url $ no longer on WIndows 2012 with .NET 4.5

I have a WCF REST API which uses uri templates. One of these Uri templates looks like this: [WebGet(UriTemplate="List/Data.svc/$count")]. In windows 2008r2 this url works fine, but fails on some 2012 servers. When I look at the logs (logs I…
1
vote
0 answers

Some characters in WCF REST parameter from UriTemplate are HTML encoded

I have the following Web Service interface (a WCF service) method defined: [WebInvoke(Method = "POST", UriTemplate = "sites/{siteId}/storage/{*filePath}", BodyStyle = WebMessageBodyStyle.Bare)] [OperationContract] FileUploadResultDto…
1
vote
1 answer

Change in UriTemplate on WCF interface causes whole service to fail.

This is my first attempt at a service via WCF which is hosted in a Windows Service. I have noticed that if I do something incorrectly in the UriTemplate it completely breaks everything and I don't know why. Example: In the first code example…
CathalMF
  • 8,557
  • 4
  • 55
  • 84
1
vote
1 answer

Root UriTemplate is getting hijacked by WCF help page

TL;DR - I have [WebGet(UriTemplate = "/")] and it doesn't work I have WCF service that looks like this: public interface IUserService { // This doesn't work [OperationContract] [WebGet(UriTemplate = "/")] IList
kelloti
  • 7,985
  • 4
  • 40
  • 76
1
vote
1 answer

Invoke a Operation Contract through web browser

Since i am new to WCF and Having configured a WCF service endpoint in IIS at Virtual Directory Api ( url goes like http://localhost/api/taskapi.svc) i was looking for ways to make request through web browser something like…
Deeptechtons
  • 10,345
  • 23
  • 89
  • 172
0
votes
1 answer

WCF: Multiple optional parameters in UriTemplate

The UriTemplate of my Service looks like this: [WebGet(UriTemplate = "LoginUser/authorizationCode/{authorizationCode}/userId/{userId}/intend/{intend}/email/{email}")] The function looks like this: public User LoginUser(string authorizationCode,…
k.troy2012
  • 143
  • 2
  • 15
0
votes
2 answers

WCF UriTemplate to match base address

How I can call an endpoint with the URL address exactly the same as the base address? string localhost = "http://localhost:1387"; ServiceHost restHost = new ServiceHost(typeof(WebService), new Uri(localhost)); …
0
votes
2 answers

How to bind parameters in Micronaut controller in Kotlin?

See code in gist: https://gist.github.com/C06A/e80b783a1d34cc9d80e339da0d7b5b53 This is a small sample project I try to make with Micronaut in Kotlin. Unfortunately the only parameters binding I was able to do as in the code. They require the…
C.A.B.
  • 413
  • 4
  • 10
0
votes
0 answers

ORA-06564: object does not exist Errors - ORDS

I am looking for a little bit of help here. We had a web-service defined and I created some new URI templates and these are working as expected as when I call them from the apex application they are returning the JSON object as expected. The problem…
Diego
  • 1
  • 1
0
votes
0 answers

How to define uri adress for GET method in REST

I had this code, and everything worked well [OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, …
0
votes
1 answer

accessing WebInvoke UriTemplate in WCF, I need the template string

I have in WCF [WebInvoke(UriTemplate = "etcetc" I need to access the string "etcetc" for use in some of my business logic, not sure if this is possible or not? Where is it stored in memory?
Devin Andres Salemi
  • 2,158
  • 3
  • 9
  • 20
0
votes
1 answer

web api call with checking part of the URL using UriTemplate not working correctly

Perhaps I do not understand how to properly use the UriTemplate I always want to search the incoming url for api/whatever // that is it If URL is like below, I want to ONLY get api/CheckMainVerified So I suppose without using UriTemplate, …
user6321478
0
votes
1 answer

URL parameter wso2esb

I have created an API in esb like this snippet:
Amine Hatim
  • 207
  • 2
  • 5
  • 16
0
votes
3 answers

Getting Gibberish instead of Hello World from a service with webHttpBinding

Here is a trivial example that is supposed to return "Hello World" string. However, a browser displays something like SGVsbG8gV29ybGQ=. Which is the right way to return plain text from an oldskul-style service? please know that: I can't return a…
BreakPhreak
  • 9,150
  • 23
  • 65
  • 106
0
votes
0 answers

Is there way to convert just some service methods in a WCF to webMethods? Or add webmethods to an existing WCF?

I have an existing WCF, which already has service methods available on it. I would like add some webMethods to this very same WCF to be accessed via a web browser. Is this possible? I see plenty of examples online on how to setup webMethods, the…
dawsoad
  • 13
  • 4