• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

web service function parameter format limitation and validatioin question  RSS feed

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

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">
<complexType>
<sequence>
<element name="SSN" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>


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.

thanks,
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!