• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

web service function parameter format limitation and validatioin question  RSS feed

Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am building a document/literal webservice in websphere. The WSDL is generated from exsting java bean.

in the java bean there is a function requesting passing in the social security number. In the generated WSDL it defines this part as:

<element name="findBySSN">
<element name="SSN" nillable="true" type="xsd:string"/>

My questions are:

1. How could I modify the WSDL and make it more restricted on the SSN number? - say it has to be 9 digit number without '-'. I saw some example using simple typed element and restrict on base string, but I tried on the above complex type, it has error.

2. Even I modifed the above wsdl and restrict the SSN format, then should my service also need to check the format of client passed in SSN parameter and throw user defined exception and map it to the WSDL as fault?

If someone can give me some help and advise, I would highly appreciate.

I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!