Reputation: 97
I hace deployed a java WebService in an application using WebSphere AST. I need to limit the length of some fields (Strings) and I wondered if I can do that at the wsdl instead of coding some validations at java level.
I mean, if rigth now I have the elements defined like this:
<element name="code" nillable="true" type="xsd:string"/>
Can I set some property that restrict the max length of "code"?
Thank you.
Upvotes: 0
Views: 1454
Reputation: 218
<element name="code" nillable="true" type="xsd:string"/>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:minLength value="2"/>
<xsd:maxLength value="10"/>
</xsd:restriction>
</xsd:simpleType>
Upvotes: 1