SlideShare a Scribd company logo
1 of 15
Download to read offline
i | P a g e
PROCESSOR REFACTOR
A Course Correction
D. Harrison
December 2023
ยฉ 2023, David Harrison, All Rights Reserved
Table of
CONTENTS
Introduction.............................................................................1
First Look ................................................................................3
Testingโ€ฆTestingโ€ฆ.....................................................................6
OTA_PingRQ ............................................................................7
Coming Next.......................................................................... 12
1 | P a g e
INTRODUCTION
Since early Q2 2023, I have been refactoring the processor, an integral part of
the Schema Studio application.
In previous work, I focused on the lower-level XSD entities directly, a bottom-
up development process.
In the event, when approaching the entities at the higher levels, for example,
messages, the architecture of the processor was simply incompatible with the
deeply recursive forms involved. This nested structure is demonstrated in the
message definition of OTA_AirBookRQ, shown below:
2
This basic incompatibility between the former code structure and what was
needed to fluently handle deep recursive structures led to a complete re-think
of how the processing needed to be performed. In this new approach, the
extensibility parts handle all the processing steps once the Structure Element
Repository is built in a first pass.
In developing this new top-down approach, the initial example used is that of
the message OTA_PingRQ (shown below), arguably the simplest message in the
Open Travel set.
3
First Look
As a first look at the generated code from the processor which embodies this
new approach, below is shown a fragment of the code generated for the
AttributeGroup OTA_PayloadStdAttributes (the definition of which is shown in
the figure above) which is a key part of the definition of OTA_PingRQ:
4
For the most part, the Attribute entities involved are reasonably
straightforward, e.g. EchoToken. However, those named Target and
TransactionStatusCode involve a SimpleType restriction expressed as an
enumeration. In such cases, the processor generates a generic Attribute
creation statement, where the type parameter is the internal, generated,
enumeration, e.g. Target_Enum.
5
These generated, internal, enumerations, Target_Enum and
TransactionStatusCode_Enum, are shown below:
6
Testingโ€ฆTestingโ€ฆ
The types generated need to be validated via unit testing and the test for
OTA_PayloadStdAttributes is shown below:
7
OTA_PINGRQ
The generation of the OTA_PingRQ involves two phases. The first phase deals
with the basic class structure and characteristics, and the second will cover the
Serialization/Deserialization aspects.
A fragment of the generated class appropriate to the first phase is shown in the
following figures:
8
9
10
As in the OTA_PayloadStdAttributes case we need to ensure that our class
passes an appropriate set of tests. These tests are as shown below:
11
12
COMING NEXT
The target in this first phase of refactoring the processor that runs inside
Schema Studio is to generate a strong type class for OTA_PingRQ and this basic
form is shown in the previous section. The vital Serialization/Deserialization part
remains to be done, the documentation for which will be covered in a
subsequent article.
The next candidate will be the rather more complex OTA_CancelRQ, a definition
fragment of which is shown below:
In order the test a generated strong type for OTA_CancelRQ, we will need to
have available the following validated types:
Type Name Comment
UniqueID_Type ComplexType
OTA_CommonTypes.xsd
VerificationType ComplexType
OTA_CommonTypes.xsd
LocationType ComplexType
OTA_CommonTypes.xsd
PersonNameType ComplexType
OTA_CommonTypes.xsd
OTA_CodeType SimpleType
OTA_SimpleTypes.xsd
CancelRuleType ComplexType
OTA_CommonTypes.xsd
FreeTextType ComplexType
OTA_CommonTypes.xsd
13
ContactPersonType ComplexType
OTA_CommonTypes.xsd
TPA_Extensions ComplexType
OTA_CommonTypes.xsd
OTA_PayloadStdAttributes -
ReqRespVersion AttributeGroup
OTA_CommonTypes.xsd
TransactionActionType SimpleType
OTA_SimpleTypes.xsd
StringLength1to64 SimpleType
OTA_SimpleTypes.xsd
NonNegativeInteger XSD Primitive
StringLength1to32 SimpleType
OTA_SimpleTypes.xsd
StringLength0to64 SimpleType
OTA_SimpleTypes.xsd
It should be noted that strong type classes, such as OTA_PingRQ and
OTA_CancelRQ, involve serialization/deserialization to XML methods as well as
the following methods and operators: Clone() and ToString() implementations.
Method/Operator Comment
Copy Constructor Instantiate a type from another instance
GetHashCode() Gets a type-related Hash code
Clone() A type-specific clone method
Operator == A type-specific comparison operator
Operator != A type-specific comparison operator
Equals() A type-specific equality method (used by the
comparison operators)
ToString() Provides a type-specific conversion to a string
form
These types also have an appropriate base class which offers properties and
methods common to all classes of a given type (e.g. ComplexType,
AttributeGroup, Element etc).

More Related Content

