Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elements in WSDL generated without minLength attributes #51

Open
daveage opened this issue Jun 7, 2016 · 0 comments
Open

Elements in WSDL generated without minLength attributes #51

daveage opened this issue Jun 7, 2016 · 0 comments

Comments

@daveage
Copy link

daveage commented Jun 7, 2016

When I add @SiZe annotation to a Class Field it is not generated in wsdl as minLength attribute.

I've actually try more ways of adding length or pattern specification to a field to make it really mandatory, but nothing works.

My problem is, that I need to validate incoming request against WSDL generated from java classes. But whatever I do, I can't make it validate the value of incoming element.

I have this CODE element in wsdl <xs:element name="code" type="tns:riderStringValue"/> and current validation only checks, whether or not the element is present in the request. However it may be empty, and I'd love to prevent this situation by validation of the request.

The type riderStringValue is like this:

<xs:complexType name="riderStringValue">
    <xs:simpleContent>
        <xs:extension base="xs:string">
            <xs:attribute name="eId" type="xs:string" />
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>

and I'd need something like this:

<xs:complexType name="riderStringValue">
    <xs:simpleContent>
        <xs:extension base="tns:RiderCode">
            <xs:attribute name="eId" type="xs:string" />
        </xs:extension>
    </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="RiderCode">
    <xs:restriction base="xs:string">
        <xs:minLength value="3" />
        <xs:maxLength value="4" />
    </xs:restriction>
</xs:simpleType>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant