Question
Cognizant
NL
Last activity: 22 Jul 2019 7:34 EDT
Connect REST post method HEADER issue
Hi I have a Connect REST with POST method.
the service expects everything in json (header + request message)
Header has only 2 mapping options in pega map from KEY or CLIPBOARD , I used clipboard.
the final request being sent has the header in XML format
but I want the header to go completely in JSON.
header MAP FROM CLIP BOARD
FINAL OUTPUT example -
{Integration-Header=<?xml version="1.0"?> <pagedata> <pxObjClass>********************</pxObjClass> <SystemInfo> <pxObjClass>********</pxObjClass> <ApplicationName>pega</ApplicationName></SystemInfo> </pagedata> , Content-Type=application/json}
REQUEST MESSAGE- MAP FROM json-
FINAL OUTPUT EXAMPLE-
{"attachmentInfo": [{"attachmentReferenceNumber":"***","attachmentContentType":"File","attachmentName":"BILL","attachmentContent":"***"}],"brand":"BASE"}
***Edited by Moderator Marissa to update platform capability tags***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
GB
Hi.
Few questions:
1. What is the Product version?
2. Any reference to standard (RFC?) that explains what is expected to send in particular header?
3. Can you please provide example of working payload?
Cognizant
NL
HI Moiss_gcs,
the version is 7.3.1, CRMC framework.
Expected header schema
HI Moiss_gcs,
the version is 7.3.1, CRMC framework.
Expected header schema
{
"$schema": "http://json-schema.org/schema#",
"$id": "http://xmlns**********/integration/headers/IntegrationHeader/v002",
"title": "IntegrationHeader",
"type": "object",
"description": "The integration header contains supporting information about the message body(used for routing, tracing, logging). The header should not contain business data.",
"definitions": {
"Identity": {
"type": "object",
"properties": {
"IdentityId": {
"type": "string",
"examples": [
"kvermeir"
]
},
"IdentityType": {
"type": "string",
"description": "Identifies the type of identity ID used, e.g. a Personal ID, customer login, user login, Internet product login,...",
"examples": [
"user login", "PID", "product login"
]
}
},
"required": [
"IdentityId",
"IdentityType"
]
}
},
"properties": {
"OrganizationalInfo": {
"type": "object",
"description": "Indicates for which part of the business the message/request is generated.",
"properties": {
"Company": {
"type": "string",
"description": "Indicates the company",
"examples": [
"((",
"**",
"** **"
]
},
"TenantInfo": {
"type": "object",
"properties": {
"TenantId": {
"type": "number",
"description": "Numeric ID for the tenant",
"examples": [
"1"
]
},
"TenantName": {
"type": "string",
"description": "Human readable name/label for the tenant",
"examples": [
"Telenet"
]
}
},
"required": [
"TenantId",
"TenantName"
]
},
"BrandInfo": {
"type": "object",
"properties": {
"Brand": {
"type": "array",
"description": "Represents the brand information for the incoming request. This can represent one major brand when only one value is filled in, or a sub brand of a major brand if multiple brands are filled in.",
"examples": [
"Telenet"
],
"items": {
"type" : "string"
}
}
}
}
}
},
"MessageIdentification": {
"type": "object",
"description": "Identifiers used to relate and identify specific messages or groups of messages across systems and error/log files.",
"properties": {
"CorrelationId": {
"type": "string",
"description": "UUID to relate multiple requests with the same context. This field is immutable within the middleware. Used for tracking various requests related to the same context.",
"examples": [
"56104f24-001e-4f9c-a805-aad0864547ac"
]
},
"RequestId": {
"type": "string",
"description": "UUID generated for each request initiated. Used for tracking various message transformations across systems.",
"examples": [
"*******"
]
},
"MessageId": {
"type": "string",
"description": "UUID assigned to the message. Every time a message is transformed or adapted it should be given a new message ID.",
"examples": [
"*******"
]
},
"ExternalMessageID": {
"type": "string",
"description": "This element is used if we have to keep track of the identifiers of an external party. There is no fixed format since it's dependent on the external system. Only used for COTS packets and systems outside of Telenet.",
"examples": [
"ref12133"
]
}
},
"required": [
"CorrelationId",
"RequestId",
"MessageId"
]
},
"MessageTimestamps": {
"type": "object",
"properties": {
"CreationTimestamp": {
"type": "string",
"description": "Time at which message was created.",
"examples": [
"2017-12-29T09:55:00+00:00"
]
},
"ContentTimestamp": {
"type": "string",
"description": "Time at which content of a message was created by the source. Sometimes messages are prepared in advance and send out in timed batches. This will allow the system to find the correct data in the source system when there is a difference in creating the content for the message and the actual message itself.",
"examples": [
"2017-12-29T09:55:00+00:00"
]
},
"ExpiryTimestamp": {
"type": "string",
"description": "Indicates the time when a message is considered expired. Afterwards the target systems can ignore the request.",
"examples": [
"2018-12-29T09:55:00+00:00"
]
}
},
"required": [
"CreationTimestamp"
]
},
"SystemInfo": {
"type": "object",
"description": "In requests, indicates the source of the request. For responses, indicates the source of the response.",
"properties": {
"Environment": {
"type": "string",
"description": "Identifies the environment of the source system from which the request originates.",
"examples": [
"PRD"
]
},
"Application": {
"type": "object",
"properties": {
"ApplicationName": {
"type": "string",
"description": "",
"examples": [
"Cafe"
]
},
"BatchJobName": {
"type": "string",
"description": "Name of the job that created the message"
},
"BatchJobId": {
"type": "string",
"description": "If there is an identification of the batch job available it should be presented."
}
},
"required": [
"ApplicationName"
]
}
},
"required": [
"Environment",
"Application"
]
},
"UserInfo": {
"type": "object",
"description": "Information of current user and impersonate user.",
"properties": {
"Identity": {
"$ref": "#/definitions/Identity",
"description": "Identifies the advisor or customer from which the request is originating."
},
"Impersonator": {
"$ref": "#/definitions/Identity",
"description": "Identifies the Advisor performing an 'impersonation'. This means the user is performing actions within a customer facing application as-if the customer were logged in."
}
},
"required": [
"Identity"
]
},
"MessageRouting": {
"type": "object",
"properties": {
"Environment": {
"type": "string",
"description": "Populated when a different application the response is to be routed to a different application than the origin.",
"examples": [
"PRD"
]
},
"Application": {
"type": "string",
"description": "Indicates the target system a (response) message is to be routed to.",
"examples": [
"Abba"
]
},
"MessagePriority": {
"type": "number",
"description": "If the message needs to be processed faster then default a priority has to be indicated. (0=lowest, 9=highest, default=5)",
"default": "5",
"examples": [
"5"
]
},
"ReturnPath": {
"type": "string",
"description": "Populated when a different application the response is to be routed to a different application than the origin.",
"examples": [
"na"
]
}
}
},
"SecurityInfo": {
"type": "object",
"properties": {
"ContainsSensitiveInformation": {
"type": "boolean",
"description": "Indication that the message contains data that should not appear in log files. Only the target systems are allowed to process the data. No loggers, auditing or BI flows are to receive this message because it contains sensitive data like RRN information.",
"examples": [
"false"
]
}
}
}
},
"required": [
"OrganizationalInfo",
"MessageIdentification",
"MessageTimestamps",
"SystemInfo"
]
}
the one that is in pega in pyRequestHeader-
{Integration-Header=<?xml version="1.0"?> <pagedata> <pxObjClass>****</pxObjClass> <SystemInfo> <pxObjClass>****</pxObjClass> <Application> <pxObjClass>***</pxObjClass> <ApplicationName>pega</ApplicationName> </Application> </SystemInfo> <MessageIdentification> <pxObjClass>****</pxObjClass> <ExternalMessageID>***</ExternalMessageID> <RequestId>***</RequestId> <CorrelationId>***</CorrelationId> <MessageId>***</MessageId> </MessageIdentification> <OrganizationalInfo> <pxObjClass>***</pxObjClass> <Company>***</Company> <TenantInformation> <pxObjClass>*****</pxObjClass> <TenantId>***</TenantId> <TenantName>***</TenantName> </TenantInformation> <BrandInfo> <Brand>**</Brand> <pxObjClass>***</pxObjClass> </BrandInfo> <TenantInfo> <pxObjClass>***</pxObjClass> <TenantId>***</TenantId> <TenantName>***</TenantName> </TenantInfo> </OrganizationalInfo> <MessageTimestamps> <pxObjClass>***</pxObjClass> <CreationTime>***</CreationTime> </MessageTimestamps> <UserInfo> <pxObjClass>**</pxObjClass> <Identity> <pxObjClass>**</pxObjClass> <IdentityType>***</IdentityType> <IdentityId>internal</IdentityId> </Identity> <Impersonator> <pxObjClass>***</pxObjClass> </Impersonator> </UserInfo> <SecurityInfo> <pxObjClass>***</pxObjClass> <ContainsSensitiveInformation>false</ContainsSensitiveInformation> </SecurityInfo> </pagedata> , Content-Type=application/json}
Updated: 31 Jul 2018 2:06 EDT
Telenet Group
IN
HI, just to add up here .
We tried one more approach -
in header --->map from - clipboard and mapfrom key as a string type property '.JSONHEADER'
in the code we are converting the header clipboard page to JSON and mapping the JSON to this string type property JSONHEADER.
so as a result the value in runtime in pyRequestHeader property is a complex JSON of my header , which I exactly need.
but still the request is failing !!!
I believe pega is still internally doing some conversion before sending out request .
REASON for the thought- when I copy the JSON generated from pyrequestheader and then map it in the REST connect header directly keeping map from as CONSTANT , the request is going through and we are receiving correct response also.
WellsFargo
US
Any update please? I am facing exact same issue..
Updated: 22 Jul 2019 7:34 EDT
Pegasystems Inc.
IN
Hi @sudha.rayaprolu -
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write Post button here. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.