【发布时间】:2020-04-18 20:24:29
【问题描述】:
I am trying to run a demo scenario for Soap XML request . Have used the sample calculator web service . I works fine when i trigger the request from Soap UI .But the connection fails on trying to access the request from IntelliJ using Karate .
@SoapTest
Feature:
Background:
* url 'http://www.dneonline.com'
* path 'calculator.asmx'
* configure ssl = true
Scenario: soap 1.1
Given url apiURL
And request
"""
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="http://tempuri.org/">
<intA>2</intA>
<intB>3</intB>
</Add>
</soap:Body>
</soap:Envelope>
"""
When soap action 'http://tempuri.org/Add'
Then status 200
And match /Envelope/Body/AddResponse/AddResult == 5
And Print response
**下面是正在使用的空手道配置文件**
function() {
var config = {
apiURL: 'http://www.dneonline.com/calculator.asmx'
};
karate.configure('connectTimeout', 5000);
karate.configure('readTimeout', 5000);
karate.configure('ssl', { trustAll: true });
return config;
}
错误详情: 12:38:56.822 [ForkJoinPool-1-worker-1] 错误 com.intuit.karate - org.apache.http.conn.ConnectTimeoutException:连接到 www.dneonline.com:80 [www.dneonline.com/45.40.165.23 ] 失败:连接超时,http 调用在 5068 毫秒后失败 URL:http://www.dneonline.com/calculator.asmx/calculator.asmx 12:38:56.822 [ForkJoinPool-1-worker-1] 错误 com.intuit.karate - http 请求失败: org.apache.http.conn.ConnectTimeoutException:连接到 www.dneonline.com:80 [www.dneonline.com/45.40.165.23] 失败:连接超时
I am not quite sure if i need to configure any proxy setting in Intellij or in the karate framework.
or if it is something to do with the firewall as i am using my company's system.
Thanks .
【问题讨论】:
标签: http intellij-idea soap karate