Modifying the empinfoclient.java file – HP Integrity NonStop J-Series User Manual
Page 274
![background image](/manuals/397993/274/background.png)
Figure 126 New Java Class Dialog Box
The EmpInfoClient.java class file under the EmpInfoClient package is created.
Modifying the EmpInfoClient.java File
Modify the newly created class file EmpInfoClient.java file so that it appears as:
package com.hp.client;
import java.util.Scanner;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class EmpInfoClient {
public static void main(String [] args) throws AxisFault {
String a;
ServiceClient client = new ServiceClient();
// create option object
Options opts = new Options();
// setting target EPR
opts.setTo(new EndpointReference("http://
directory>/axis2/services/EmpInfo"));
// Setting action ,and which can be found from the wsdl of the service
Scanner scan=new Scanner(System.in);
do
{
System.out.println("To Insert Employee press 1 \n"+"For Employee Details press 2 \n"+"To Delete Employee
press 3");
274
Integrating Frameworks