cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
752
Views
0
Helpful
8
Replies
Highlighted
Beginner

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

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
Highlighted
Beginner

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).

Highlighted

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.

Highlighted

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.

Highlighted
Beginner

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.

Highlighted

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

Highlighted

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.

Highlighted

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">

Highlighted

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?

Content for Community-Ad
This widget could not be displayed.