Reputation: 12363
Currently, we are generating a single Stub from a given WSDL file using the following command:
wsdl2java -uri "filename.wsdl"
This generates a single Java Stub containing all the function calls etc. The problem is this time the size of the generated Java Stub is more than 20mb which makes it difficult to compile, debug and reuse.
Can someone suggest a method to generate segregated Java files instead of a single Stub.
Else can someone suggest some other method to handle large WSDL files via Java Web Services.
Upvotes: 2
Views: 4007
Reputation: 25390
When generating the stub, wsdl2java normally generates the databinding classes as inner classes of the stub class. So all of your databinding classes are included in the stub class file, adding to the file's size.
The wsdl2java parameter -u
causes it to generate the databinding classes as regular classes, each in its own file. That would reduce the size of the stub class file, though you'd still end up with the same amount of code overall.
Upvotes: 2
Reputation: 28951
I think the only manageable way is to make the wsdl generated classes as a separate module. So, it should be compiled once, placed into maven repository and then used as a .jar
.
Also you could give a try to use the standard jaxws, or also CXF which is more powerful and modern, maybe it would generate the code better.
Upvotes: 1