Forum Discussion

EPDelta's avatar
EPDelta
New Contributor
4 years ago

ERROR:java.net.SocketException: Connection reset

Running SoapUI 5.0.0

Trying to send a SOAP document to an EHR API and am getting the above error.  The detail after that line looks similar to the other reported issues of this type:

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)

and there is no other clues offered in the text below this group.

Sending a REST message works just fine, but SOAP is the standard for the set of APIs that my team is working with.

I tried removing each header line individually, performing a test run between each removal:

HOST = <servername>.corp.<domain>.com
SOAPAction = "urn:<ehrsystem-com>:PatientAccessMobile.2020.Services.GetMessageDetail"
Accept-Encoding = gzip,deflate
User-Agent =Apache-HttpClient/4.5.5 (Java/12.0.1)
Connection = Keep-Alive
Content-Type = text/xml;charset=UTF-8
<ehr>-Client-ID = 087fee8d-4259-49ae-8da9-99bdeeb33636
Authorization = Basic ZW1wOjExNTU6ZXBpYw==

... and setting up Basic authorization.  Nothing seems to work.  I did not edit the XML doc, because the project file is from my team lead, who was successfully communicating with the API via ReadyAPI.

 

Just wondering if version 5.0.0 is too old or I missed something.

 

Thanks.

 

 

  • EPDelta's avatar
    EPDelta
    New Contributor

    Just had a thought: the project file is from my Team Lead, who is using ReadyAPI to build his projects.

     

    Are project files cross-compatible between SoapUI Open Source and ReadyAPI?

     

    Thanks.

    • richie's avatar
      richie
      Community Hero

      Hey EPDelta 

       

      Creating projects in ReadyAPI! and running them in opensource SoapUI shouldn't be a problem unless the ReadyAPI! project includes pro (licensed) functionality (e.g. data driven functionality, event handling, composite projects, etc.)

      HOWEVER - if you're able to open the ReadyAPI! project from within SoapUI, then that atleast proves it's not a composite project.

      If there's other licensed functionality like the data driven functionality, you'll see the datadriven items disabled in your test case.

       

      socket exceptions are typically related to the networking protocol TLS/SSL - if it mentioned SSL in the error response I'd switch from HTTP to HTTPS or back again which is typically the thing that catches me out when I get socket exceptions.

       

      HOWEVER - I think you have another problem and I don't think it's related to the version of SoapUI you're using.

       

      You mention you haven't altered the XML - I'm guessing you mean the payload content in the SOAP Service API and the associated test steps - right?

       

      You then mention that you added in Basic Auth - and I can see you've got an Authorization header and a base64 encoded value (which will be an encode of your username and password), HOWEVER - if you're Test Lead didn't have basic auth set on the API, then it isn't required and adding it won't work.

       

      Connection reset typically means something fundamental is wrong with your setup and so either your message isn't getting to the endpoint at all or it's getting there in such an unexpected condition your endpoint doesnt recognise it (and I don't mean payload when I say unexpected condition - I mean something more basic).

       

      The fact it runs on your Test Leads machine leads me to think you shouldn't have to edit the project at all.

       

      The problem is a setting local to your machine - I'd ask your Test Lead to check the 'WSDL Settings', 'SSL Settings' and the 'Proxy Settings' (within the ReadyAPI! Preferences) to see what he's got in there.  I'd also ask him for a copy of his hosts file just in case you're trying to hit an endpoint that's resolved locally to his machine.

       

      Can you confirm what the authentication type is being used for your SOAP service?  It's definitely not Basic Auth as the project doesn't already have it in - but you'll need this configured properly, however as I mention above - I think it's something fundamental and local to your machine - so I'd compare the global settings (mentioned above) you've got set in SoapUI against your Test Lead's settings in ReadyAPI!

       

      ta

       

      rich   

      • linehammer's avatar
        linehammer
        Frequent Visitor

        Connection reset simply means that a TCP RST was received. This happens when your peer receives data that it can't process, and there can be various reasons for that. The simplest is when you close the socket, and then write more data on the output stream. By closing the socket, you told your peer that you are done talking, and it can forget about your connection. When you send more data on that stream anyway, the peer rejects it with an RST to let you know it isn't listening.