Similar to Processor Refactoring.pdf

B035-2447-220K.pdf
B035-2447-220K.pdfB035-2447-220K.pdf
B035-2447-220K.pdfdegido10
ย 
C++.Primer.5th.Edition very good _2013.pdf
C++.Primer.5th.Edition very good _2013.pdfC++.Primer.5th.Edition very good _2013.pdf
C++.Primer.5th.Edition very good _2013.pdfarjurakibulhasanrrr7
ย 
Generation_XSD_Article - Part 4.pdf
Generation_XSD_Article - Part 4.pdfGeneration_XSD_Article - Part 4.pdf
Generation_XSD_Article - Part 4.pdfDavid Harrison
ย 
Test data article
Test data articleTest data article
Test data articleDavid Harrison
ย 
SDTMIG_v3.3_FINAL.pdf
SDTMIG_v3.3_FINAL.pdfSDTMIG_v3.3_FINAL.pdf
SDTMIG_v3.3_FINAL.pdfssusera19791
ย 
Documentation - MyGlWindowPlot
Documentation - MyGlWindowPlotDocumentation - MyGlWindowPlot
Documentation - MyGlWindowPlotMichel Alves
ย 
CA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with ExamplesCA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with ExamplesArshad Havaldar
ย 
C++ annotations version
C++ annotations versionC++ annotations version
C++ annotations versionPL Sharma
ย 
Generation_XSD_Article - Part 3.pdf
Generation_XSD_Article - Part 3.pdfGeneration_XSD_Article - Part 3.pdf
Generation_XSD_Article - Part 3.pdfDavid Harrison
ย 
Role Based Access Control - Overview
Role Based Access Control - OverviewRole Based Access Control - Overview
Role Based Access Control - OverviewHitachi ID Systems, Inc.
ย 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkArulalan T
ย 
GNU Gatekeeper 5.11
GNU Gatekeeper 5.11GNU Gatekeeper 5.11
GNU Gatekeeper 5.11J W
ย 
Generation_XSD_Article.docx
Generation_XSD_Article.docxGeneration_XSD_Article.docx
Generation_XSD_Article.docxDavid Harrison
ย 
PagesToGo.pdf
PagesToGo.pdfPagesToGo.pdf
PagesToGo.pdfDavid Harrison
ย 
21.1 personalization changing-the_field_name_part_21.1
21.1 personalization changing-the_field_name_part_21.121.1 personalization changing-the_field_name_part_21.1
21.1 personalization changing-the_field_name_part_21.1Oracle HRMS Functional Consultant
ย 
software-testing-framework 3
software-testing-framework 3software-testing-framework 3
software-testing-framework 3pradeepcutz
ย 
Software Requirement Specification Master Template
Software Requirement Specification Master TemplateSoftware Requirement Specification Master Template
Software Requirement Specification Master TemplateWayne Chen
ย 

Similar to Processor Refactoring.pdf (20)

B035-2447-220K.pdf
B035-2447-220K.pdfB035-2447-220K.pdf
B035-2447-220K.pdf
ย 
C++.Primer.5th.Edition very good _2013.pdf
C++.Primer.5th.Edition very good _2013.pdfC++.Primer.5th.Edition very good _2013.pdf
C++.Primer.5th.Edition very good _2013.pdf
ย 
How to analyzing sap critical authorizations
How to analyzing sap critical authorizationsHow to analyzing sap critical authorizations
How to analyzing sap critical authorizations
ย 
Generation_XSD_Article - Part 4.pdf
Generation_XSD_Article - Part 4.pdfGeneration_XSD_Article - Part 4.pdf
Generation_XSD_Article - Part 4.pdf
ย 
Test data article
Test data articleTest data article
Test data article
ย 
SDTMIG_v3.3_FINAL.pdf
SDTMIG_v3.3_FINAL.pdfSDTMIG_v3.3_FINAL.pdf
SDTMIG_v3.3_FINAL.pdf
ย 
Documentation - MyGlWindowPlot
Documentation - MyGlWindowPlotDocumentation - MyGlWindowPlot
Documentation - MyGlWindowPlot
ย 
CA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with ExamplesCA Service Desk Administrator Guide with Examples
CA Service Desk Administrator Guide with Examples
ย 
C++ annotations version
C++ annotations versionC++ annotations version
C++ annotations version
ย 
estaditca 2
estaditca 2estaditca 2
estaditca 2
ย 
Generation_XSD_Article - Part 3.pdf
Generation_XSD_Article - Part 3.pdfGeneration_XSD_Article - Part 3.pdf
Generation_XSD_Article - Part 3.pdf
ย 
Role Based Access Control - Overview
Role Based Access Control - OverviewRole Based Access Control - Overview
Role Based Access Control - Overview
ย 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-framework
ย 
GNU Gatekeeper 5.11
GNU Gatekeeper 5.11GNU Gatekeeper 5.11
GNU Gatekeeper 5.11
ย 
Generation_XSD_Article.docx
Generation_XSD_Article.docxGeneration_XSD_Article.docx
Generation_XSD_Article.docx
ย 
PagesToGo.pdf
PagesToGo.pdfPagesToGo.pdf
PagesToGo.pdf
ย 
Manual
ManualManual
Manual
ย 
21.1 personalization changing-the_field_name_part_21.1
21.1 personalization changing-the_field_name_part_21.121.1 personalization changing-the_field_name_part_21.1
21.1 personalization changing-the_field_name_part_21.1
ย 
software-testing-framework 3
software-testing-framework 3software-testing-framework 3
software-testing-framework 3
ย 
Software Requirement Specification Master Template
Software Requirement Specification Master TemplateSoftware Requirement Specification Master Template
Software Requirement Specification Master Template
ย 

