cancel
Showing results for 
Search instead for 
Did you mean: 

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

Contributor

[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
2 REPLIES 2
Contributor

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:
viewtopic.php?t=11065#p43576

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: http://www.soapui.org/apidocs/com/eviwa ... Style.html
But I have no clie how to access a property's "Style" (e.g. PLAIN), let alone how to check against it...

Brgrds,

Christian
Contributor

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?