How to get property fileds in Jersey? - jersey-client

Currently I'm developing the application which gets the property fields in front end and
server handles this request using jersey.
In jersey I need to use more number of path parameters. So I'm looking for the solution
which gets the property fileds in a single element itself.
Any help would be greatly appreciated.
Thanks

you can try sending JSON or you can send your data by separating them with a delimiter like Comma(,) or Pipe(|)

Related

Adding dynamic path parameters into Orbeon Form HTTP Service

I'm trying to add a dynamic path parameter into an HTTP service in Orbeon forms, ie call a specific URL based on the content of a form field. I know we can change the query string parameters but I need to change the URL itself - the one in this field:
I've read that this is possible in newer version of Orbeon forms by using
{fr:control-string-value('testField')}
but we are stuck on an older version.
I saw another question on Stack Overflow from a few years ago: Orbeon Form HTTP Service where #ebruchez explained xpath is executed in the Resource URL field and gave the example:
http://localhost/RESTFUL/GETADDRESS/{/*/bar/foo}
However, I can't get this to work.
I have been able to successfully execute XPath, eg:
{string-join("test", "value")}
But I don't seem to be able to work out the correct Xpath syntax to dynamically select the value of a sample field and insert it into this box. I think I'm missing something in how I construct the XPath to retrieve the value.
This is what I've tried so far:
{xxf:value('testField')}
{xxf:value($testField)}
{fr:control-value($testField)}
{fr:control-value('testField')}
{xxf:property('testField')}
{xxf:property($testField)}
{$testField}
{'testField'}
{xxf:get-request-parameter('testField')}
{xxf:bind('testField')}
{/*/testField/}
{/*/content/testField/}
{//testField/}
{//*:testField/}
{//:testField/}
{(//testField)[1].text()}
{//form/content/testField/text()}
{(//testField)[1]/text()}
If anyone has any hints of advice on what I'm doing wrong or could give me an example of the syntax I put in here to retrieve a value, I'd be eternally grateful.
You can use AVT (Attribute Value Templates) https://doc.orbeon.com/xforms/core/attribute-value-templates?q=avt. In resource in <xf:submission> or HTTP service wizard use e.g. {instance('fr-form-instance')//url} or if you want edit only some part of URL you can use http://httpbin.org/{instance('fr-form-instance')//url}. I make simple form for you https://demo.orbeon.com/demo/fr/orbeon/builder/edit/18c4bee259fd9f398238b3c72041ee43ea691aa7 witch save respose to dataset and have second example in resource.
Hope this help you

Passing multiple values to a parameter for a Fiddler POST request

I am trying to pass multiple values for a parameter in a POST request body as follows
var1=1&var2=2&var34=3,4&var5=5
I've tried several ways to pass var34 as a string of values 3 and 4 but still not working. Need some help.
Thanks!!!
This isn't really a question about Fiddler, so it's not clear what you're asking specifically.
The server interprets POST data according to its own rules, and there's no standard for handling duplicate name/values in urlencoded data.
Some servers would accept var1=1&var2=2&var34=3,4&var5=5 as you've used, while some would prefer var1=1&var2=2&var34=3&var34=4&var5=5.
What error or problem are you encountering?
It turns out that it's the server (I use R) side that I need to adjust the codes to accommodate the POST request. It has nothing to do with the request. Thank you so much for the suggestion!

Grails Override reserved work in a controller?

I am currently working on a Grails solution and I am looking to pass a URL using WSLite, I basically want to pass a bunch of query params and have them fired off. One of the params I need to have is session.name, I need this exactly like this as a 3rd party system can only read data as "session.WHATEVER". However when i enter the data below it has a problem with the "session." as it appears that session is a reserved word in grails. Is there anyway I can get grails not to pick-up the reserved word and just use session.name? Maybe by some sort of override?
def response = client.get(path:'/TestingService', query:[code:testCode, session.name: name])
Thanks
Use quotes:
query:[code:testCode, 'session.name': name]

Encrypt Get-Parameter(URL) Tomcat/Servlet

is there a possibility to encrypt or just don't display the Get Parameters in the Internetbrowser when im using JavaServlets on Tomcat?
that means for example: localhost/main?id=3
should be displayed like this: localhost/main or localhost/main?6puu4YjzScxHsv9t....
Is there a simple and fast solution? Does this make sense?
Thx for your tips..
You could use POST instead of GET on your HTML form. This will turn localhost/main?id=3 into localhost/main. The parameter id will still be passed and you should be able to retrieve its value in the same way, on the server-side.

Redirecting URL in JBOSS AS 7

Hi everyone currently i am passing query string in my url like
ip:port/contextroot/page.jsf?id=22&tsid=1234
the query string is a user id and tsid. the doesnt specifically need to type in the query string values. my requirement is to hide the query string in the url and still be able to use the query string values in my app. i was thinking if there is a way to strip off the query string using jboss redirection.
To Summarize:
i wanna access my page.jsf like
ip:port/contextroot/page.jsf
and still get id and tsid from the query string.
any help is geartly appreciated.
thanks in advance :)
On your .NET application, encrypt all sensible data using a symmetric cipher (e.g. AES), then POST it to a JBOSS servlet. In that servlet, decrypt the transmitted data and store it in a session scoped bean. This way, you can subsequently access the data from your beans without needing to carry it aound in GET params.
I think you're looking for Pretty Faces ( http://ocpsoft.org/prettyfaces/ )

Resources