Nested elements in a WSDL file
843833Apr 12 2006 — edited May 10 2006Hello all,
How do I write a WSDL have a nested complexTypes?
Example to do something like this.
===============================================
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="StateAlarmsWSDL" targetNamespace="sssss" xmlns:tns="dddddd" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="xxxxx/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema targetNamespace="types" xmlns:tns="types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
<stacklist>
<choice>
<complexType name="getInitializationConfiguration">
<sequence>
<element name="String_1" type="string" nillable="true"/></sequence></complexType>
<complexType name="getInitializationConfigurationResponse">
<sequence>
<element name="result" type="anyURI" nillable="true"/></sequence></complexType>
<complexType name="ArcosStationServerException">
<sequence>
<element name="reasonText" type="string" nillable="true"/></sequence></complexType>
<complexType name="getUpdatedStates">
<sequence>
<element name="String_1" type="string" nillable="true"/>
<element name="String_2" type="string" nillable="true"/>
<element name="String_3" type="string" nillable="true"/>
<element name="String_4" type="string" nillable="true"/>
<element name="String_5" type="string" nillable="true"/>
<element name="String_6" type="string" nillable="true"/></sequence></complexType>
<complexType name="getUpdatedStatesResponse">
<sequence>
<element name="result" type="tns:UpdateStatesReturnValuesType" nillable="true"/></sequence></complexType>
<complexType name="UpdateStatesReturnValuesType">
<sequence>
<element name="StateAlarmList" type="tns:DigestListType" nillable="true"/>
<element name="StateAlarmRef" type="anyURI" nillable="true"/>
<element name="sliceDigestList" type="tns:DigestListType" nillable="true"/></sequence></complexType>
<complexType name="DigestListType">
<sequence>
<element name="digestEntry" type="tns:DigestType" nillable="true" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType>
<complexType name="DigestType">
<sequence>
<element name="algorithm" type="string" nillable="true"/>
<element name="digest" type="string" nillable="true"/></sequence></complexType>
<complexType name="EndOfFileException">
<sequence>
<element name="faulttext" type="string" nillable="true"/></sequence></complexType>
<element name="getInitializationConfiguration" type="tns:getInitializationConfiguration"/>
<element name="getInitializationConfigurationResponse" type="tns:getInitializationConfigurationResponse"/>
<element name="ArcosStationServerException" type="tns:ServerException"/>
<element name="getUpdatedStates" type="tns:getUpdatedStates"/>
<element name="getUpdatedStatesResponse" type="tns:getUpdatedStatesResponse"/>
<element name="EndOfFileException" type="tns:EndOfFileException"/></schema></types>
</choice>
</stacklist>
<message name="StateAlarms_getInitializationConfiguration">
<part name="parameters" element="ns2:getInitializationConfiguration"/></message>
<message name="StateAlarms_getInitializationConfigurationResponse">
<part name="result" element="ns2:getInitializationConfigurationResponse"/></message>
<message name="ArcosStationServerException">
<part name="ServerException" element="ns2:ArcosStationServerException"/></message>
<message name="StateAlarms_getUpdatedStates">
<part name="parameters" element="ns2:getUpdatedStates"/></message>
<message name="StateAlarms_getUpdatedStatesResponse">
<part name="result" element="ns2:getUpdatedStatesResponse"/></message>
<message name="EndOfFileException">
<part name="EndOfFileException" element="ns2:EndOfFileException"/></message>
<portType name="StateAlarms">
<operation name="getInitializationConfiguration">
<input message="tns:StateAlarms_getInitializationConfiguration"/>
<output message="tns:StateAlarms_getInitializationConfigurationResponse"/>
<fault name="ArcosStationServerException" message="tns:ArcosStationServerException"/></operation>
<operation name="getUpdatedStates">
<input message="tns:StateAlarms_getUpdatedStates"/>
<output message="tns:StateAlarms_getUpdatedStatesResponse"/>
<fault name="EndOfFileException" message="tns:EndOfFileException"/>
<fault name="ArcosStationServerException" message="tns:ArcosStationServerException"/></operation></portType>
<binding name="AlarmStateBinding" type="tns:AlarmStates">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getInitializationConfiguration">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output>
<fault name="ServerException">
<soap:fault name="ArcosStationServerException" use="literal"/></fault></operation>
<operation name="getUpdate">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/></input>
<output>
<soap:body use="literal"/></output>
<fault name="EndOfFileException">
<soap:fault name="EndOfFileException" use="literal"/></fault>
<fault name="ArcosStationServerException">
<soap:fault name="ArcosStationServerException" use="literal"/></fault></operation></binding>
<service name="AlarmStates">
<port name="AlarmStatesPort" binding="tns:AlarmStatesBinding">
<soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
Am i right?
Rgds,
Seetesh