cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Roberts <>
Subject Re: generating client stubs for all available services
Date Wed, 25 Feb 2009 10:27:15 GMT
Tedman Leung wrote:
> As it is now, I just have a shell script which runs WSDLToJava in a loop 
> for all my services but it means I have 2 lists, one in a shell script and 
> another on the server (I'm using spring so it's listed in a spring 
> config). It's no big deal but every once in a while some one forgets to 
> update one or the other and the two lists are no longer in sync. it would 
> be easier if it just looked at the service listing and ran it against all 
> the services listed.

More a workaround than a solution, but rather than maintaining the list
in your shell script by hand you can generate it dynamically from the
service list HTML page that CXF provides.  If you have lwp-request (part
of the libwww Perl library, you might need some other modules too) then
in your shell script you can do something like:

lwp-request -o links http://my.server:8080/app/services \
  | grep '^A\W' \
  | cut -f2

This will read the services list page from the server and output a list
of the links it contains (i.e. the WSDLs).


Ian Roberts               | Department of Computer Science  | University of Sheffield, UK

View raw message