uCosminexus Service Platform, Overview
In HTTP adapter, you can maintain sessions between service invocations (Cookie information inheritance) when multiple services are invoked from a business process.
The following figure shows an overview of Cookie information inheritance using HTTP adapter:
Figure 2-90 Inheriting Cookie information using HTTP adapter
The example in the above figure describes Cookie information inheritance in HTTP adapter. Name space prefix is omitted in the message example described here.
To inherit Cookie information between 2 services, you can select whether to inherit Cookie information collectively or whether to inherit individually for each Cookie name. The message format for the used header variable differs according to the method selected.
In either case, to inherit Cookie information from service component A to service component B, map Cookie information (Cookie element) included in the response message of service component A in the request message of service component B and then invoke HTTP adapter.
Inheritance method in each case is described here.
All Cookie information is represented by any type in the message format in the following manner. The element name showing Cookie element is "Cookie_types".
<xsd:complexType name="http-header-Cookies-type"> <xsd:sequence> <xsd:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> |
You can collectively inherit Cookie information by mapping any type element parts from the response message of service component A to the request message of service component B.
Each attribute of Cookie information in the message format is partitioned in XML element attribute in the following manner. The element name showing Cookie element is "Cookie_types".
<xsd:complexType name="cookie-type"> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="name" type="xsd:string" use="required"></xsd:attribute> <xsd:attribute name="host" type="xsd:string" use="required"></xsd:attribute> <xsd:attribute name="path" type="xsd:string" use="optional"></xsd:attribute> </xsd:extension> </xsd:simpleContent> </xsd:complexType> |
While mapping from the response message of service component A to the request message of service component B, you can see Cookie name and inherit individually.
This section describes transformation from HTTP response header to response message and the process of transformation from the request message to HTTP request header.
Set-Cookie: AAA=1234; expires=Sat, 27-Oct -2012 10:00:00 GMT; path=/ Set-Cookie: BBB=5678; expires=Sat, 27-Oct -2012 10:00:00 GMT; |
<Cookies> <Cookie name="AAA" path="/" host="hostname:80#">AAA=1234; expires=Sat, 27-Aug-2011 10:00:00 GMT; path=/</Cookie> <Cookie name="BBB" host="hostname:80#">BBB=5678; expires=Sat, 27-Aug-2011 10:00:00 GMT</Cookie> </Cookies> |
<Cookies> <Cookie name="AAA" path="/" host="hostname:80">AAA=1234; expires=Sat, 27-Oct-2012 10:00:00 GMT; path=/</Cookie> <Cookie name="BBB" host="hostname:80">BBB=5678; expires=Sat, 27-Oct-2012 10:00:00 GMT</Cookie> </Cookies> |
Cookie: AAA=1234; BBB=5678 |
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.