Connect to and consume Azure services and third-party services →mediumMultiple ChoiceObjective-mapped
AZ-204 Practice Question: Connect to and consume Azure services and third-party services
You are developing a solution that needs to consume an external SOAP web service. Which approach should you use to integrate it into a modern .NET Core application?
⚠ Common exam trap
Test-takers frequently assume HttpClient is sufficient for SOAP because it can send XML, but they overlook the complexity of SOAP standards (WS-Addressing, security, MTOM) that the WCF client handles automatically, making raw HTTP requests a fragile and non-production-ready approach.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the WCF Client (System.ServiceModel) to generate a proxy and call the SOAP service.
System.ServiceModel (WCF Client) provides built-in support for SOAP protocols, including WS-* standards, message security, and automatic proxy generation from WSDL. In modern .NET Core (and .NET 5+), the WCF client libraries are available via the System.ServiceModel.Http NuGet package, making it the most appropriate and feature-complete way to consume a SOAP service in a .NET Core application.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use gRPC client to call the service.
Why it's wrong here
gRPC (gRPC Remote Procedure Call) utilizes HTTP/2 for transport and Protocol Buffers for efficient binary serialization, which is a fundamentally different communication protocol than SOAP. A gRPC client is designed to interact with gRPC services and cannot natively understand, construct, or parse the XML-based message envelopes that define SOAP requests and responses. Therefore, it is incompatible for directly consuming a SOAP service without an extensive and custom translation layer.
- ✗
Use HttpClient to send raw HTTP requests with SOAP envelope.
Why it's wrong here
While `HttpClient` can indeed send raw HTTP requests, manually constructing the entire SOAP XML envelope, including namespaces, headers, and body, is highly complex and error-prone. Developers would also need to set appropriate HTTP headers like `Content-Type: text/xml` and `SOAPAction`, and then manually parse the incoming XML response. This approach lacks the type safety, automatic serialization/deserialization, and robust error handling provided by dedicated SOAP client libraries, making it an inefficient and unmaintainable solution.
- ✓
Use the WCF Client (System.ServiceModel) to generate a proxy and call the SOAP service.
Why this is correct
The WCF (Windows Communication Foundation) client libraries, part of `System.ServiceModel`, are the standard and most robust way to consume SOAP-based web services in .NET. By using tools like `dotnet-svcutil` to generate a proxy class from the service's WSDL (Web Services Description Language), developers gain a strongly-typed interface. This proxy handles the intricate details of SOAP message construction, serialization, deserialization, and transport automatically, significantly simplifying interaction with the service and reducing development effort.
- ✗
Use Azure Logic Apps with a SOAP connector.
Why it's wrong here
Azure Logic Apps offer a low-code/no-code solution with built-in connectors, including one for SOAP services, allowing for easy integration. However, for a scenario where an existing application needs to make a direct, programmatic call to an external SOAP service, introducing an external managed service like Logic Apps adds unnecessary architectural complexity, potential latency, and recurring operational costs. It is an overkill solution when a direct client-side library integration is more appropriate and efficient.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.