How to give input parameter in SOAPUI for ArrayOfString type XML element.

Input Request

<soapenv:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:pur=”http://www.cdn.com/purge” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/”>
<soapenv:Header/>
<soapenv:Body>
<pur:purgeRequest soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”>
<name xsi:type=”xsd:string”></name>
<network xsi:type=”xsd:string”></network>
<opt xsi:type=”pur:ArrayOfString” soapenc:arrayType=”xsd:string[]“/>
</pur:purgeRequest>
</soapenv:Body>
</soapenv:Envelope>

I tried as follow

<soapenv:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:pur=”http://www.cdn.com/purge” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/”>
<soapenv:Header/>
<soapenv:Body>

<pur:purgeRequest soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”>
<name xsi:type=”xsd:string”>username</name>
<network xsi:type=”xsd:string”>test</network>
<opt xsi:type=”pur:ArrayOfString” soapenc:arrayType=”xsd:string[4]“>
<item xsi:type=”xsd:string”>domain=dev</item>
<item xsi:type=”xsd:string”>type=url</item>
<item xsi:type=”xsd:string”>action=remove</item>
</opt>
</pur:purgeRequest>
</soapenv:Body>
</soapenv:Envelope>

And it worked for me :) .

Advertisement

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.