Question


HCL Technologies BV
NL
Last activity: 28 Dec 2016 6:40 EST
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)
Peichen Chung -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


PEG
IN
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 .


PEG
IN
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.


HCL Technologies BV
NL
I have MyServicePage mentioned in the page. But values are coming in the parameter page. There only the first value is missing.


PEG
IN
Please provide Service-REST configuration screenshots in detail along with Tracer xml.


HCL Technologies BV
NL


HCL Technologies BV
NL
I am not getting userlang=FR from the HTTP request in the parameter page


PEG
IN
May I know what is the value fo Map To Key for request? I could see it's missing in the provided screenshot.


HCL Technologies BV
NL
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.


PEG
IN
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


PEG
IN
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 .


HCL Technologies BV
NL
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


PEG
IN
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.


PEG
IN
And also post the property-set method step of activity to set the say and to.
.prop1 -> param.say
.prop2 -> param.to
Hope this helps!


PEG
IN
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


HCL Technologies BV
NL
Yes I have checked it from SOAP UI and it's working. All name value pairs are mapping. Thanks for the help.


PEG
IN
You are welcome.


HCL Technologies BV
NL
In the SOAP UI are you giving the url which was generated in the service package and these parameters?


PEG
IN
http://hostname:port/prweb/PRRestService/ServicePackage/ClassName/MethodName
You could pass post data in resource parameters
Content-Type should be multipart/form-data


HCL Technologies BV
NL
Could you post one screenshot how you are testing it through SOAP UI


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


HCL Technologies BV
NL
The PRPC version is 7.1.9. Did you get any solution for that?


Virtusa IT Consulting
AE
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.