Showing results for 
Search instead for 
Did you mean: 

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


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

SoapUI suppports PLAIN parameters: ... 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">
<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"/>

I'd now expect that SoapUI either lets me access those parameters (but that's not documented here: ... 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...)


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

Somebody created a Groovy script that looks as if it could do what I want:

Is there a way to check what type a parameter is, e.g. PLAIN, so I don't have to insert them all into my message's body?
The relevant ENUM to compare against seems to be this one: ... Style.html
But I have no clie how to access a property's "Style" (e.g. PLAIN), let alone how to check against it...



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

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?