cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Arrays in webservice action

Former Member
0 Likes
172

Hallo,

I'm trying to call a webservice from MII by the webservice action.

The xsd of the webservice shows me, that I have a parameter for the service method of the type genericParam

<xs:complexType name="genericParam">
   <xs:sequence>
      <xs:element name="segments" type="tns:segment" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
   </xs:sequence>
</xs:complexType>

The type segment is defined as

<xs:complexType name="segment">
   <xs:sequence>
      <xs:element name="key" type="xs:string" minOccurs="0"/>
      <xs:element name="value" type="tns:dataWrapper" minOccurs="0"/>
   </xs:sequence>
</xs:complexType>

Segments in the webservice code is expected as an array. So I would like to specify more than one Segment.

But the link editor in MII only shows me something like

param
   segments
      key
      value

which only allows me to set one segment. How would it be possible to set more than one with different values? Something like

param
   segments
      segment
         key
         value
      segment
         key
         value
      segment
         key
         value
      ...

Any ideas?

Thanks for help,

regards Timo

Accepted Solutions (1)

Accepted Solutions (1)

agentry_src
Active Contributor
0 Likes

Hi Timo,

Copy the xml fragment segment to a local property. Update it with the data you want to send. Then use an assignment block with type append xml. Append to Segments. Then make the webservice call.

Let me know if you need more info.

Mike

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Timo,

You can use xml to pass all segments at a time.

Make a xml as needed format as a local or transcation property.

And assign the xml to your segments root.

I hope this may help you..

-Suresh Hiremath

Edited by: Suresh Hiremath on May 29, 2009 12:44 PM