SOAP
Complex Types
ParseRequestValidateHard
Description
Send and receive complex XML types with nested elements.
Test Scenario
const envelope = `
<soap:Envelope ...>
<soap:Body>
<CreateOrder xmlns="...">
<order>
<userId>1</userId>
<items>
<item>
<productId>1</productId>
<quantity>2</quantity>
</item>
</items>
</order>
</CreateOrder>
</soap:Body>
</soap:Envelope>`;Endpoint
/api/soapTesting Tips
- •Match exact type structure from WSDL
- •Namespace prefixes must match
- •Validate against XSD schema
// Playwright API Testing - SOAPimport { test, expect } from '@playwright/test';test('SOAP request', async ({ request }) => {const soapEnvelope = `<?xml version="1.0"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><GetUsers xmlns="http://api.example.com/"/></soap:Body></soap:Envelope>`;const response = await request.post('/api/soap', {headers: { 'Content-Type': 'text/xml' },data: soapEnvelope});expect(response.ok()).toBeTruthy();const text = await response.text();expect(text).toContain('soap:Envelope');});
Challenge ID: soap-complex-types
2 frameworks available
API Playground
Send requests and inspect responses
Endpoint: /api/soap
Press Enter to send