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.
Generating a WSDL From a Web Service Class On the Project Explorer or Navigator tab, right-click the web service class and select Web Services > Generate WSDL.
A Web Services Description Language (WSDL) document specifies the interface to a web service, and enables a web service client to start it. A WSDL document that is generated from a message model defines web service requests and responses in terms of the messages that you have defined in that message model.
You can do it this way:
Generate your java types using the xjc tool that comes with the JDK distributions - xjc -wsdl file.wsdl
Then using the generated java types, use WebserviceTemplate, described here to create the client.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With