I have to do a transformation from a source wsdl to a target wsdl. In my source wsdl I have 4 attributes.The following gives the result returned from the source wsdl:
<Role>
<roleName>Role1</roleName>
<StartDate>2014-08-26</StartDate>
<primary>true</primary>
</Role>
This is to be mapped to attribute which can have more than one occurrence(unbounded).
The attribute is of the form :
<xs:complexType name="Attr">
<xs:sequence>
<xs:element name="attributeName" type="xs:string" minOccurs="0"/>
<xs:element name="complexAttributes" type="tns:dataValue"
nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="dataValue">
<xs:sequence>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="value" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Here I want to map name of the attribute to the name in dataValue and the value of the attribute to value of DataValue. For example if roleName is role1, then name is roleName and value is role1.Similarly I want to map for the other 2 attributes also.
No comments:
Post a Comment