Author |
Message
|
wmbfrz |
Posted: Wed Feb 24, 2016 4:56 am Post subject: |
|
|
Apprentice
Joined: 08 Jan 2010 Posts: 28
|
Hi,
I am using SoapUI for sending a POST request to my REST API and i copied the url from my Integration server. I am getting the error "BIP6311E: REST API ''SearchServiceTrial4'' does not support method ''POST'' for URL ''http://localhost:7804/travelrefapp/searchflight;roundTrip=false;departingAirport=Mumbai;departureDate=2016-05-04''. " |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 24, 2016 5:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
wmbfrz wrote: |
I am getting the error "BIP6311E: REST API ''SearchServiceTrial4'' does not support method ''POST'' for URL ''http://localhost:7804/travelrefapp/searchflight;roundTrip=false;departingAirport=Mumbai;departureDate=2016-05-04''. " |
Well that seems clear enough. Whatever "SearchServiceTrial4" is (and I'm quietly confident that's user code not the IIB software), it doesn't support a POST method.
Include that support (or change where you've accidentally supported GET not POST) and try again. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
stoney |
Posted: Wed Feb 24, 2016 5:46 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
Does the error message say 405 Method Not Allowed, or 404 Not Found?
If it says 405 Method Not Allowed, then the URL is right but the HTTP method wrong - maybe it should be GET instead of POST.
If it says 404 Not Found, then the URL is wrong and you need to check it.
Is your URL meant to have semicolon separated key value pairs? Is it possible that they're meant to be supplied as a query string, ie:
Code: |
http://localhost:7804/travelrefapp/searchflight?roundTrip=false&departingAirport=Mumbai&departureDate=2016-05-04 |
|
|
Back to top |
|
 |
wmbfrz |
Posted: Wed Feb 24, 2016 5:52 am Post subject: |
|
|
Apprentice
Joined: 08 Jan 2010 Posts: 28
|
Vitor wrote: |
wmbfrz wrote: |
I am getting the error "BIP6311E: REST API ''SearchServiceTrial4'' does not support method ''POST'' for URL ''http://localhost:7804/travelrefapp/searchflight;roundTrip=false;departingAirport=Mumbai;departureDate=2016-05-04''. " |
Well that seems clear enough. Whatever "SearchServiceTrial4" is (and I'm quietly confident that's user code not the IIB software), it doesn't support a POST method.
Include that support (or change where you've accidentally supported GET not POST) and try again. |
I wrote a Swagger doc using editor.swagger.io and created an REST API in IIB10. The swagger is valid and it has POST operations as method |
|
Back to top |
|
 |
wmbfrz |
Posted: Wed Feb 24, 2016 5:56 am Post subject: |
|
|
Apprentice
Joined: 08 Jan 2010 Posts: 28
|
stoney wrote: |
Does the error message say 405 Method Not Allowed, or 404 Not Found?
If it says 405 Method Not Allowed, then the URL is right but the HTTP method wrong - maybe it should be GET instead of POST.
If it says 404 Not Found, then the URL is wrong and you need to check it.
Is your URL meant to have semicolon separated key value pairs? Is it possible that they're meant to be supplied as a query string, ie:
Code: |
http://localhost:7804/travelrefapp/searchflight?roundTrip=false&departingAirport=Mumbai&departureDate=2016-05-04 |
|
thnxs for the reply. Its 404. My application is suppose to receive a json request. I defined my REST API to send the POST parameters in body. I guess i am mistaking in generating the POST req in SOAPUI. i entered the parameters with style as matrix and level as METHOD (also tried with level = resource). |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 24, 2016 5:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wmbfrz wrote: |
I defined my REST API to send the POST parameters in body. |
What other options does SOAPUI offer you?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
wmbfrz |
Posted: Wed Feb 24, 2016 6:09 am Post subject: |
|
|
Apprentice
Joined: 08 Jan 2010 Posts: 28
|
fjb_saper wrote: |
wmbfrz wrote: |
I defined my REST API to send the POST parameters in body. |
What other options does SOAPUI offer you?  |
for styles: query, header, plain, matrix, template
for level: resource, method |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 24, 2016 9:16 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
wmbfrz wrote: |
fjb_saper wrote: |
wmbfrz wrote: |
I defined my REST API to send the POST parameters in body. |
What other options does SOAPUI offer you?  |
for styles: query, header, plain, matrix, template
for level: resource, method |
I meant for sending the parameters!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|