question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue working with SOAP API

See original GitHub issue

Hi,

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:closed
  • Created 6 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ovineycommented, Jul 13, 2017

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).

0reactions
ptrthomascommented, Jul 27, 2017

shipped in v0.5.0 - for further issues please open specific tickets

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found