Forum Discussion

Soniawadhwa's avatar
Soniawadhwa
New Contributor
5 years ago

REST request working with Postman(200ok), gives 503 with SOAPUI . Endpoint has +1 ***-***-1234

I have REST api such as {{protocal}}://{{host}}:{{port}}/api/challenge/+1 ***-***-1234 

This works with POstman , gives 200OK

 

But with SOAP UI gives 500 /503.

 

Is there a way I can pass Phone number (+1 ***-***-1234) correctly in the request endpoint?

I have tried to pass this phone number directly in the endpoint or as a query but doen't work.

 

I have utf-8 encoding set, but it doesnt work with iso as well.

7 Replies

  • richie's avatar
    richie
    Community Hero

    Hi Soniawadhwa 

     

    Can you provide the RAW details of the request from Postman and the RAW details of the request from ReadyAPI! please?

    To successfully diagnose the problem - we need to know what is actually being published in your requests - I suspect its a problem with the html / percent encoding of the phone number in the URI you are injecting - but can't confirm or deny without any more info e.g. the RAW details for the requests from both Postman and ReadyAPI!

     

    Cheers,

     

    rich

     

    • Soniawadhwa's avatar
      Soniawadhwa
      New Contributor

      POstman code

      POST /api/challenge/+1 ***-***-8231 HTTP/1.1
      Host: api.com:443
      Content-Type: application/json
      User-Agent: PostmanRuntime/7.15.0
      Accept: */*
      Cache-Control: no-cache
      Postman-Token: 9b67591d6b,3ba5d59f-9d19-95bc-ec7d2808e245
      Host: api.com:443
      cookie: visid_incap_2105598=3grSOjzYSY incap_ses_1178_2105598=tosoB2XTKx
      incap_ses_1180_2105598=
      incap_ses_980_21055incap_ses_620_2105598=4B5JSPo
      accept-encoding: gzip, deflate
      content-length: 92
      Connection: keep-alive
      cache-control: no-cache
       
      {
      "purpose": "device_registration",
      "session_id": "60c00113-bb05-46cf-88"
      }
       
       
      Response: 200OK
      {

      }
       
       
      SOAP UI
      POST https:api.com:443/sms/challenge/phone?phone=+1 ***-***-***-8231 HTTP/1.1
      Accept-Encoding: gzip,deflate
      Content-Type: application/json;charset=UTF-8
      Accept: */*
      Cache-Control: no-cache
      Content-Length: 92
      Host: api.com:443
      Connection: Keep-Alive
      User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
       
      {
      "purpose": "device_registration",
      "session_id": "1bd9d35f-29ac900bb8ac"
      }
       
       
      Response

      HTTP/1.1 503 Service Unavailable
      Content-Type: application/json; charset=UTF-8
      Date: Fri, 19 Jul 2019 14:24:52 GMT
      Connection: close
      Set-Cookie: visid_incap_2105598=ZJ31AESKTbPSMV0AAAAAQUIPAAAAAADhs9KF54LoNA+PTW1hdSoh; expires=Sat, 18 Jul 2020 08:05:12 GMT; path=/; Domain=.api.cl.cnb.com
      Set-Cookie: incap_ses_1178_2105598=FrjFbh50lmNERlZELPSMV0AAAAAth/1g9xWAh0+Hs/BqO3Msg==; path=/; Domain=.api.com
      Set-Cookie: ___utmcDzUZAFJWCu; path=/; Max-Age=900
      Set-Cookie: ___utmYLZ=JrcDvHw; path=/; Max-Age=900
      Set-Cookie: ___utmvbZ=tZz XIvOpalf: Wts; path=/; Max-Age=900
      X-Iinfo: 11-4863546291402 97) q(0 0 1 -1) r(5 5) U6
      X-CDN: Incapsula
      Content-Encoding: gzip
      Transfer-Encoding: chunked

      {
      "error_code": "11",
      "error_message": "could not be sent"
      }

       

       

      I have put dummy urls and session ids etc above

      • HimanshuTayal's avatar
        HimanshuTayal
        Community Hero

        Hi Soniawadhwa ,

         

        It will be very helpfull if you paste any screenshot of both postman and soap ra request.