• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web service function parameter format limitation and validatioin question

grace smith
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.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic