简体   繁体   中英

How generate wsdl or/and client source from class with Spring @Endpoint by maven plugin?

There is jasws-maven-plugin which can be used to generate wsdl or/and client code from classes with @javax.jws.Webservice annotation. Is there plugin which can generate wsdl or/and client code from classes with spring @Endpoint ( org.springframework.ws.server.endpoint.annotation.Endpoint ) annotation?

Important

I know that there is org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition bean that scans classes with @Endpoint and generate wsdl. But this generation occurs in runtime! And I want to generate on compile time with maven plugin, without packaging web application and going to the some url.

You can use wsgen to generate the wsdl.

From the example in the documentation

wsgen -wsdl -d stock -cp myclasspath stock.StockService This will generate the wsdl and schema files in the "stock" directory.

There is also a wsgen Ant task .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM