Forum Discussion

usha_kian's avatar
usha_kian
Occasional Contributor
16 years ago

I am getting <h1>Bad Request</h1> when sending the below request

Hi,

I am new to SOAP UI tetsing.

I am using sample postal service WSDL from web to learn testing.

WSDL : https://api.postalmethods.com/PostalWS.asmx?WSDL

For the method Send Letter :

I am sending below request :


 
   
      usha
      test
      test
      test
      1010
      test
      test
      test
      test
      test
      test
      test
      california
      94086
      USA
   

 


Can anyone help why I am getting this error and how to resolve it.

6 Replies

  • Peter_Hofman's avatar
    Peter_Hofman
    Occasional Contributor
    Hi usah kian,

    try setting HTTP version in HTTP Settings in Preferences to version 1.1
    for some reason the default setting is 0.9

    Cheers
    Peter
  • usha_kian's avatar
    usha_kian
    Occasional Contributor
    Hi,

    Thanks for the help. I updated HTTP settings and I am getting the below error:

    HTTP/1.1 400 Bad Request
    Date: Wed, 15 Apr 2009 16:43:17 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    X-AspNet-Version: 2.0.50727
    Cache-Control: private
    Content-Length: 0


    may I know what could be the issue now
  • usha_kian's avatar
    usha_kian
    Occasional Contributor
    Peter,

    I sent the below the request


     
       
          usha
          test
          test
          test
          1010
          test
          test
          test
          test
          test
          test
          test
          california
          94086
          USA
       

     



    And getting the below response :


     
         
            -3150
         

     


    Can you please guide on what I did wrong?

    Usha
  • akumar's avatar
    akumar
    New Contributor
    Hi I was getting the same error.
    I deleted the project, closed SOAP-UI, created a fresh project and it worked.

    Most likely some bad cache settings somewhere. I don't know. but it worked this way...

    Erstwhile Microsoft REBOOT :-)
  • usha_kian's avatar
    usha_kian
    Occasional Contributor
    I tried the suggestion and now I am getting a blank response.

    Also, I would like to some guideline so how to pass binary data in the request message.

    Your help is highly appreciated


    Usha
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi Usha,


    I've tried your SOAP request to PostMethods and I also received 400 Bad Request. Not a very insightful error. I've assumed I had to open an account and Developer Quick Start supported me in this assumption.

    After using my PostalMethods account to send a PDF file with the rest of my request being identical to your request, I've received 200 OK status code but also with a non-OK SendLetterAndAddressResult code. More specifically, -3004 (The specified file extension is not supported). They provide documentation for status codes. Once I set FileExtension field to "PDF", my request was properly processed and I received a unique identifier, a positive number. You appear to have nailed -3150 which is their status code for General System Error in which case you need to contact their technical support

    As PostalMethods WSDL file specifies, file data needs to be Base64 encoded. In soapUI pro version, requests and file selection (and subsequent Base64 encoding) is available in user-friendly manner.

    I hope my guide-through helped you out in accessing PostalMethods web services.


    Cheers!
    /Nenad Nikolic a.k.a. Shonzilla