cancel
Showing results for 
Search instead for 
Did you mean: 

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

New Contributor

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 7
Community Hero

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

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

 

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
New Contributor

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

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

Super Contributor

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

Hi @Soniawadhwa ,

 

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

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
Community Hero

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

Hi @Soniawadhwa,

 

I asked for the RAW so I could see exactly what was published by both Postman and SoapUI and the responses for both.  However - I'm not sure whether you did scrape the detail from the RAW - the reasons Im unsure is:

 

1. percent encoding of the '+'  symbol in your URI - it looks like neither is encoding the plus - but I would've guessed Postman and ReadyAP! would encode the plus (there  was a ReadyAPI! issue with plus symbols not being encoded - but this was a while ago and is fixed as far as I could tell). 

 

2. On the postman request it appears that you have 2 Cache-Control headers on your Postman request - are you sure this is correct?

 

Ok - so - would it be possible to proxy your requests via fiddler so we can so exactly what is occurring (both requests and responses)? I thought we could get away with just checking the RAW - but fiddler is probably best.

 

Essentially we need to compare exaclty what is published - so this means payload and headers - both requests and responses - fiddler will give us the detail we need and at least we know there won't be a problem rendering the info wihtin Postman or SoapUI (which I've noticed can occur). 

 

In regards to the Content-Type header on the SoapUI request - you appear to be setting it to application/json;charset=UTF-8 - but you don't include the charset reference in your Postman requests.  Why are you specifying the additional charset parameter in the header?  UTF-8 is the default charset for .json - so there's no point specifying it in the header

 

cheers,

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Moderator

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

Thanks for your participation everyone!

 

@Soniawadhwa, what stage are you on now? Could you please share your progress?

Thanks,


Olga Terentieva
SmartBear Assistant Community Manager

New Contributor

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

I still haven't got it working. The endpoint in SOAPUI gives 503- Service unavailable with +1 ***-***-1234 in endpoint.

It is working in Postman. I even imported the postman collection in readyapi, but doesnt work

Community Hero

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

Hi @Soniawadhwa,

If you proxy the requests (both soapui and postman) via fiddler and provide and provide readyapi!'s logging, i am confident we can identify the issue. Ive had multiple issues where the request worked in postman but not readyapi! initially and i always resolved the problem in the end.

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta