I am creating a SOAP service using JAX-WS and JAXB, by annotating the classes. My service implementation looks like this:
@Stateless
@Local(WSApplicationService.class)
@WebService(name = "WSApplicationService", serviceName = "WSApplicationService")
@BindingType(SOAPBinding.SOAP11HTTP_BINDING)
public class WSApplicationServiceImpl implements WSApplicationService {
@Override
@WebMethod
@WebResult(name = "reference")
public long submitApplication(@WebParam(name = "application") ApplicationSubmission application) throws SOAPException {
...
}
}
After asking this question, I learned that there's no way to specify certain restrictions on the input data using JAXB annotations. However, I need to restrict certain String properties to patterns (mainly postcodes and phone numbers). Therefore, I'm looking to customize the WSDL generated by above class. I can't find a way to access the WSDL though. Is there a way to override or customize the JAX-WS generated WSDL?