Issue working with SOAP API
See original GitHub issueHi,
First off, this is an awesome framework. So far my only challenges are around the native support for Soap and manipulating the responses when there are namespaces.
Example:
Step 1) Send a request to a Soap operation by reading in from xml file on disk. Step 2) Do basic validations e.g. status and content check, sample code below.
Scenario: Get account details by phone number
Given request read('getAccountByPhoneNumberRequest.xml')
When soap action 'getAccountByPhoneNumber'
Then status 200
And match response //ns3:billingAccountNumber/text() == '123456789'
Issue:
- When I try to parse the ‘response’ object with standard XPATH expressions I always get ‘actual: null, expected: 123456789, reason: not equal’
- I validated my XPATH expression using a separate tool, I was able to retrieve the data I was after
- I printed the ‘response’ object and notice that it was in a JSON format
- I tried using the conversion examples ‘* xml variableName = response’ to convert to Soap, but that didn’t work
- all the examples use static xml in the feature files so are not directly applicable to my scenario
The ask:
How do I extract XML elements when testing against Soap?
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Troubleshooting SOAP errors in the project pages of Business ...
On the Business Portal Server, browse out to the ProjectService.wsdl file. · Open the file in Notepad · Scroll to the bottom of...
Read more >Issue working with SOAP API · Issue #106 · karatelabs/karate
Hi, First off, this is an awesome framework. So far my only challenges are around the native support for Soap and manipulating the...
Read more >Application client SOAP request troubleshooting tips - IBM
Use this information to diagnose and troubleshoot problems with clients sending SOAP requests.
Read more >What is SOAP API: Formats, Protocols, and Architecture
SOAP works with XML only. Web-transmitted data is usually structured in some way. The two most popular data formats are XML and JSON....
Read more >Issues for SOAP Client | Drupal.org
Title Status Priority Category Versi...
Use extension_loaded() in favor of dl() Needs review Normal Bug report 6.x‑1...
Drupal 7 version of soapclient Needs review Normal...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just wanted to drop a comment to say thank you for your quick response. Will get to testing and will response with some samples. Happy to help improve the Soap aspect of Karate, even though we know where things are going (REST/GraphQL).
shipped in v0.5.0 - for further issues please open specific tickets