Forum Discussion

rsaritzky's avatar
rsaritzky
Occasional Contributor
5 years ago

Message "line -1: Response is missing or empty" when submitting a POST message

Hi,

In SoapUI Open source, I'm trying to submit a REST web service call.  I was able to load the WSDL from my web service definition just fine.  I was able to create an authentication header that fixed my original authentication error.

 

The message I get is:

 

line -1: Response is missing or empty

 

Here's the web service call:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:shop="urn:microsoft-dynamics-schemas/codeunit/ShoppingCartMgt">
<soapenv:Header/>
<soapenv:Body>
<shop:PurchaseSingleItem>
<shop:customerNo>Cxxxxxx</shop:customerNo>
<shop:itemNo>Itemxxxxxx</shop:itemNo>
<shop:last4CC>0000</shop:last4CC>
<shop:cCLineNo>10000</shop:cCLineNo>
<shop:promoCode></shop:promoCode>
<shop:amount>999.00</shop:amount>
<shop:status></shop:status>
<shop:statusMsg></shop:statusMsg>
</shop:PurchaseSingleItem>
</soapenv:Body>
</soapenv:Envelope>

 

If I copy the WSDL and paste it into a browser, the web service call runs successfully.

 

I'm trying to understand the "Response is missing or empty" message.  Anyone have any clues?

 

  • Hi Rich,

     

    Thank you for all the replies and the time you obviously spent reviewing the environment.  I finally found a resolution - when I was configuring my Authentication, I was specifying the NTLM authentication as

    Username: MyDomain\MyUserID

    Password: xxxxxxx

    Domain: <left blank>

     

    What I had to do is specify the domain separately in the "Domain" field, e.g.

    Username: MyUserID

    Password: xxxxxxx

    Domain: MyDomain

     

    Once I did that, the web service responded.

     

    Again, I am new to web services, so I don't always know where to look or what responses actually mean.  But i do appreciate your time.

     

    Regards,

     

    Ron

     

  • richie's avatar
    richie
    Community Hero

    Hi rsaritzky 

     

    firstly, this is in the wrong forum - this is the ReadyAPI! forum so this should've been raised in the open source SoapUI board.

     

    Anyway - I just need to clarify what you've done as I'm a little confused.

     

    Q1. You created your project based on the .wsdl - correct?  

    Q2. Did you create a testcase and subsequent teststep using the .wsdl?

    Q3. Did you copy the SOAP request payload into the teststep or was it dynamically generated?

    Q4. Where you say "If I copy the WSDL and paste it into a browser, the web service call runs successfully." - what do you mean - "it runs successfully" when you copy it into a browser.  I'm not understanding what you mean by run it when its in the browser....????

    Q5. Can you provide the full RAW details of both the request and it's response please?  When I say full RAW - I mean, HTTP headers and payload.

     

    Cheers,

     

    Rich

    • rsaritzky's avatar
      rsaritzky
      Occasional Contributor

      Hi Rich,

       

      First of all, I apologize for posting in the wrong forum - I DID try to find a SoapUI or ReadyAPI forum, but it was not listed in the choices when I created this post.  My bad.

       

      Q1. You created your project based on the .wsdl - correct?  

      Yes - I created a new project and pasted in the URL for the endpoint for my webservice that returns the WSDL - it populated all the methods correctly.

      Q2. Did you create a testcase and subsequent teststep using the .wsdl?

      No - I'm not yet experienced enough in creating test cases - I wanted to just manually run the request to see if i could receive a reply

      Q3. Did you copy the SOAP request payload into the teststep or was it dynamically generated?

      I am new to SoapUI and much of the terminology in web services - I am an application developer learning the web-service side.  But here's what I did:

      1. I created a SOAP Project and loaded the WSDL that I had previously saved as an .xml file - it generated all the methods

       

      2. I rightclicked on one of the methods and clicked "New Request" - On the XML tab, it showed the WSDL. On the "Raw" tab, it showed <missing raw request data"
      3. I filled in the required data in the request and clicked the green execute arrow
      4. I received the response "line -1: Response is missing or empty"

       

      Q4. Where you say "If I copy the WSDL and paste it into a browser, the web service call runs successfully." - what do you mean - "it runs successfully" when you copy it into a browser.  I'm not understanding what you mean by run it when its in the browser....????

       

      We currently use Wizdler to test the web services.  I can input the URL for the endpoint and select the method I wish to test.  If I input the required data and click "GO" (a button that Wizdler adds to Chrome), the request is executed and the response appears in another window.  The format of the WSDL generated by Wizdler is slightly different, so I copied the SoapUI request into the Wizdler Request Window and clicked "Go".  I received a correct response.

       

      Q5. Can you provide the full RAW details of both the request and it's response please?  When I say full RAW - I mean, HTTP headers and payload.

      The screenshot above is what I think you want - it shows the raw tab on the request page and the response in the lower right.

       

      If my questions are too elementary, I apologize, and I'll try other resources. Thank you for your team.

       

      Thanks

       

      Ron

      • richie's avatar
        richie
        Community Hero

        Hey Ron,

         

        for future reference the open source SoapUI board is available via https://community.smartbear.com/t5/SoapUI-Open-Source/bd-p/SoapUI_OS

         

        nope - there's nothing wrong with your questions - Im just pretty dumb so I like to lay out everything clearly so I understand - hence the need for the questions/clarification! 🙂

         

        ok - so your answer to Q5 - if you look at the screenshot for your response - (the right hand side pane opposite the request's pane on the left), you will see the 'XML' tab is enabled - can you click on the 'RAW' tab, so we can see all the headers and the payload of the response?

         

        Also - you mentioned the payload being submitted in Wizdler is slightly different to the dynamically generated payload in SoapUI.

         

        Can you publish both so we can compare?  BTW - in regards to security - as long as you blank out the host/domain portion of the full URL - this will satisfy any security risk of publishing a .wsdl - no one can do anything without the host/domain.

         

        youve already tried submitting a SoapUI message via Wizdler, can you do it the other way around to confirm what happens? i.e. publish the wizdler message content via SoapUI?  Just overwrite one of the messages contents to see what happens and then revert back afterwards.

         

        there have been reports (years ago) of an extra forward slash in the URL published causing this issue - can you double check the URL you are POSTing to?

         

        there's no problems with any question you ask - that's what we're here for - to answer questions!

         

        nice one

         

        Rich