简体   繁体   中英

Is it possible to create a WS-client from WSDL file using Spring-WS? (It seems not)

I'd like to know if it's possible to create Web Services client from a WSDL file using Spring Web Services .

I mean from the very WSDL, I don't have any XSD for the time being.

But I've read Josh Long's "Spring Recipes A Problem-Solution Approach", Hamidreza Sattari's "Spring Web Services 2 Cookbook" and the tutorial itself ( 6. Using Spring Web Services on the Client ) and there's no reference to this feature.

I've also read other posts, like Webservice-Client: Common approach with Spring WS, JAXB and just one WSDL file? , or Spring-ws client from WSDL (here at stackoverflow) but without any further results.

I've even asked the question at Spring forums, but no responses after more than 60 reads: Is it possible to create a WS-client from WSDL file using SWS? (It seems not)

Maybe it's not possible.

Thanks.

You can do it this way:

  1. Generate your java types using the xjc tool that comes with the JDK distributions - xjc -wsdl file.wsdl

  2. Then using the generated java types, use WebserviceTemplate, described here to create the client.

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