1

我正在尝试通过wiremock JAVA API记录soap请求,尝试使用以下代码进行记录,但我在映射文件夹中看不到任何存根映射文件,请帮帮我。

请求:
http://localhost:PORT_NUMBER/IntegrationServices/Bookings/BookFlow_v3(请求中有xml数据)

 //Staring the wiremock server
             WireMockServer wireMockServer = new WireMockServer(options().port(HTTP_PORT).httpsPort(HTTPS_PORT));
                options().notifier(new ConsoleNotifier(true));
                WireMock.configureFor(HTTP_PORT);
                WireMock.configureFor(HTTPS_PORT);

                wireMockServer .start();

        //Staring wiremock recording
                      wireMockServer .startRecording(recordSpec().forTarget("server name")
                         .onlyRequestsMatching(getRequestedFor(urlMatching("/.+"))).captureHeader("Accept")
                         .captureHeader("Content-Type", true).ignoreRepeatRequests());
                      System.out.println("Wiremock server started recording");

                      SnapshotRecordResult snapshotRecordResult = server.stopRecording();
                      List<StubMapping> stubMappings = snapshotRecordResult.getStubMappings();

输出:获取存根大小为零但没有错误

4

0 回答 0