Hi,
When using root elements in schemas where the request suffix does not end in "Request", the WSDL generation using the DefaultWsdl11Definition is not working as expected. For example, if I have 2 simple schemas, FooRequest and FooResponse, as follows:
and include them in my context bean:Code:<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="urn:foo" > <xs:element name="FooRequest"> <xs:complexType> <xs:attribute name="bar"/> </xs:complexType> </xs:element> </xs:schema> <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" targetNamespace="urn:foo"> <xs:element name="FooResponse"> <xs:complexType> <xs:attribute name="bar"/> </xs:complexType> </xs:element> </xs:schema>
the WSDL that gets generated contains what we expect: a wsdl operation with an input and output as follows:Code:<bean id="foo" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"> <property name="schemaCollection"> <bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection"> <property name="xsds"> <list> <value>classpath:xsd/Foo.xsd</value> <value>classpath:xsd/FooResponse.xsd</value> </list> </property> </bean> </property> <property name="portTypeName" value="Foo" /> <property name="locationUri" value="${core.ws.url}/foo" /> </bean>
However, if my root element of the request does not end in "Request", ie simply "Foo" instead of "FooRequest", and I specify the requestSuffix of "" in the bean as follows:Code:<wsdl:operation name="Foo"> <soap:operation soapAction=""/> <wsdl:input name="FooRequest"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="FooResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation>
I don't get the wsdl output at all, in fact I get an wsdl input of FooResponse as well:Code:<property name="requestSuffix" value="" />
What is the expected behaviour when specifying requestSuffix?Code:<wsdl:binding name="FooSoap11" type="tns:Foo"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="FooResponse"> <soap:operation soapAction=""/> <wsdl:input name="FooResponse"> <soap:body use="literal"/> </wsdl:input> </wsdl:operation> <wsdl:operation name="Foo"> <soap:operation soapAction=""/> <wsdl:input name="Foo"> <soap:body use="literal"/> </wsdl:input> </wsdl:operation> </wsdl:binding>
Thanks
Alan


Reply With Quote
) wsdls.
