Priti's Technical Corner

January 13, 2012

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

Filed under: SOAPUI, XML — Tags: — pritisolanki @ 4:48 pm

Input Request

<soapenv:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:pur=”http://www.cdn.com/purge&#8221; xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/”&gt;
<soapenv:Header/>
<soapenv:Body>
<pur:purgeRequest soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”&gt;
<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&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:pur=”http://www.cdn.com/purge&#8221; xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/”&gt;
<soapenv:Header/>
<soapenv:Body>

<pur:purgeRequest soapenv:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”&gt;
<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 :).

Advertisements

1 Comment »

  1. Precisely how much time did it take you to compose “How to give input parameter
    in SOAPUI for ArrayOfString type XML element.
    Priti’s Technical Corner”? It provides a lot of decent material. Thank you -Janelle

    Comment by Vivian — February 20, 2013 @ 4:30 am


RSS feed for comments on this post. TrackBack URI

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 )

Google+ photo

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

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: