This evening, I was trying to play a little bit with GlassFish server to familiarize myself with it. I created a simple web service and deployed it to the server.
I followed the top-down approach by creating a wsdl, generating the stub code and writing my logic in the Impl class. I then deployed it to the server. When it came to testing the service, it took me some time to figure out what the endpoint of my web service was.
Here is where you can find the endpoint: Even though you have given a different address in the location element of the wsdl that you used to generate the stub, this address is overwritten in the wsdl file that is generated when you generate the stub code. Look under <Project Root Folder>/WebContent/WEB-INF/wsdl/<PortName in your WSDL>.wsdl for the new address as shown in the picture.
It looks like the endpoint for both top-down and bottom-up approaches will be in the following format
http://<Host>:<Port>/<Application Name>/services/<Port Name in your WSDL>
I followed the top-down approach by creating a wsdl, generating the stub code and writing my logic in the Impl class. I then deployed it to the server. When it came to testing the service, it took me some time to figure out what the endpoint of my web service was.
Here is where you can find the endpoint: Even though you have given a different address in the location element of the wsdl that you used to generate the stub, this address is overwritten in the wsdl file that is generated when you generate the stub code. Look under <Project Root Folder>/WebContent/WEB-INF/wsdl/<PortName in your WSDL>.wsdl for the new address as shown in the picture.
Web Service Endpoint - GlassFish Server 3.1 |
It looks like the endpoint for both top-down and bottom-up approaches will be in the following format
http://<Host>:<Port>/<Application Name>/services/<Port Name in your WSDL>