/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.entity;
/**
*
* @author nurhak.kaya
*/
public enum Gender {
Male("Erkek"),
Female("Bayan");
String value;
public String getValue() {
return value;
}
private Gender(String value) {
this.value = value;
}
}
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.entity;
/**
*
* @author nurhak.kaya
*/
public enum Gender {
Male("Erkek"),
Female("Bayan");
String value;
public String getValue() {
return value;
}
private Gender(String value) {
this.value = value;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.entity;
/**
*
* @author nurhak.kaya
*/
public class KimlikEntity {
String tcKimlikNo, name, surname, address, sucDurum;
public String getTcKimlikNo() {
return tcKimlikNo;
}
public void setTcKimlikNo(String tcKimlikNo) {
this.tcKimlikNo = tcKimlikNo;
}
public KimlikEntity(String tcKimlikNo) {
this.tcKimlikNo = tcKimlikNo;
}
public KimlikEntity() {
}
//Gender gender;
String gender;
public KimlikEntity(String tcKimlikNo, String name, String surname,
String address, String gender, SucDurum sucDurum) {
this.tcKimlikNo = tcKimlikNo;
this.name = name;
this.surname = surname;
this.address = address;
this.gender = gender;
this.sucDurum = sucDurum.getValue();
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getGender() {
return gender;
}
/*public Gender getGender() {
return gender;
}
*
*/
public void setGender(String gender) {
this.gender = gender;
}
public String getSucDurum() {
return sucDurum;
}
public void setSucDurum(String sucDurum) {
this.sucDurum = sucDurum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSurname() {
return surname;
}
public void setSurname(String surname) {
this.surname = surname;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.entity;
/**
*
* @author nurhak.kaya
*/
public enum SucDurum {
Suclu("Aranıyor"),
Sucsuz("Olumsuzluk Yok");
String value;
public String getValue() {
return value;
}
private SucDurum(String value) {
this.value = value;
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package net.servis;
import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import net.ucngm.kgys.polnet.entity.Gender;
import net.ucngm.kgys.polnet.entity.KimlikEntity;
import net.ucngm.kgys.polnet.entity.SucDurum;
/**
*
* @author nurhak.kaya
*/
@WebService(serviceName = "KimlikSorgu")
public class KimlikSorgu {
/**
* Web service operation
*/
@WebMethod(operationName = "KimlikSorgulama")
@WebResult(name="KimlikBilgi")
public KimlikEntity KimlikSorgulama(@WebParam(name = "tcKimlikNo") String tcKimlikNo) {
//TODO write your implementation code here:
KimlikEntity ke = new KimlikEntity();
if (tcKimlikNo.compareTo("123456789") == 0) {
ke.setTcKimlikNo(tcKimlikNo);
ke.setName("Mahmut");
ke.setSurname("Okur");
ke.setAddress("Bornova Mevlana");
ke.setGender(Gender.Male.getValue());
ke.setSucDurum(SucDurum.Suclu.getValue());
} else {
ke.setTcKimlikNo(tcKimlikNo);
ke.setName("Nebalet");
ke.setSurname("Yazar");
ke.setAddress("Buca Kaynaklar");
ke.setGender(Gender.Female.getValue());
ke.setSucDurum(SucDurum.Sucsuz.getValue());
}
return ke;
}
}
Comments
Post a Comment