Forum Discussion

Cybernelly's avatar
Cybernelly
New Contributor
11 years ago

No "Accept" choice in REST request editor

When I worked previously with SOAPUI 4.5.0-4.5.2 there was very helpful combobox in REST request editor allowed me to define or choose "Accept" HTTP header value (e.g. switch dynamically from application/json to application/xml). As far as I can see this option disappeared from UI in 4.6.x, although previous choices are stored somewhere in SOAPUI project file.

Now the only way for me to switch to different REST representation is to define "Accept" as a custom header. It is very inconvenient.

Can it be fixed in next version?

9 Replies

  • Cybernelly's avatar
    Cybernelly
    New Contributor
    Thanks for pointing me to this possibility, but I have two problems with suggested approach:

    1. It conflicts with a settings stored in my SOAPUI project by older (4.5.x) version of SOAPUI: if I add "Accept" template parameter I can see this header added twice to request
    2. Even if I provide a list of choices for template parameter, I don't have a way to choose from these options when I execute my request (probably this ability exists only in Pro version with form editor).
  • Hi,

    1. It conflicts with a settings stored in my SOAPUI project by older (4.5.x) version of SOAPUI: if I add "Accept" template parameter I can see this header added twice to request


    Not sure I understand this. In original post you said you had a custom header named "Accept" and it allowed you to switch. I would think this would also add an extra "Accept" in the header if it is adding it for the template parameter also.

    2. Even if I provide a list of choices for template parameter, I don't have a way to choose from these options when I execute my request (probably this ability exists only in Pro version with form editor).


    The form editor is available in SoapUI Pro, it will provide the convenience of of selecting the template parameter options in a drop down fashion.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    We have a bug reported for this issue SOAP-915.

    Until this is fixed, as a work around you can override the value of your accept header by adding another accept header. To do that, you have to open request editor and there you will see a header tab on the bottom. There you can add any header parameters. Have a look at this link for details http://www.soapui.org/SOAP-and-WSDL/add ... tp-headers

    Regards,
    Shadid
    SmartBear Sweden
  • Cybernelly's avatar
    Cybernelly
    New Contributor
    To mrJames:


    Not sure I understand this. In original post you said you had a custom header named "Accept" and it allowed you to switch. I would think this would also add an extra "Accept" in the header if it is adding it for the template parameter also.


    In 4.5.2 Accept header was added using a dedicated control, not through regular headers pane in request editor. And the value of selected header was stored in SOAPUI XML file. So when I open such file in 4.6.1 and send request, it adds stored Accept header and also applies all custome headers I enter through Headers pane. So I have "Accept" entered twice, possibly with different values. God knows which one will be taken by server...

    To Shadid

    We have a bug reported for this issue SOAP-915.


    What particular issue was reported? Can I get access to bugtracker or just know bug description?
  • Hi,

    The bug tracking system is internal. The bug is opened as a backwards compatibility issue with header params in Soap 4.5 and 4.6.
  • dsw's avatar
    dsw
    New Contributor
    Any update on when this issue will be resolved? I would like to move to a soapUI 4.6.4, but I'm still using version 4.5.2 - waiting for this issue to be resolved.
  • SBateman's avatar
    SBateman
    New Contributor
    Is this the same issue I'm experiencing? I'll restate just incase it isn't.
    In SoapUI-4.5.x and earlier versions, REST methods had an “Accept” drop down which was populated with appropriate values (ex: application/xml, application/json) which came from the WSDL.

    In SoapUI-4.6.x and later versions, REST methods no longer have the “Accept” drop down. There is a header tab where you can manually add the appropriate “accept” header.

    The “Accept” drop down which is auto-populated with appropriate values is very convenient. Is the UI feature permanently gone or are there plans to restore it in the future?
  • kondasamy's avatar
    kondasamy
    Regular Contributor
    This bug exists even for the recent versions - SoapUI Pro 5.0.0 and 5.1.0. Could anyone help in fixing the issue as early as possible.