• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

WSDL/XSD/SOAP Validation

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing SOAP web service. This web service expects a complex set of inputs from the user performs analytics on the data and returns calculation results.
The input business objects are modeled using XSD. I need to be able to specify business rules on the input data, such as:
- Decimal value should be between 1 and 100
- Date should not be less a certain date
- String length should not be greater than a certain number
Is it possible to build these rules in the WSDL/XSD itself?
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can do it on XSD.
Decimal data validation,
<simpleType name='Comp_Pr'>
<restriction base='decimal'>
<fractionDigits value='1'/>
<minInclusive value='1.0'/>
<maxInclusive value='100.0'/>
</restriction>
</simpleType
For the date validation, you can use the following rules.
pattern
enumeration
whiteSpace
maxInclusive
maxExclusive
minInclusive
minExclusive
String Length:
<simpleType name='input_string'>
<restriction base='string'>
<maxLength value='50'/>
</restriction>
</simpleType>
Hope this might help you.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic