I'm having some trouble understanding exactly how to relate XSD types I
already have to WSDL, where I want to reuse them. If someone could point
me in a good direction, I'd be very grateful.
I have, for instance, a schema in which I define:
<xs:simpleType name="ssn-type">
<xs:restriction base="xs:string">
<xs:pattern
value="[1-8][0-9]{8}|(?:0(?!0{8}))[0-9]{8}|(?:9(?!9{8}))[0-9]{8}"/>
</xs:restriction>
</xs:simpleType>
(a standard SSN but not all 0s or all 9s - this is the customer's
requirement)
I would like to use this to validate the SSN (in the WSDL, in other
words) for this class:
@XmlType(name = "Identity")
public class IdentityImpl implements Identity
{
private String ssn;
// a bunch of other properties
/**
* @see com.datasourceinc.abis.ws.fingerprint.Identity#getSsn()
*/
@Override
public String getSsn()
{
return ssn;
}
public void setSsn(String ssn)
{
this.ssn = ssn;
}
// the rest of the getters and setters
I have tried a variety of annotations on the getSsn() method and the
entire class without success. Can anyone suggest anything that will do
what I want?
Thanks!
David Sills