on 12-24-2015 11:02 AM
Hi Experts,
I have created the REST Mashup when i executing it is throwing SERVICE_ID invalid. Below are the steps which i have followed for achieving the requirement.
Step 1: Creating of REST Mashup
Step 2:Entering the details of REST Mashup
In the above step if it has input parameters do i need to provide API key in all parameters or to the field which ask for API key.
From here i am stuck with this.
1. How do i make it to communicate it with target system. Is it required to create the communication system and communication arrangement. if yes where should i provide the details like service id ect of REST Mashup.
2. How to embedded it on the screen.
3. For R&D purpose i have executed it with the ABSL script. It throws the error in invalid service_id.
The above is first method which i followed but i din't achieve successes.So i tried alternate way.
Step 1: I have created External service integration with REST URL.
Step 2: Create Communication Arrangement and Communication System.
Step 3: Executed it with ABSL Code.
With this i am able to get the data successfully. But stuck up how to embedded REST API which has screen/display container.
Please help me how to create REST Mashup and can share your experience with REST API Mashup.
Thanks,
Quddus.
Hello Quddus,
I have created a REST based Mashup via the SDK:
By this the REST Mashup becomes part of the solution and can be called with the topmost ABSL snippet.
You created a REST Mashup outside the solution and therefore you got the error regarding the ServiceID
As from the docu:
You can create a Web service based on the REST architectural style. For REST Web services, you need to know the request URL and any relevant query parameters. You define the REST Web service using the administrator tools for mashup and Web service authoring. To integrate the Web service in a screen, you must add the Web service to a data mashup.
HTH,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Horst,
Thanks you. Actually we are trying to connect to 3rd party system using REST service. REST service which we are consuming has authentication at header level. When i am trying to create communication scenario and arrangement it showing ping failed. I find no way to insert header level authentication. But could you please confirm from your side. Below is the sample REST url.
Authentication is in below format for the above url
X-ABCD-Authentication:<Credentials>
<Username>emailid</Username>
<Password>xxxxxx</Password>
<IntegratorKey>55fa7e81-1e9a-40c9-a81f-9426c9696203</IntegratorKey> </Credentials>
Accept : application/json
Can you please through some light for this issue.
Many Thanks,
Quddus.
Could you try:
var headerParamEntry: NameAndValue;
headerParamEntry.Name = "value";
headerParamEntry.Value = "value";
headerParam.Add(headerParamEntry);
var result = WebServiceUtilities.ExecuteRESTService("value","value",httpMethod,httpResource,URLParameter,headerParam,httpformat,body);
for header level authentication.
Where, "value" needs to be replaced with actual value.
Thanks, Pradeep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
I have a similar kind of requirement to integrate a REST API with C4C.I have already opened a discussion on this topic.
Please find my post here Creating a Mashup using third party REST service
Kindly help me out with the requirement.
Regards,
Navin
Would this help: http://scn.sap.com/community/business-bydesign/studio/blog/2012/12/18/integration-of-sap-ondemand-pr...
http://scn.sap.com/thread/3828900
For you question on thread: http://scn.sap.com/message/16689138#16689138
refer to http://scn.sap.com/thread/3876221 to know how to parse the response in ABSL.
You could assign this to the BO field and display in the UI.
But, currently there is limitation on BO field length, in such case may be you could use textcollection to store the response.
Thanks, Pradeep.
Hi Pradeep,
Please find this post I have added few more points in that post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Navin,
I have achieved it using SDK with out using front-end UI. But you can achieve with front-end UI as well.
Steps which i have followed in sdk.
1. I have created external webservice integration and created communication arrangement and scenario.
2. If your authentication is at header level. No worries you just select authentication non in communication arrangement. we can achieve in ABSL scripting by passing the authentication in header parameters as suggested by @Pradeep Kumar N.
3. Execute the REST service.
4. As there are no parsing libraries in sap c4c and If you are reponce is in JSON format, you can use this blog for parsing
Thanks,
Quddus
Hi Quddus,
Thanks for your reply.Now there is a slight modification with the requirement.I will explain the scenario.
I need to consume the REST API provided by the Third party service provider into the toolbar area or in a work center.
I have created a REST Mashup Webservice in C4C by entering the API Key and User Key which is required for the API calls.
I have no idea how to bring the chat pop up inside C4C.Kindly let me know how to achieve this requirement in the front end itself because am not familiar with REST API calls in SDK..Whether i need to go for a custom mashup ? in these cases? to get the pop up or a kind of text box to chat with the Pandora Chat Bot.
Thanks in advance.
Regards,
Navin
Hi Quddus,
I have used External webservice integration only for SOAP webservices.I never consumed a REST Service.
Could you please give me the steps in detail for creating a External web service for REST API,Communication Arrangement and Communication scenario.
Below is the REST service URL which i should use.
https://aiaas.pandorabots.com/talk/APP_ID/BOTNAME?user_key=USER_KEY&input=INPUT
I have the details like APP_ID,BOTNAME,USER_KEY and Input.
Could you please provide a sample code to call this API from ABSL.
That would be helpful.
-Please share your points also on this.
Regards,
Navin
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.