-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxml-soap.yaml
More file actions
69 lines (64 loc) · 2.25 KB
/
xml-soap.yaml
File metadata and controls
69 lines (64 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# XML/SOAP Support Example
# Note: Many public SOAP APIs are deprecated or require auth
# This example demonstrates XML parsing with a REST XML endpoint
probes:
# Probe 1: REST API that returns XML
- name: "XML REST Response"
type: rest
endpoint: "https://httpbin.org/xml"
validation:
status: 200
headers:
contains:
Content-Type: "xml"
body:
# XPath: Extract from XML structure
# httpbin.org/xml returns a simple XML document with multiple slides
present:
- "//slideshow"
- "//slide"
- "//slide/title"
# Get first slide's title (use [1] for first element)
type:
"//slide[1]/title": string
# Verify first slide title value
equals:
"//slide[1]/title": "Wake up to WonderWidgets!"
# When path matches multiple elements, it returns array
# So "//slide/title" returns array of all titles
type:
"//slideshow/@title": string # Attribute returns single value
# XPath Notes:
# - Use // for descendant search
# - Use [1] to get first element (XPath is 1-indexed)
# - Use [2] for second element, etc.
# - Without index, multiple matches return arrays
# - Attributes (@attr) typically return single values
#
# Example XPath Patterns:
# - "//elementName" - Find all elements (may return array)
# - "//elementName[1]" - First element only (returns single value)
# - "//parent/child" - Direct child
# - "//element[@attribute='value']" - Attribute filter
# - "//element/@attribute" - Extract attribute value
# - "//element/text()" - Text content only
#
# For SOAP APIs:
# 1. Set proper Content-Type: "text/xml; charset=utf-8"
# 2. Set SOAPAction header if required
# 3. Use proper SOAP envelope in body
# 4. Navigate through soap:Envelope/soap:Body/...
# 5. Use default: prefix for default namespace elements
#
# Example SOAP Request Structure:
# body: |
# <?xml version="1.0" encoding="utf-8"?>
# <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
# <soap:Body>
# <YourMethod xmlns="http://your-namespace.com/">
# <param>value</param>
# </YourMethod>
# </soap:Body>
# </soap:Envelope>
#
# See docs/XML_SOAP_GUIDE.md for complete documentation