I'm creating a code-first soap webservice, and would like to limit the input parameter to a maxmimum length. So that if someone uses the exposed wsdl to auto-generate client classes, he will see that the length is limited.
Is that possible without manually modifying the xsd?
@WebMethod
@WebResult(name = "version")
public String version(@WebParam(name = "version") String value) { //TODO limit to 10 chars
return value;
}
So I'd like to configure the parameter in a way that the xsd outcome is as follows:
<xs:restriction base="xs:string">
<xs:maxLength value = "10"/>
</xs:restriction>