2

I have multiple services defined as Java classes (@WebService) which share the same WebFault classes (@WebFault).
I use the java2ws for generating the WSDL and XSD files for the services.
While I can reuse the model objects between the services by using the JAXB XmlSchema "location" property and generating them once into a shared XSD file, the web faults are generated into each WSDL.
The problem is that if I try to generate code from the WSDL files in .Net for example I will have the web fault classes defined multiple times.
Any help will be appreciated.
Avner

Avner Levy
  • 6,601
  • 9
  • 53
  • 92

1 Answers1

0

Maybe you can try setting a name to your @WebFault

@WebFault(name = "EmployeeSearchFault") 
public class SearchEmployeeException extends Exception {
    --- 
}

If not give the exact scenario so I can try out.

Jon Lin
  • 142,182
  • 29
  • 220
  • 220
AMKhan
  • 131
  • 1
  • 4
  • I already used the name field. The problem is that the fault will be generated again and again in each service which use it. – Avner Levy Jul 12 '12 at 09:48