cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1032
Views
0
Helpful
8
Replies

Issues with SL Parameter substitution in the URL when making a REST API call

yasmin
Level 1
Level 1

Using the HTTP/WS Adaptor, the outbound adaptor parameters are not being substituted when I define the parameters and then try and use them in a Post for a REST API call

e.g. https://<ip>/update.php?param1=$name$&param2=$email$  where name and email are outbound adapter parameters mapped to dictionary items.

Using literal parameters give a sucessful result in ServiceLink

8 Replies 8

lim.park01
Level 1
Level 1

Is this version 10, and by chance, did you add these parameter mappings after the fact; i.e. after you created the agent, you went back in and added these parameter mappings?

I've had problem where unless the parameter mappings are configured during the agent creation time, any changes/updates to the parameter mappings do not stick and whatever/however they were configured at agent creation time is continuously used. Maybe using literal value is ok, but any changes to the dictionary mapping may be broken.

(I have a case open for this, which is potentially a defect).

Yes it is CPSC 10. I still cant get it working with parameters even if I define them on agent creation. You dont happen to have a working examples where you need to give Post parameters in the URL using adapter parameters. I am curious to know if I am doing something wrong.

Sorry... I do not have anything configured at the moment with outbound properties using the outbound parameters. I just had this issue with outbound and inbound parameters of newly created agents in general, so figured if you are seeing the same issue it probably affects all usage/references to those parameters including in outbound properties.

I'll see if I can find some time to test something out and see if I have same problem or not.

angfong
Level 1
Level 1

The syntax you have looks correct.

     https:///update.php?param1=$name$&param2=$email$

Please just double check that agent parameter names are also in lowercase since the substitution is case-sensitive.

If this doesn't explain/fix the issue, please check the httpadapter.log too see what the error messages are. A bad REST URL should give you a 404 error and the URL endpoint it was trying to reach. Based on that, we can try to figure out what could have gone wrong.

I have checked all the above but it still does not work. I am attaching some screenshots of the agent definition, agent parameters and adaptor log in a pdf file. Any insight would be much appreciated

A new patch has been released for CPSC 10.0 at the following link:

http://software.cisco.com/download/type.html?mdfid=285031811&flowid=49262&softwareid=284894036

There do appear to be some fixes around the HTTP/WS agent but it's not too clear if this will resolve your issue or not.

Figured it out. A outbound transformation has to be applied on the nsXML to make the substitution of the parameters work in the URL.

http://www.w3.org/1999/XSL/Transform">

Hmm... so even if you are using those parameters only in the outbound properties you still need to include it in the transformation for the outbound message? What if those parameters have no place/purpose in the outbound message?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: