Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question Rest webservice : Encoding parameters

More
11 Feb 2019 15:46 #1 by nada
nada created the topic: Rest webservice : Encoding parameters
Bonjour ,

J'ai un webservice Rest , avec un paramètre CONTNO :



Les valeurs du CONTNO peuvent être sous la forme de "Toto/Titi", ce qui générera des erreurs .



La valeur du Contno est récupérée à partir d'une opération SQL (1) et est utilisée lors de l'invocation du WS (2)

Y a t il une posisbilité d'encoder la valeur du CONTNO ?

Merci .
Attachments:
More
12 Feb 2019 04:44 - 12 Feb 2019 05:43 #2 by nahid3152
nahid3152 replied the topic: Rest webservice : Encoding parameters
Hi,
Can you share a little bit more about why "Contno " is required and use of it? And also the error message.
Last Edit: 12 Feb 2019 05:43 by nahid3152.
More
12 Feb 2019 10:52 #3 by nada
nada replied the topic: Rest webservice : Encoding parameters
Hello ,

So basically I'm trying to update a contract , the contract is identified by the CONTNO , so I must set it in the endpoint to be able to access it .

Here is the error message , in yellow is the CONTNO = 'LF/1001290' it has an ' / ' that isn't encoded .

Attachments:
More
12 Feb 2019 12:58 #4 by nahid3152
nahid3152 replied the topic: Rest webservice : Encoding parameters
HI,

Can you please check this link
www.stambia.org/doc/65-technology-articl...-an-http-get-service
Take a look at this part
"DECLARATION OF THE INPUT PARAMETERS"

Attachments:
More
12 Feb 2019 15:40 - 12 Feb 2019 15:41 #5 by Thomas BLETON
Thomas BLETON replied the topic: Rest webservice : Encoding parameters
I agree with Nahid's suggestion.
Don't place a ${parameter}$ in the Address: its value will not be encoded.
Instead, declare this as a Part with BindingType "http:urlReplacement", and set the value to '${parameter}$' in the mapping => the value will be encoded.

If you really don't want to pass this value in the mapping, then keep the ${parameter}$ but make sure its value is encoded (scripting action to replace "/" with "%2F", etc.).
Last Edit: 12 Feb 2019 15:41 by Thomas BLETON.
More
13 Feb 2019 10:53 #6 by nada
nada replied the topic: Rest webservice : Encoding parameters
Thank you , my problem is solved .