S90-19 practice question 3 of 15

Service A contains reporting logic that collects statistical data from different sources in order to produce a report document. One of the sources is…

Full set: 83 questions
Service A contains reporting logic that collects statistical data from different sources in order to produce a report document. One of the sources is a Web service that exists outside of the organizational boundary. Some of Service A's service consumers are encountering slow response times and periods of unavailability when invoking Service A . While investigating the cause, it has been discovered that some of the messages received from the external Web service contain excessive data and links to files (that are not XML schemas or policies). What can be done to address this issue?
Answer options
A: define cardinality in message schemas Correct answer
B: correlate request and response messages across different services
C: use precompiled XPath expressions
D: avoid downloading XML schemas at runtime Correct answer
Correct Answer:
A. define cardinality in message schemas; D. avoid downloading XML schemas at runtime
Explanation

The performance issues—slow response times and unavailability—are caused by two specific problems with messages from an external service: "excessive data" and "links to files."
1. Defining cardinality (A) in the message schemas used to validate incoming messages directly addresses the "excessive data" problem. By setting maxOccurs attributes, the service can enforce limits on the size and structure of the payload, rejecting messages that are too large and would otherwise consume excessive resources and time to process.
2. Avoiding the download of external resources at runtime (D), such as the linked files mentioned, directly addresses a major source of latency and unavailability. Resolving and downloading external entities or files during message processing introduces a dependency on external network availability and performance, which is a known anti-pattern.

Why Incorrect

B. correlate request and response messages across different services: Correlation is for managing state in asynchronous communication and does not address performance degradation caused by large message payloads or external network dependencies.
C. use precompiled XPath expressions: This is a micro-optimization for XML parsing. It would not solve the primary performance bottlenecks caused by network latency from downloading large messages or external files.

References

1. For option A (define cardinality): The "Schema Centralization" design pattern emphasizes the use of standardized and centrally governed schemas to enforce data representation and structure. Validation against these schemas, including cardinality constraints (minOccurs, maxOccors), is a fundamental mechanism for ensuring message quality and preventing issues like data overload.

Erl, T. (2008). SOA Design Patterns. Prentice Hall. Chapter 10, "Schema Centralization," pp. 318-321. The pattern description emphasizes how centralized schemas enforce data representation standards, which inherently includes constraints on data volume.

2. For option D (avoid downloading): The principle of loose coupling, fundamental to SOA, dictates that a service's execution path should have minimal dependencies on external resources, especially at runtime. Downloading external files or schemas introduces tight coupling to the availability and performance of the external resource's host.

Erl, T. (2005). Service-Oriented Architecture: Concepts, Technology, and Design. Prentice Hall. Chapter 6, "SOA and Enterprise-Wide Business Process Design," Section 6.3, "Service-orientation and the enterprise-wide business process," discusses how services should be self-contained and autonomous to improve reliability.

3. General XML Processing Best Practices: Standard security and performance guidelines for XML processing strongly advise against resolving external entities or schemas at runtime due to the risk of denial-of-service (DoS) attacks and severe performance degradation.

W3C. (2004). XML Schema Part 1: Structures Second Edition. W3C Recommendation 28 October 2004. Section 3.3.2, "Occurrence Constraints," defines the minOccurs and maxOccurs attributes used to constrain data volume.

OWASP Foundation. XML External Entity (XXE) Prevention Cheat Sheet. This security document explains the risks of processing external entities, which include performance degradation and unavailability, and recommends disabling this feature in XML parsers.

Scroll to Top