cancel
Showing results for 
Search instead for 
Did you mean: 

Array in WSDL

Former Member
0 Kudos

Hi there,

I have a Proxy->PI->SOAP scenario.

The third-party WSDL contains an array, which is unfortunately not supported by PI.

The complex type looks as following:


<xs:complexType name="EmployeeInfo">

  <xs:sequence>

  <xs:element name="ID" type="xs:string"/>

  <xs:element name="Name" type="xs:string"/>

  <xs:element name="Qual" type="ns1:QualItems"/>

  ...

</xs:sequence>

</xs:complexType>

This is the array structure:


<xs:complexType name="QualItems">

  <xs:complexContent>

  <xs:restriction base="soapenc:Array">

  <xs:sequence/>

  <xs:attribute xmlns:n1="http://schemas.xmlsoap.org/wsdl/"

ref="soapenc:arrayType" n1:arrayType="ns1:QualRec[]"/>

  </xs:restriction>

  </xs:complexContent>

</xs:complexType>

<xs:complexType name="QualRec">

  <xs:sequence>

  ...

  <xs:element name="QualPos" type="xs:string"/>

  ...

  </xs:sequence>

</xs:complexType>

Ive tried to change the WSDL in the following way:


<xs:complexType name="EmployeeInfo">

  <xs:sequence>

  <xs:element name="ID" type="xs:string"/>

  <xs:element name="Name" type="xs:string"/>

  <xs:element name="Qual" type="QualRec" minOccurs="1" maxOccurs="unbound"/>

  ...

  </xs:sequence>

</xs:complexType>

But the field "QualPos" is not filled in the thir-party application.

I now asked the service provider to send me a proper payload for the web service.

It looks like that:


<Qual href="#id2" />

...

<soapenc:Array id="id2" xmlns:q4="urn:XXX" soapenc:arrayType="q4:TSAPQualRec[1]">

  <Item href="#id3" />

</soapenc:Array>

<q5:QualRec id="id3" xsi:type="q5:TSAPQualRec" xmlns:q5="urn:XXX">

  <QualPos xsi:type="xsd:string">XYZ</QualPos>

</q5:QualRec>

How can I achieve that in PI?

Do I have to use XSLT mapping?

Could you please give me an example?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi Kolz,

A few cents. This can be done by PI, you can use a XSL or Java Mapping. Personally, i'd rather to use XSL mapping.

If you need to do the array in the request you would need only to set the tag soapen:Array manually in the XSL (if its the attributes are not parameters) and the rest with a value-of-select.

If you need to transform a response with the array you only need to do a for:each like this example looping through xslt split array - Xslt - our.umbraco.org

Finally, if you share a source XML and target XML (hidding the company information with another values) we can help you with the XSL easier.

Hope this helps.

Regards.