I know how to write a webservice but I need some clarity on how it works.
As per my understanding, whenever we deploy a webservice using java annotations , the wsdl will be automatically generated by the application server during deployment.
This is the wsdl we ll get when we hit the webservice URL. But my teammate told me that when we deploy a webservice in to the server, the development team will put the wsdl file (Contract first) into the src/main/resources location and server will use that wsdl file to deploy the webservice in the server and also this is the wsdl url we ll get when we hit the webserivce url.
I dont believe this, I think even if we put the WSDL file as part of java project workspace, the application server will automatically generate a new wsdl using the annotations which we provided in the java class and that automatically created wsdl will be returned when we hit the webservice http URL . Please advise whether my understanding is correct or my teammate's. Thanks !!!
Well, couldn't you test by not putting the wsdl file there and see if it's automatically generated?
It's everyday, bro
posted 1 month ago
Al Hobbs wrote:Well, couldn't you test by not putting the wsdl file there and see if it's automatically generated?
Thanks for your reply !!!
I know for a fact that WSDL will get automatically generated if we annotate the class as webservice.
I have did this many times before. But my teammate said there is a maven archetype available where we will put the wsdl in the resource directory and it will be deployed as part of service deployment and this is the file which will get returned when we hit the service url.
I don't know much about the archetype details to test and see if that is the case. That's why I wanted to get a clarity on how wsdl works in a webservice .