I have a statically defined WSDL that I was trying to move to DynamicWsdl11Definition. There is a problem doing this however. The current WSDL defines several operations with unique input messages that share the same output message. Does DynamicWsdl11Definition only work for XSD that follow the convention of having a 1-to-1 matching between ...Input and ...Output definitions?
For example, the schema has:
In the statically-defined WSDL, the corresponding operations are:Code:<xs:element name="GetWidgetsByDepartmentRequest"> <xs:complexType> <xs:sequence> <xs:element name="departmentId" type="xs:long"/> </xs:sequence> </xs:complexType> </xs:element> <!-- *** Get widgets by Id *** --> <xs:element name="GetWidgetsByIdRequest"> <xs:complexType> <xs:sequence> <xs:element name="widgetId" type="xs:long" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <!-- *** Get widgets by Keyword *** --> <xs:element name="GetWidgetsByKeywordRequest"> <xs:complexType> <xs:sequence> <xs:element name="departmentId" type="xs:long"/> <xs:element name="keyword" type="xs:string" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="GetWidgetsResponse"> <xs:complexType> <xs:sequence> <xs:element name="widgets" type="zt:Widgets"/> </xs:sequence> </xs:complexType> </xs:element>
But the WSDL generated by the DynamicWsdl11Definition class looks like:Code:<portType name="AnyOldPortType"> <operation name="GetWidgetsByDepartment"> <input message="tns:GetWidgetsByDepartmentInput"/> <output message="tns:GetWidgetsOutput"/> </operation> <operation name="GetWidgetsById"> <input message="tns:GetWidgetsByIdInput"/> <output message="tns:GetWidgetsOutput"/> </operation> <operation name="GetWidgetsByKeyword"> <input message="tns:GetWidgetsByKeywordInput"/> <output message="tns:GetWidgetsOutput"/> </operation> </portType>
The same pattern presents itself in the binding section of the dynamic WSDL as well.Code:<wsdl:portType name="AnyOldService"> <wsdl:operation name="GetWidgetsByKeyword"> <wsdl:input message="tns:GetWidgetsByKeywordRequest" name="GetWidgetsByKeywordRequest"> </wsdl:input> </wsdl:operation> <wsdl:operation name="GetWidgetsById"> <wsdl:input message="tns:GetWidgetsByIdRequest" name="GetWidgetsByIdRequest"> </wsdl:input> </wsdl:operation> <wsdl:operation name="GetWidgetsByDepartment"> <wsdl:input message="tns:GetWidgetsByDepartmentRequest" name="GetWidgetsByDepartmentRequest"> </wsdl:input> </wsdl:operation> </wsdl:portType>
To sum up:
The static WSDL works for the case above as well as for operations that I've defined having matching Input and Output operations.
The dynamically-generated WSDL works for the operations having matching Input and Output declarations but not for the case I've outlined above.
Actually, the Flex application I'm working on does read the dynamic WSDL and formulate a good request. It receives the SOAP response, but since there is no Output declaration in its WSDL, it doesn't know what to do with the response. SadlyI can see the full SOAP response in the Flex debugger, but Flex does not know how to demarshall it into AS3 objects.
Changing the webservice to have multiple, specific Output definitions would lead to a lot of code changes. Is there any way around this so that I can maintain one response layout while triggering it from multiple request types?


I can see the full SOAP response in the Flex debugger, but Flex does not know how to demarshall it into AS3 objects.
Reply With Quote