Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Working with large wsdl, can we trim it?

My webservice provider give me a large WSDL file, but we are going to use only a few function inside.

I believe that the large WSDL have negative impact to the application performance.

We use the webservice in client appliction, startup time and memory usage are issues. Large WSDL means that jax-ws will takes longer to do binding and will takes more memory for the stub class.

Is is possible that we trim WSDL file to a lightweight version? Are there any tool for this purpose?

I do not think my webservice provider will generate another WSDL for us. We may have to do it auto in the build script.

like image 215
Dennis C Avatar asked Dec 31 '08 02:12

Dennis C


1 Answers

In short, your answers are "No tool, but you can DIY".

I wish there are simple tool can do it because my WSDL contains too many unused function and schema of data structure.

If I can automate it, WSDL -> trimmed WSDL -> generate client stubs classes. Nothing unused will be generated, no misuse, no maintenances required, we will not touch on the generated code, and I can really focus on the code which in use. Smaller JAR, shorter XML parse time. If the WSDL get updated, I will had only to rebuild client stubs classes and run unit test.

I tried to keep off from human invoked. It takes time, easily to get mistake, and have to redo every time every little change on the original WSDL.

I am not conversant on the WSDL schema. I am thinking can it be done by XSLT?

like image 173
Dennis C Avatar answered Oct 04 '22 23:10

Dennis C