-
Notifications
You must be signed in to change notification settings - Fork 317
Closed
Description
Stanislaw Hein opened SWS-861 and commented
while trying to generate wsdl from xsd the attributes minOccurs, maxOccurs, nillable and etc. are getting lost:
xsd:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://services.webservices.customerapi.de" xmlns:objects="http://objects.webservices.customerapi.de"
targetNamespace="http://services.webservices.customerapi.de" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:import namespace="http://objects.webservices.customerapi.de" schemaLocation="Hello.xsd" />
<xsd:element name="HelloRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element nillable="false" name="name" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="HelloResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Hello" type="objects:Hello" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
with such defined DefaultWsdl11Definition bean:
<bean id="HelloService" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" lazy-init="true">
<property name="schemaCollection">
<bean class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true" />
<property name="xsds">
<list>
<value>schemas/HelloService.xsd</value>
</list>
</property>
</bean>
</property>
<property name="portTypeName" value="HelloService" />
<property name="serviceName" value="HelloService" />
<property name="locationUri" value="/endpoints" />
</bean>
as a result am receiving wsdl (here only part of it):
<xsd:element name="HelloRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string" /> <!-- here was "nillable" attr lost-->
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="HelloResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Hello" type="objects:Hello" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
could you please check this issue, because it is very important for contract-data-first approach.
regards
Affects: 2.1.3
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug