Forum Discussion

chrislivett's avatar
chrislivett
New Contributor
8 years ago

HTTP 403 for SOAP VirtResponse when using Start Step

I am using ReadyAPI 1.9.0-m-SNAPSHOT (nightly build) to try to set up testing of synchronous and asynchronous microservices, which communicate via SOAP, by isolating them and visualizing all external connectivity.

 

The system should perform the following:

  1. ServiceA sends a SOAP request to ServiceB to get some data (supply details)
  2. ServiceB sends a SOAP request to ServiceC to get part of the data
  3. ServiceB sends a SOAP request to ServiceD to get the rest of the data
  4. ServiceB responds to the original request from ServiceA with all of the data

To perform this action in ReadyAPI I have created the following test case:

  • Step 1: SOAP Request to ServiceB (/getSupplyDetails)
  • Step 2: SOAP VirtResponse listening on port 2320 for calls to /virt/coreaccess, with the 'Start step' configured to be Step 1
  • Step 3: SOAP VirtResponse listening on port 2324 for calls to /virt/supplymanagementdb, with the 'Start step' configured to be Step 1

In the logs I see the following:

Mon Nov 21 15:37:56 GMT 2016:INFO:Mounted WSDL for interface [ERS Core Access SoapBinding] at [/virt/coreaccess?WSDL]
Mon Nov 21 15:37:56 GMT 2016:INFO:Started Virt [ERS Core Access getSupplyDetails response] on port [2320] at path [/virt/coreaccess]
Mon Nov 21 15:37:57 GMT 2016:INFO:Mounted WSDL for interface [SmartSupply DB SoapBinding] at [/virt/supplymanagementdb?WSDL]
Mon Nov 21 15:37:57 GMT 2016:INFO:Started Virt [Supply Management database response] on port [2324] at path [/virt/supplymanagementdb]
Mon Nov 21 15:37:58 GMT 2016:INFO:Got response for [Supply Management Service SoapBinding.getSupplyDetails:Send getSupplyDetails request] in 44ms (537 bytes)
Mon Nov 21 15:37:58 GMT 2016:INFO:Stopped Virt [Supply Management database response] on port [2324]
Mon Nov 21 15:37:58 GMT 2016:INFO:Stopped Virt [ERS Core Access getSupplyDetails response] on port [2320]

 

The issue, is that on the server it is getting a HTTP 403 request when trying to access the virts as seen in the following error:

Caused by: org.apache.cxf.transport.http.HTTPException: HTTP response '403: Remote access forbidden' when communicating with http://<redacted>:2320/virt/coreaccess.  However, if I create 3 separate test cases with 1 for each step and manually run each of the test cases for the virts, then the test case for the request, it is successful.

 

By doing some investigation by adding in waits and seeing what happens on the server, it looks as though when it says "Started Virt" in the logs it hasn't actually started the virt but instead started listening on that port sending 403 responses to any requests.  When it gets to the actual step, it then sends the correct response, but in my case as Step 1 is synchronous and will not continue until Steps 2 & 3 have responded, the test fails.

 

Has anyone came across this or have any idea how to fix this or workaround this?

 

6 Replies

  • gbeasse's avatar
    gbeasse
    New Contributor

    Hello,

     

    We encounter same issue since version 1.8.5.

    Did you submit your case to smartbear support and did you get any answer ?

    Thanks,

     

    Best regards.

    • chrislivett's avatar
      chrislivett
      New Contributor

      I know I got it fixed in the end, it was quite a while ago though so I do not remember what the solution was.  I believe that in the end it was fixed in an upgrade, so may be worth moving to the latest version.

      • gbeasse's avatar
        gbeasse
        New Contributor

        I have tried with latest version but still have the issue.

  • chrislivett's avatar
    chrislivett
    New Contributor

    Looking through my emails, the suggested fix was:

    ----

    Can you upgrade to the latest nightly build?
    https://support.smartbear.com/downloads/readyapi/nightly-builds/

    ----

     

    That was 9 months ago though so I would have imaged that the fix in the nightly build would have made it through to stable build.  It may not have been that fixed it though, but that's the best suggestion I can give.

  • gbeasse's avatar
    gbeasse
    New Contributor

    Issue has been fixed in latest release (2.3)

    Regards,