I would like to define 5 classes with an @WebService annotation on them and use wsgen to create a single wsdl for all of them. Each class would be its own port. I've been reading the wsgen documentation and this doesn't seem possible. But, when I look at the wsdl spec, it appears to be possible. http://www.w3.org/TR/wsdl#_ports Does anyone know how to do this with wsgen?
Asked
Active
Viewed 1,424 times
1 Answers
2
I'm not familiar with wsgen, however... as far as I know, you can have only one class fronting a webservice. However, you can define multiple operations, with each operation being a distinct method in your class. Maybe you can do something like this:
- Define your 5 classes as normal
- Define a 'fronting' class with a separate method that calls into each of your original 5 classes.
- Run your 'fronting' class through
wsgen
to create a WSDL with 5 separate operations (one for each class)
As a side note, it's generally better to define webservices top-down rather than bottom-up. Create the WSDL first, and then use something like wsdl2java
to create the java skeleton.

Christian Specht
- 35,843
- 15
- 128
- 182

Eric
- 31
- 2