Pages

How to make wave services for Java in NetBeans

Server view
1. Open a new Project where category is wave and project type is wave application. Select Apache Tomcat as server.
2. Add a new ‘Web service’ file to your project (in ‘Source Packages’ > ‘your package’).
3. Add required operations (methods) to the new web service file.
Got to ‘Web Services’ from tree view. There you will see that a file is created corresponding to your newly created ‘Web service’ file. Click right mouse on that file and go to property. A window will appear. Copy the string bellow ‘NewWebServices’ heading from that window. E. g. - “http://localhost:8084/WebApplication1/NewWebService?wsdl.” We call it wsdl string.
Run the project.


Client view

For JSP:
1. Open a new Project where category is wave and project type is wave application. Select Apache Tomcat as server.
2. Add a new ‘Web Service Client’ to your project. When you are going to create new ‘Web Service Client’ a window will appear. Select ‘WSDL URL’ from radio button group. Paste the wsdl string “http://localhost:8084/WebApplication1/NewWebService?wsdl” to ‘WSDL URL’ field. ‘Web Service References’ will be created.
3. Explore ‘Web Service References’. You will see all method references under ‘YourWebServicePorts’. Drag your desired method name (e.g. getMyName()) and put it to desired code position of .jsp (e.g. index.jsp) file. Necessary code to access the method will generate automatically. Run the project.

For PHP:
Install 'WampServer2.0a(2).exe' in your local host. Do enable 'php_soap.dll' in php.ini file of both 'C:\wamp\bin\php\php5.2.5' and 'C:\wamp\bin\apache\apache2.2.6\bin' directory. Here doing enable means deleting ';' from front of the 'php_soap.dll' statement.

Example 1: