Here we will see how to convert corba application into WSDL application.
Following should be installed on your System:
1. JDK should be installed in your system.
2. Apache axis should be installed in your system. If you don’t have download here. CLASSPATH: 1.You need to set class path for JAVA_HOME = C:Program FilesJavajdk1.6.0_21
2. Need to set classpath for Apache axis like AXIS2_HOME = E:Axis2axis2-1.5.2
Steps to convert IDL application to WSDL application.
Step1:
Create IDL which you want to convert into wsdl.
Step2:
Compile IDL and create Java Classes using idlj tool.
Syntax: idlj –fall idlname.idl
Step3:
Create Implementation class which contains implementation of idl methods. Now you finished corba side. And you should have interface like below.
Interface Example
package loggingService.logWriting;import javax.jws.WebMethod;import javax.jws.WebService;@WebServicepublic interface LogInterface {@WebMethod public String log(String eventTime,String eventId,String eventSource,String affectedObject,String specificInformation);}
Implementation Class Example:
package loggingService.logWriting;
import javax.jws.WebService;
@WebService(endpointInterface = “loggingService.logWriting.LogInterface”)
public class LoggerImpl implements LogInterface
{
public String log(String eventTime,
String eventId,
String eventSource,
String affectedObject,
String specificInformation) {
return “Suceess”;
}
}
Step 4:
Above Steps are usual CORBA steps as you know.I didn’t explain completely.
Now we go for WSDL side. Create new folder it should contain META-INF folder and java classes. Inside the META-INF folder you should have services.xml file like below.
Create services.xml file.
Example
<service name=”LoggerImplService”>
<description>
This service is to get the running Axis version
</description>
<parameter name=”ServiceClass”>loggingService.logWriting.LoggerImpl</parameter>
<operation name=”log”>
<messagereceiver class=”org.apache.axis2.rpc.receivers.RPCMessageReceiver”>
</messagereceiver></operation>
</service>
Step5:
Go to Dos prompt and go to folder which contains META-INF folder and java classes. Now
Create jar file. jar –cvf filename.jar * It will create jar file inside the same folder.
Step6:
Now rename your jar file to aar file.
Step7:
Copy the aar file into following location.
E:Axis2axis2-1.5.2repositoryservices
Step8:
Now you can deploy on axis2server.bat
Go to following location.
E:Axis2axis2-1.5.2bin
Click axis2server.bat
Check it deployed successfully. It should be like below.
![]()
Step 9:
Now you can open wsdl in any browser. And you can see web service methods.
Step 10:
Write client program to access web services it may a java program or flex program.
I used flex as client program.First Download Adobe Builder then copy and paste following client program.
Then run flex program.
Check client program here.
