Forum Discussion

ChristianB's avatar
ChristianB
Contributor
11 years ago

[4.6.4] REST: How are the PLAIN parameters used?

SoapUI suppports PLAIN parameters: http://www.soapui.org/REST-Testing/unde ... eters.html


From the WADL specs:
PLAIN: Specifies a component of the representation formatted as a string encoding of the parameter value according to the rules of the media type.


My WADL fragment looks as follows:
<method name="POST" id="myId">
<request>
<param name="username" type="xsd:string" required="true" style="plain"/>
<param name="password" type="xsd:string" required="true" style="plain"/>
<param name="my_http_header" default="test" type="xsd:string" required="true" style="header"/>
<representation mediaType="application/json"/>
</request>


I'd now expect that SoapUI either lets me access those parameters (but that's not documented here: http://www.soapui.org/Scripting-Propert ... nsion.html ) or (even better) that it recognises the media type, the parameters and creates the payload for me...
Unfortunately it does neither. Any suggestions how to use the PLAIN parameters? (Unfortunately, they're not documented in the help...)
Regards,

Christian
  • Looks like the following does the job, albeit not in a pretty way:
    && "PLAIN" == e.value.getStyle().toString())


    Has anyone an idea how to do this comparing to the ENUM or how to get the values using SoapUI's Property Expansion?