Issue with mapping with HTTP over Service-REST
Hello,
I have created one Service-REST and the request is HTTP with name-value pair. I am posting the HTTP request body to do unit testing from the service.I am using HTML Postdata as map to. But in the parameter page of the service activity the first name-value pair is missing which is after '?' in the request body, it is mapping name-value pair from first '&'.
Do I need to do anything else.
Thanks
Saikat
***Updated by moderator: Lochan to update Categories***
-
Like (0)
-
Accepted Solution
Hi,
I did try to replicate the issue in local instance. Please find my configuration details as below.
Service-REST rule:
Service-Activity:
Running the Service-REST rule standalone:
Values of Prop1 and Prop2 in tracer
Hi,
I did try to replicate the issue in local instance. Please find my configuration details as below.
Service-REST rule:
Service-Activity:
Running the Service-REST rule standalone:
Values of Prop1 and Prop2 in tracer
Please create a use case similar to above, let me know if face any issues. Correct me if I miss anything in configuration .
Looks like page context is missing in Service activity to have request values. For example MyServicePage will be holding the values incase if you use page as MyServicePage in Service-REST rule.
Please enable the tracer to see where exactly values have been missed.
I didn't provide any map to key field there, when I am giving that value then also no change is happening. Also values are getting mapped in the parameter page not the service page.
Hi,
If we use HTML PostData values will be stored in parameter page instead of Service Page. I was in a impression that it was json data.
- If the Map To value is
HTML PostData
, leave this field blank. The name/value pairs in the string will be mapped to the parameter page of the service activity rather than the primary page.
Accepted Solution
Hi,
I did try to replicate the issue in local instance. Please find my configuration details as below.
Service-REST rule:
Service-Activity:
Running the Service-REST rule standalone:
Values of Prop1 and Prop2 in tracer
Hi,
I did try to replicate the issue in local instance. Please find my configuration details as below.
Service-REST rule:
Service-Activity:
Running the Service-REST rule standalone:
Values of Prop1 and Prop2 in tracer
Please create a use case similar to above, let me know if face any issues. Correct me if I miss anything in configuration .
Hi
If I am using the http url full then the first name-value pair is missing. I have done in the below way.
Here "say" is not getting mapped in the parameter page.
Thanks
Saikat
In message buffer just give say=hi&to=mom remove http url one. I tried with SOAP UI as well as RESTClient, I was able to get the response successfully and parameters are being mapped.
You could also add Log-Message step at beginning of the activity and try to print values being passed as a request.
If you pass the request like say=hi&to=mom
Add below message to Log-Message step and set logging level to InfoForced and observe the behavior.
"Service Activity execution:"+param.say+param.to
http://hostname:port/prweb/PRRestService/ServicePackage/ClassName/MethodName
You could pass post data in resource parameters
Content-Type should be multipart/form-data

What's your PRPC version? I remember there was a similar issue on 7.1.8 with '+' handling in 'pyInvokeHTTPConnector' activity.

The PRPC version is 7.1.9. Did you get any solution for that?

Yes there was a solution as hotfix given on 7.1.8, I am not sure if the code changes are reflected in 7.1.9 or not as a result of the provided HFix.
However the issue which you have reported here seems to be related to '&' so we can do view java of 7.1.9 on pyInvokeHTTPConnector activity and see if the special characters are getting replaced or not.