Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Generated WSDL with schema validation
Joined: Nov 14, 2008
Mar 23, 2011 10:53:58
Is it possible to add schema restrictions to parameters via JAX-WS annotations?
I have a method
@WebMethod ReturnContainer<List<Street>> getStreets(@WebParam(name = "streetname")String streetname);
The parameter streetname should always be longer then 3 characters, to avoid gigantic result lists. I would like this to be a restriction in the schema like
<xs:element name="streename"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:minLength value="3"/> </xs:restriction> </xs:simpleType> </xs:element>
How can I make sure that the generated WSDL file includes such a restriction on the parameter?
It is sorta covered in the
JavaRanch Style Guide
subject: Generated WSDL with schema validation
in Schema Dynamic value for maxLength - help
Annotation for regular expression.
Axis 1.4 throwing org.xml.sax.SAXException: Invalid element
Invalid type (xsi:type) is set when XML request is generated from web service client
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013