First steps to implement Inbound REST webservice in Siebel IP2018
19. 10. 2018
Implementing Inbound REST Webservice in Oracle Siebel IP2018
With the Oracle Siebel CRM IP2016 version introduced Oracle Siebel REST API. More official information you can gather here :
https://docs.oracle.com/cd/E95904_01/books/RestAPI/RestAPI_Overview.html.
We want you in the blog give very simple first step to start with RESTFull API in Siebel as we think this can encourage you to
make the first steps. We will build Inbound REST Webservice calling Business Service which for this purpose will get Profile Attribute
- Prepare your Business Service, prepare Methods, input and output parameters.
We will use vanilla Business Service "SIS OM PMT Service" and its method "Get Profile Attribute" to read profile attribute. The Input parameter is "Profile Attribute Name" and the Output is "Profile Attribute Value".
2. Next modify in the Administration - Appllication -> Business Service Access List rights for that BS. Add the Business Service and add appropriate responsibility, which is allowed to perform this call.
3. After modifying busness service access list restart or reconfigure the component EAI Object Manager (ENU).
4. Review your REST profile in your AI :
Login to you Siebel Management Console with https://your_ai_server:9001/siebel/smc/
Go to Profiles -> Application Interface and review REST Inbound Defaults :
Now we need to test our REST Inbound call using BS IS OM PMT with method Get Profile Attribute. We will use SOAP UI by Smart Bear to test it .
5. In the SOAP UI go to File -> New REST Project
It will query for URI , so type :
https://your_ai_server:9001/siebel/v1.0/service/SIS%20OM%20PMT/Get%20Profile%20Attribute
In the Request modify the Method to "POST"
Modify the Media Type to application/json and place following body :
{
"body": {
"Profile Attribute Name": "LoginName"
}
}
You will get response :
{"Profile Attribute Value": "GUESTCST"}
The raw request is :
POST https://your_ai_server:9001/siebel/v1.0/service/SIS%20OM%20PMT%20Service/Get%20Profile%20Attribute HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 70
Host: xxxx:9001
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
"body": {
"Profile Attribute Name": "LoginName"
}
}
and the raw response is :
HTTP/1.1 200
Access-Control-Allow-Origin: *
Cache-Control: max-age=604800
Expires: Fri, 26 Oct 2018 16:52:40 GMT
Content-Type: application/json
Content-Length: 38
Date: Fri, 19 Oct 2018 16:52:40 GMT
{"Profile Attribute Value":"GUESTCST"}
6. Once you want to sent swagger file to your consumer call :
Change the url to :
https://your_ai_server:9001/siebel/v1.0/service/SIS%20OM%20PMT/Get%20Profile%20Attribute/describe
so put /describe after the method
and you get swagger :
{
"swagger": "2.0",
"info": {
"description": "Siebel REST API",
"version": "1.0",
"title": "Siebel REST API",
"contact": {"email": "sample@sample.com"}
},
"schemes": [
"http",
"https"
],
"securityDefinitions": {
"Basic Auth": {"type": "basic"},
"OAuth 2.0": {
"type": "oauth2",
"authorizationUrl": "http://openAPI.io/",
"flow": "implicit",
"scopes": {
"write:": "modify",
"read:": "read only"
}
}
},
"externalDocs": {
"description": "OpenAPI",
"url": "https://openapis.org"
},
"host": "ld1c0567.umobi.mobicorp.test:9001",
"basePath": "/siebel/v1.0",
"tags": [ {
"name": "service/SIS OM PMT Service/Get Profile Attribute",
"description": "Operations available on service/SIS OM PMT Service/Get Profile Attribute",
"externalDocs": {
"description": "Find Out More",
"url": ""
}
}],
"paths": {"/service/SIS OM PMT Service/Get Profile Attribute": {"post": {
"tags": ["service_SIS OM PMT Service_Get Profile Attribute"],
"summary": "",
"description": "",
"operationId": "service_SIS OM PMT Service_Get Profile Attribute/post",
"produces": [
"application/xml",
"application/json"
],
"consumes": [
"application/xml",
"application/json"
],
"responses": {
"200": {"description": "Successful Operation"},
"204": {"description": "No Resource Found"},
"304": {"description": "Not Modified"},
"404": {"description": "There is no data for the requested resource"},
"500": {"description": "Internal Server Error"}
},
"security": [ {
"Basic Auth": [],
"OAuth 2.0": []
}],
"parameters": [
{
"in": "body",
"name": "Profile Attribute Name",
"type": "string",
"x-siebel-datatype": "String",
"required": true
},
{
"in": "body",
"name": "Profile Attribute Value",
"type": "string",
"x-siebel-datatype": "String",
"required": true
}
]
}}}
}
Now you are ready to start with RESTfull API in Siebel IP2018. Enjoy. CCW Team.
Späť na Blog