More from David Harrison

PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfDavid Harrison
ย 
PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfDavid Harrison
ย 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfDavid Harrison
ย 
Babble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationBabble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationDavid Harrison
ย 
Bdd Show and Tell
Bdd Show and TellBdd Show and Tell
Bdd Show and TellDavid Harrison
ย 
UI Testing Pattern
UI Testing PatternUI Testing Pattern
UI Testing PatternDavid Harrison
ย 
Soap ui automation
Soap ui automationSoap ui automation
Soap ui automationDavid Harrison
ย 
High sierra part 1
High sierra part 1High sierra part 1
High sierra part 1David Harrison
ย 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedDavid Harrison
ย 
Workflow Test Automation
Workflow Test AutomationWorkflow Test Automation
Workflow Test AutomationDavid Harrison
ย 
Et sensus agile documentation
Et sensus   agile documentationEt sensus   agile documentation
Et sensus agile documentationDavid Harrison
ย 
Web Test Automation
Web Test AutomationWeb Test Automation
Web Test AutomationDavid Harrison
ย 

More from David Harrison (12)

PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdf
ย 
PhoenixRisingArticle.pdf
PhoenixRisingArticle.pdfPhoenixRisingArticle.pdf
PhoenixRisingArticle.pdf
ย 
Generation_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdfGeneration_XSD_Article - Part 2.pdf
Generation_XSD_Article - Part 2.pdf
ย 
Babble article - Test Automation & Text Translation
Babble article - Test Automation & Text TranslationBabble article - Test Automation & Text Translation
Babble article - Test Automation & Text Translation
ย 
Bdd Show and Tell
Bdd Show and TellBdd Show and Tell
Bdd Show and Tell
ย 
UI Testing Pattern
UI Testing PatternUI Testing Pattern
UI Testing Pattern
ย 
Soap ui automation
Soap ui automationSoap ui automation
Soap ui automation
ย 
High sierra part 1
High sierra part 1High sierra part 1
High sierra part 1
ย 
Selenium Testing @ Agile Speed
Selenium Testing @ Agile SpeedSelenium Testing @ Agile Speed
Selenium Testing @ Agile Speed
ย 
Workflow Test Automation
Workflow Test AutomationWorkflow Test Automation
Workflow Test Automation
ย 
Et sensus agile documentation
Et sensus   agile documentationEt sensus   agile documentation
Et sensus agile documentation
ย 
Web Test Automation
Web Test AutomationWeb Test Automation
Web Test Automation
ย 

Recently uploaded

Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
ย 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls DubaiEscorts Call Girls
ย 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
ย 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtrahman018755
ย 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
ย 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445ruhi
ย 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
ย 
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort ServiceBusty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort ServiceDelhi Call girls
ย 
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
ย 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
ย 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...SUHANI PANDEY
ย 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
ย 

Recently uploaded (20)

Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
ย 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
ย 
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐ŸฅตLow Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
Low Sexy Call Girls In Mohali 9053900678 ๐ŸฅตHave Save And Good Place ๐Ÿฅต
ย 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
ย 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
ย 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
ย 
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort ServiceCall Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
Call Girls in Prashant Vihar, Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9953056974 ๐Ÿ” Escort Service
ย 
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
๐“€คCall On 7877925207 ๐“€ค Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
ย 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
ย 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
ย 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
ย 
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
All Time Service Available Call Girls Mg Road ๐Ÿ‘Œ โญ๏ธ 6378878445
ย 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
ย 
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort ServiceBusty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
Busty DesiโšกCall Girls in Vasundhara Ghaziabad >เผ’8448380779 Escort Service
ย 
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
๐Ÿ“ฑDehradun Call Girls Service ๐Ÿ“ฑโ˜Ž๏ธ +91'905,3900,678 โ˜Ž๏ธ๐Ÿ“ฑ Call Girls In Dehradun ๐Ÿ“ฑ
ย 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
ย 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
ย 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
ย 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
ย 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
ย 

