Questions tagged [uritemplate]

80 questions
4
votes
1 answer

URI template needs to match with variable value that is a set of folders

I am using org.springframework.web.util.UriTemplate and I am trying to match this uri template: http://{varName1}/path1/path2/{varName2}/{varName3}/{varName4} with the following…
3
votes
1 answer

Can't pass in "%26" to a WebGet UriTemplate variable in a WCF service?

I have a WCF service with this declared operation: [WebGet(UriTemplate = "Test/{*testString}")] public String Test(String testString) { return testString; } However when attempting to invoke the URL Test/You%26Me, IIS returns an error: A…
JoeGaggler
  • 1,107
  • 1
  • 14
  • 25
3
votes
1 answer

WSO2 ESB calling parameterized endpoint Looping on Parameters

In my usecase i have to chain two service calls. In particular: 1) The first call returns an xml listing several IDs 2) i have to iterate through the returned ID list and to make an ID parameterized service call for each id-item. 3) Finally i have…
Alex
  • 1,335
  • 1
  • 17
  • 39
3
votes
0 answers

Optional parameter of at UriTemplate causes twice invoces of AfterReceiveRequest - WCF - IDispatchMessageInspector

I just dived a little deeper into it and discovered new details. Not the 'UriTemplate' in general causes the 2nd invocation of 'AfterReceiveRequest' but the optional parameter within! If I call the method by http:/…
Heiko
  • 57
  • 6
3
votes
1 answer

WCF UriTemplate won't match a single string parameter with slashes (/'s)

Here is the scenario, I have a WCF service call that takes one string parameter and that string has slashes in it (e.g. "123/456.xml"). I want to setup a UriTemplate like this "/{file}" so that I can access the method at…
vfilby
  • 9,642
  • 9
  • 47
  • 62
3
votes
2 answers

Does Spring MVC URI Template processing implement RFC 6570?

I am trying to find a definitive answer as to how URI Templates in Spring MVC are parsed. The Documentation links to the Draft RFC, but Spring is not listed in the RFC's implementations page On the other hand, this page seems to suggest that they…
Alexandre Roger
  • 832
  • 7
  • 8
2
votes
1 answer

WCF Web Api optional parameters in UriTemplate

How to declare optional parameters in UriTemplate in WCF Web Api ? For example : [WebGet(UriTemplate = "?culture={culture}")] HttpResponseMessage> GetAll(); I need culture to be optional parameter. If culture is not passed I…
Radenko Zec
  • 7,503
  • 6
  • 32
  • 38
2
votes
1 answer

How to have URI template with optional variable with path

I am using site prism to create an page object that has a possible 2 urls. Site_prism uses Addressable::Template, and this uses the URI template RFC 6570. The required page contains a list of elements, but can have none as well, and from this logic…
Ben_Slaughter
  • 256
  • 3
  • 10
2
votes
2 answers

Spring-Hateoas: exception in creating a new link

Overview: I am going to add a new link based on Spring-Hateoas-Doc to the JSON response by using the following command: linkTo(methodOn(ProductRepository.class).findOne(10L)).withRel("product"); Problem: However I got the following exception:…
saeedj
  • 1,359
  • 6
  • 20
  • 31
2
votes
1 answer

Is the colon-based template syntax for $resource's url parameter following a standard, or is it AngularJS-specific?

A REST service I'm working on is sending HATEOAS links back to its AngularJS client. For a few of them, we can't provide the full URL (for lack of information), just a URI Template. We want to follow RFC 6570 (section 3.2.7, "Path-Style Parameter…
Christian
  • 5,291
  • 9
  • 40
  • 85
2
votes
2 answers

RegEx for URI Templates (RFC 6570) wanted

I need to validate a string to ensure that it is a valid URI Template according to RFC 6570. This should be quite easy with a regular expression. However, I did not find one – is there really no RegEx for URI Templates (yet)? Context: I would like…
deyhle
  • 433
  • 3
  • 9
2
votes
1 answer

UriTemplateTable not distinguishing verbs

I have trying to design a REST service in .NET 3.5 with WCF REST Contrib. My service is nearly working fine, but I am facing a bizarre error. Basically, I have two methods: [WebInvoke(UriTemplate = "/books?id={identity}", Method = "PUT")] public…
Joannes Vermorel
  • 8,551
  • 10
  • 60
  • 95
2
votes
4 answers

Optional parameter in UriTemplate in WCF

I've used the hint in this thread and provided a default value, so that when a user doesnät specify the virutal sub-directory, I'm making the assumption that he meant all the stuff to be listed. It works. [OperationContract] [WebInvoke(UriTemplate =…
Konrad Viltersten
  • 28,018
  • 52
  • 196
  • 347
2
votes
1 answer

Multiple methods with different parameters WCF REST

I've been given the task to implement the following using WCF REST: Resource POST GET PUT DELETE /device Create new device List devices Bulk update devices Delete all devices This isn't a…
Wotuu
  • 776
  • 1
  • 6
  • 18
2
votes
1 answer

WCF UriTemplate UrlEncode

Imagine I want to call a external (meaning I have no control over the contract) REST service using WCF. I have the following contract [ServiceContract] public interface ISomeRestApi { [OperationContract] [WebInvoke(Method = "PUT",…
Stif
  • 863
  • 9
  • 19