Невозможно отправить запрос и получить ответ на сервис мыла wsdl - PullRequest
0 голосов
/ 28 декабря 2018

Мы используем цитрусовый фреймворк для тестирования образца мыла wsdl.Ниже приведены определения тестового примера.

@Test 
@Parameters("context")
@CitrusTest
public void secondSoapTest(@Optional @CitrusResource TestContext context){
author("Adhi");
name("Soap test");

soap(action -> action
 .client("https://graphical.weather.gov:443/xml/SOAP_server/ndfdXMLserver.php")
 .send()
 .soapAction("LatLonListCityNames")
 .payload(
        "<todo:getTodoListRequest 
         xmlns:todo=\"https://graphical.weather.gov:443/xml/SOAP_server\">\r\n" <todo:displayLevel>3</todo:displayLevel>\r\n</todo:getTodoListRequest>"));
soap(action -> action.client("https://graphical.weather.gov:443/xml/SOAP_server/ndfdXMLserver.php")
 .receive()
 .name("test")              
);

Вместо ответа я получаю следующее исключение.

11:31:36,572 DEBUG port.LoggingReporter| TEST STEP 2: receive
11:31:36,572 DEBUG ngCorrelationManager| Get correlation key for 'citrus_message_correlator_todoSoapClient'
11:31:36,572 DEBUG   citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:36,872 DEBUG   citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:37,185 DEBUG   citrus.RetryLogger| Correlation key not available yet - retrying in 300ms
11:31:37,500 DEBUG   citrus.RetryLogger| Correlation key not available yet - retrying in 100ms
11:31:37,602 INFO  port.LoggingReporter| 
11:31:37,602 ERROR port.LoggingReporter| TEST FAILED Soap test <com.citrus.test> Nested exception is: 
com.consol.citrus.exceptions.TestCaseFailedException: Failed to get correlation key for 'citrus_message_correlator_todoSoapClient'
    at com.consol.citrus.TestCase.executeAction(TestCase.java:241)
    at com.consol.citrus.dsl.runner.DefaultTestRunner.run(DefaultTestRunner.java:198)
    at com.consol.citrus.dsl.runner.DefaultTestRunner.soap(DefaultTestRunner.java:549)
    at com.consol.citrus.dsl.testng.TestNGCitrusTestRunner.soap(TestNGCitrusTestRunner.java:375)
    at com.citrus.test.SoapRunnerTest.secondSoapTest(SoapRunnerTest.java:94)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...