Processor Refactoring.pdf

  • 1. i | P a g e PROCESSOR REFACTOR A Course Correction D. Harrison December 2023 ยฉ 2023, David Harrison, All Rights Reserved
  • 2. Table of CONTENTS Introduction.............................................................................1 First Look ................................................................................3 Testingโ€ฆTestingโ€ฆ.....................................................................6 OTA_PingRQ ............................................................................7 Coming Next.......................................................................... 12
  • 3. 1 | P a g e INTRODUCTION Since early Q2 2023, I have been refactoring the processor, an integral part of the Schema Studio application. In previous work, I focused on the lower-level XSD entities directly, a bottom- up development process. In the event, when approaching the entities at the higher levels, for example, messages, the architecture of the processor was simply incompatible with the deeply recursive forms involved. This nested structure is demonstrated in the message definition of OTA_AirBookRQ, shown below:
  • 4. 2 This basic incompatibility between the former code structure and what was needed to fluently handle deep recursive structures led to a complete re-think of how the processing needed to be performed. In this new approach, the extensibility parts handle all the processing steps once the Structure Element Repository is built in a first pass. In developing this new top-down approach, the initial example used is that of the message OTA_PingRQ (shown below), arguably the simplest message in the Open Travel set.
  • 5. 3 First Look As a first look at the generated code from the processor which embodies this new approach, below is shown a fragment of the code generated for the AttributeGroup OTA_PayloadStdAttributes (the definition of which is shown in the figure above) which is a key part of the definition of OTA_PingRQ:
  • 6. 4 For the most part, the Attribute entities involved are reasonably straightforward, e.g. EchoToken. However, those named Target and TransactionStatusCode involve a SimpleType restriction expressed as an enumeration. In such cases, the processor generates a generic Attribute creation statement, where the type parameter is the internal, generated, enumeration, e.g. Target_Enum.
  • 7. 5 These generated, internal, enumerations, Target_Enum and TransactionStatusCode_Enum, are shown below:
  • 8. 6 Testingโ€ฆTestingโ€ฆ The types generated need to be validated via unit testing and the test for OTA_PayloadStdAttributes is shown below:
  • 9. 7 OTA_PINGRQ The generation of the OTA_PingRQ involves two phases. The first phase deals with the basic class structure and characteristics, and the second will cover the Serialization/Deserialization aspects. A fragment of the generated class appropriate to the first phase is shown in the following figures:
  • 10. 8
  • 11. 9
  • 12. 10 As in the OTA_PayloadStdAttributes case we need to ensure that our class passes an appropriate set of tests. These tests are as shown below:
  • 13. 11
  • 14. 12 COMING NEXT The target in this first phase of refactoring the processor that runs inside Schema Studio is to generate a strong type class for OTA_PingRQ and this basic form is shown in the previous section. The vital Serialization/Deserialization part remains to be done, the documentation for which will be covered in a subsequent article. The next candidate will be the rather more complex OTA_CancelRQ, a definition fragment of which is shown below: In order the test a generated strong type for OTA_CancelRQ, we will need to have available the following validated types: Type Name Comment UniqueID_Type ComplexType OTA_CommonTypes.xsd VerificationType ComplexType OTA_CommonTypes.xsd LocationType ComplexType OTA_CommonTypes.xsd PersonNameType ComplexType OTA_CommonTypes.xsd OTA_CodeType SimpleType OTA_SimpleTypes.xsd CancelRuleType ComplexType OTA_CommonTypes.xsd FreeTextType ComplexType OTA_CommonTypes.xsd
  • 15. 13 ContactPersonType ComplexType OTA_CommonTypes.xsd TPA_Extensions ComplexType OTA_CommonTypes.xsd OTA_PayloadStdAttributes - ReqRespVersion AttributeGroup OTA_CommonTypes.xsd TransactionActionType SimpleType OTA_SimpleTypes.xsd StringLength1to64 SimpleType OTA_SimpleTypes.xsd NonNegativeInteger XSD Primitive StringLength1to32 SimpleType OTA_SimpleTypes.xsd StringLength0to64 SimpleType OTA_SimpleTypes.xsd It should be noted that strong type classes, such as OTA_PingRQ and OTA_CancelRQ, involve serialization/deserialization to XML methods as well as the following methods and operators: Clone() and ToString() implementations. Method/Operator Comment Copy Constructor Instantiate a type from another instance GetHashCode() Gets a type-related Hash code Clone() A type-specific clone method Operator == A type-specific comparison operator Operator != A type-specific comparison operator Equals() A type-specific equality method (used by the comparison operators) ToString() Provides a type-specific conversion to a string form These types also have an appropriate base class which offers properties and methods common to all classes of a given type (e.g. ComplexType, AttributeGroup, Element etc).