└── InterfaceAndAbstractDemo ├── .classpath ├── .gitignore ├── .project ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs └── src ├── interfaceAndAbstractDemo ├── Abstracts │ ├── BaseCustomerManager.java │ ├── CustomerCheckService.java │ ├── CustomerService.java │ └── Entity.java ├── Adapters │ └── MernisServiceAdapter.java ├── Concretes │ ├── CustomerCheckManager.java │ ├── NeroCustomerManager.java │ └── StarbucksCustomerManager.java ├── Entities │ └── Customer.java └── Main.java └── tr └── gov └── nvi └── tckimlik └── WS ├── KPSPublic.java ├── KPSPublicLocator.java ├── KPSPublicSoap.java ├── KPSPublicSoapProxy.java └── KPSPublicSoapStub.java /InterfaceAndAbstractDemo/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | InterfaceAndAbstractDemo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jem.workbench.JavaEMFNature 16 | org.eclipse.jdt.core.javanature 17 | 18 | 19 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublic.java=UTF-8 3 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java=UTF-8 4 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java=UTF-8 5 | encoding//src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java=UTF-8 6 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.release=disabled 12 | org.eclipse.jdt.core.compiler.source=1.8 13 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Abstracts/BaseCustomerManager.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Abstracts; 2 | 3 | import interfaceAndAbstractDemo.Entities.Customer; 4 | 5 | public abstract class BaseCustomerManager implements CustomerService { 6 | 7 | @Override 8 | public void save(Customer customer) { 9 | System.out.println("Saved to db : " + customer.getFirstName()); 10 | 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Abstracts/CustomerCheckService.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Abstracts; 2 | 3 | import interfaceAndAbstractDemo.Entities.Customer; 4 | 5 | public interface CustomerCheckService { 6 | boolean checkkIfRealPerson(Customer customer); 7 | } 8 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Abstracts/CustomerService.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Abstracts; 2 | 3 | import interfaceAndAbstractDemo.Entities.Customer; 4 | 5 | public interface CustomerService { 6 | void save(Customer customer); 7 | } 8 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Adapters/MernisServiceAdapter.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Adapters; 2 | 3 | import java.rmi.RemoteException; 4 | 5 | import interfaceAndAbstractDemo.Abstracts.CustomerCheckService; 6 | import interfaceAndAbstractDemo.Entities.Customer; 7 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoap; 8 | import tr.gov.nvi.tckimlik.WS.KPSPublicSoapProxy; 9 | 10 | public class MernisServiceAdapter implements CustomerCheckService { 11 | 12 | @Override 13 | public boolean checkkIfRealPerson(Customer customer) { 14 | KPSPublicSoap soapClient = new KPSPublicSoapProxy(); 15 | boolean result = false; 16 | try { 17 | result = soapClient.TCKimlikNoDogrula(Long.parseLong(customer.getNationalityId()), customer.getFirstName(), customer.getLastName(), customer.getDateOfBirth()); 18 | } catch (NumberFormatException e) { 19 | e.printStackTrace(); 20 | } catch (RemoteException e) { 21 | e.printStackTrace(); 22 | } 23 | return result; 24 | 25 | } 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Concretes/CustomerCheckManager.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Concretes; 2 | 3 | import interfaceAndAbstractDemo.Abstracts.CustomerCheckService; 4 | import interfaceAndAbstractDemo.Entities.Customer; 5 | 6 | public class CustomerCheckManager implements CustomerCheckService { 7 | 8 | @Override 9 | public boolean checkkIfRealPerson(Customer customer) { 10 | // TODO Auto-generated method stub 11 | return false; 12 | } 13 | 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Concretes/NeroCustomerManager.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Concretes; 2 | 3 | import interfaceAndAbstractDemo.Abstracts.BaseCustomerManager; 4 | import interfaceAndAbstractDemo.Abstracts.CustomerCheckService; 5 | import interfaceAndAbstractDemo.Entities.Customer; 6 | 7 | public class NeroCustomerManager extends BaseCustomerManager{ 8 | private CustomerCheckService _customerCheckService; 9 | 10 | public NeroCustomerManager(CustomerCheckService customerCheckService) { 11 | super(); 12 | _customerCheckService = customerCheckService; 13 | } 14 | 15 | @Override 16 | public void save(Customer customer) { 17 | if (_customerCheckService.checkkIfRealPerson(customer)) 18 | { 19 | super.save(customer); 20 | } 21 | else { 22 | System.out.println("Not a valid person"); 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Concretes/StarbucksCustomerManager.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Concretes; 2 | 3 | import interfaceAndAbstractDemo.Abstracts.BaseCustomerManager; 4 | import interfaceAndAbstractDemo.Abstracts.CustomerCheckService; 5 | import interfaceAndAbstractDemo.Entities.Customer; 6 | 7 | public class StarbucksCustomerManager extends BaseCustomerManager { 8 | private CustomerCheckService _customerCheckService; 9 | 10 | public StarbucksCustomerManager(CustomerCheckService customerCheckService) { 11 | super(); 12 | _customerCheckService = customerCheckService; 13 | } 14 | 15 | @Override 16 | public void save(Customer customer) { 17 | if (_customerCheckService.checkkIfRealPerson(customer)) 18 | { 19 | super.save(customer); 20 | } 21 | else { 22 | System.out.println("Not a valid person"); 23 | } 24 | 25 | 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Entities/Customer.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo.Entities; 2 | 3 | 4 | 5 | import java.util.Date; 6 | 7 | import interfaceAndAbstractDemo.Abstracts.Entity; 8 | 9 | public class Customer implements Entity { 10 | private int id; 11 | private String firstName; 12 | private String lastName; 13 | private int dateOfBirth; 14 | private String nationalityId; 15 | public Customer(int id, String firstName, String lastName, int dateOfBirth, String nationalityId) { 16 | super(); 17 | this.id = id; 18 | this.firstName = firstName; 19 | this.lastName = lastName; 20 | this.dateOfBirth = dateOfBirth; 21 | this.nationalityId = nationalityId; 22 | } 23 | public int getId() { 24 | return id; 25 | } 26 | public void setId(int id) { 27 | this.id = id; 28 | } 29 | public String getFirstName() { 30 | return firstName; 31 | } 32 | public void setFirstName(String firstName) { 33 | this.firstName = firstName; 34 | } 35 | public String getLastName() { 36 | return lastName; 37 | } 38 | public void setLastName(String lastName) { 39 | this.lastName = lastName; 40 | } 41 | public int getDateOfBirth() { 42 | return dateOfBirth; 43 | } 44 | public void setDateOfBirth(int dateOfBirth) { 45 | this.dateOfBirth = dateOfBirth; 46 | } 47 | public String getNationalityId() { 48 | return nationalityId; 49 | } 50 | public void setNationalityId(String nationalityId) { 51 | this.nationalityId = nationalityId; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/interfaceAndAbstractDemo/Main.java: -------------------------------------------------------------------------------- 1 | package interfaceAndAbstractDemo; 2 | 3 | import java.rmi.RemoteException; 4 | 5 | 6 | import interfaceAndAbstractDemo.Abstracts.BaseCustomerManager; 7 | import interfaceAndAbstractDemo.Adapters.MernisServiceAdapter; 8 | import interfaceAndAbstractDemo.Concretes.StarbucksCustomerManager; 9 | import interfaceAndAbstractDemo.Entities.Customer; 10 | 11 | 12 | public class Main { 13 | 14 | public static void main(String[] args) throws RemoteException{ 15 | 16 | 17 | BaseCustomerManager customerManager = new StarbucksCustomerManager(new MernisServiceAdapter()); 18 | Customer customer=new Customer(1, "BURCU", "ARSLAN", 2001, ""); 19 | customerManager.save(customer); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/tr/gov/nvi/tckimlik/WS/KPSPublic.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublic.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublic extends javax.xml.rpc.Service { 11 | public java.lang.String getKPSPublicSoapAddress(); 12 | 13 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException; 14 | 15 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException; 16 | } 17 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/tr/gov/nvi/tckimlik/WS/KPSPublicLocator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicLocator.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicLocator extends org.apache.axis.client.Service implements tr.gov.nvi.tckimlik.WS.KPSPublic { 11 | 12 | public KPSPublicLocator() { 13 | } 14 | 15 | 16 | public KPSPublicLocator(org.apache.axis.EngineConfiguration config) { 17 | super(config); 18 | } 19 | 20 | public KPSPublicLocator(java.lang.String wsdlLoc, javax.xml.namespace.QName sName) throws javax.xml.rpc.ServiceException { 21 | super(wsdlLoc, sName); 22 | } 23 | 24 | // Use to get a proxy class for KPSPublicSoap 25 | private java.lang.String KPSPublicSoap_address = "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 26 | 27 | public java.lang.String getKPSPublicSoapAddress() { 28 | return KPSPublicSoap_address; 29 | } 30 | 31 | // The WSDD service name defaults to the port name. 32 | private java.lang.String KPSPublicSoapWSDDServiceName = "KPSPublicSoap"; 33 | 34 | public java.lang.String getKPSPublicSoapWSDDServiceName() { 35 | return KPSPublicSoapWSDDServiceName; 36 | } 37 | 38 | public void setKPSPublicSoapWSDDServiceName(java.lang.String name) { 39 | KPSPublicSoapWSDDServiceName = name; 40 | } 41 | 42 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() throws javax.xml.rpc.ServiceException { 43 | java.net.URL endpoint; 44 | try { 45 | endpoint = new java.net.URL(KPSPublicSoap_address); 46 | } 47 | catch (java.net.MalformedURLException e) { 48 | throw new javax.xml.rpc.ServiceException(e); 49 | } 50 | return getKPSPublicSoap(endpoint); 51 | } 52 | 53 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap(java.net.URL portAddress) throws javax.xml.rpc.ServiceException { 54 | try { 55 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(portAddress, this); 56 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 57 | return _stub; 58 | } 59 | catch (org.apache.axis.AxisFault e) { 60 | return null; 61 | } 62 | } 63 | 64 | public void setKPSPublicSoapEndpointAddress(java.lang.String address) { 65 | KPSPublicSoap_address = address; 66 | } 67 | 68 | /** 69 | * For the given interface, get the stub implementation. 70 | * If this service has no port for the given interface, 71 | * then ServiceException is thrown. 72 | */ 73 | public java.rmi.Remote getPort(Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 74 | try { 75 | if (tr.gov.nvi.tckimlik.WS.KPSPublicSoap.class.isAssignableFrom(serviceEndpointInterface)) { 76 | tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub _stub = new tr.gov.nvi.tckimlik.WS.KPSPublicSoapStub(new java.net.URL(KPSPublicSoap_address), this); 77 | _stub.setPortName(getKPSPublicSoapWSDDServiceName()); 78 | return _stub; 79 | } 80 | } 81 | catch (java.lang.Throwable t) { 82 | throw new javax.xml.rpc.ServiceException(t); 83 | } 84 | throw new javax.xml.rpc.ServiceException("There is no stub implementation for the interface: " + (serviceEndpointInterface == null ? "null" : serviceEndpointInterface.getName())); 85 | } 86 | 87 | /** 88 | * For the given interface, get the stub implementation. 89 | * If this service has no port for the given interface, 90 | * then ServiceException is thrown. 91 | */ 92 | public java.rmi.Remote getPort(javax.xml.namespace.QName portName, Class serviceEndpointInterface) throws javax.xml.rpc.ServiceException { 93 | if (portName == null) { 94 | return getPort(serviceEndpointInterface); 95 | } 96 | java.lang.String inputPortName = portName.getLocalPart(); 97 | if ("KPSPublicSoap".equals(inputPortName)) { 98 | return getKPSPublicSoap(); 99 | } 100 | else { 101 | java.rmi.Remote _stub = getPort(serviceEndpointInterface); 102 | ((org.apache.axis.client.Stub) _stub).setPortName(portName); 103 | return _stub; 104 | } 105 | } 106 | 107 | public javax.xml.namespace.QName getServiceName() { 108 | return new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublic"); 109 | } 110 | 111 | private java.util.HashSet ports = null; 112 | 113 | public java.util.Iterator getPorts() { 114 | if (ports == null) { 115 | ports = new java.util.HashSet(); 116 | ports.add(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "KPSPublicSoap")); 117 | } 118 | return ports.iterator(); 119 | } 120 | 121 | /** 122 | * Set the endpoint address for the specified port name. 123 | */ 124 | public void setEndpointAddress(java.lang.String portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 125 | 126 | if ("KPSPublicSoap".equals(portName)) { 127 | setKPSPublicSoapEndpointAddress(address); 128 | } 129 | else 130 | { // Unknown Port Name 131 | throw new javax.xml.rpc.ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName); 132 | } 133 | } 134 | 135 | /** 136 | * Set the endpoint address for the specified port name. 137 | */ 138 | public void setEndpointAddress(javax.xml.namespace.QName portName, java.lang.String address) throws javax.xml.rpc.ServiceException { 139 | setEndpointAddress(portName.getLocalPart(), address); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/tr/gov/nvi/tckimlik/WS/KPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoap.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public interface KPSPublicSoap extends java.rmi.Remote { 11 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException; 12 | } 13 | -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapProxy.java: -------------------------------------------------------------------------------- 1 | package tr.gov.nvi.tckimlik.WS; 2 | 3 | public class KPSPublicSoapProxy implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 4 | private String _endpoint = null; 5 | private tr.gov.nvi.tckimlik.WS.KPSPublicSoap kPSPublicSoap = null; 6 | 7 | public KPSPublicSoapProxy() { 8 | _initKPSPublicSoapProxy(); 9 | } 10 | 11 | public KPSPublicSoapProxy(String endpoint) { 12 | _endpoint = endpoint; 13 | _initKPSPublicSoapProxy(); 14 | } 15 | 16 | private void _initKPSPublicSoapProxy() { 17 | try { 18 | kPSPublicSoap = (new tr.gov.nvi.tckimlik.WS.KPSPublicLocator()).getKPSPublicSoap(); 19 | if (kPSPublicSoap != null) { 20 | if (_endpoint != null) 21 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 22 | else 23 | _endpoint = (String)((javax.xml.rpc.Stub)kPSPublicSoap)._getProperty("javax.xml.rpc.service.endpoint.address"); 24 | } 25 | 26 | } 27 | catch (javax.xml.rpc.ServiceException serviceException) {} 28 | } 29 | 30 | public String getEndpoint() { 31 | return _endpoint; 32 | } 33 | 34 | public void setEndpoint(String endpoint) { 35 | _endpoint = endpoint; 36 | if (kPSPublicSoap != null) 37 | ((javax.xml.rpc.Stub)kPSPublicSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint); 38 | 39 | } 40 | 41 | public tr.gov.nvi.tckimlik.WS.KPSPublicSoap getKPSPublicSoap() { 42 | if (kPSPublicSoap == null) 43 | _initKPSPublicSoapProxy(); 44 | return kPSPublicSoap; 45 | } 46 | 47 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException{ 48 | if (kPSPublicSoap == null) 49 | _initKPSPublicSoapProxy(); 50 | return kPSPublicSoap.TCKimlikNoDogrula(TCKimlikNo, ad, soyad, dogumYili); 51 | } 52 | 53 | 54 | } -------------------------------------------------------------------------------- /InterfaceAndAbstractDemo/src/tr/gov/nvi/tckimlik/WS/KPSPublicSoapStub.java: -------------------------------------------------------------------------------- 1 | /** 2 | * KPSPublicSoapStub.java 3 | * 4 | * This file was auto-generated from WSDL 5 | * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. 6 | */ 7 | 8 | package tr.gov.nvi.tckimlik.WS; 9 | 10 | public class KPSPublicSoapStub extends org.apache.axis.client.Stub implements tr.gov.nvi.tckimlik.WS.KPSPublicSoap { 11 | private java.util.Vector cachedSerClasses = new java.util.Vector(); 12 | private java.util.Vector cachedSerQNames = new java.util.Vector(); 13 | private java.util.Vector cachedSerFactories = new java.util.Vector(); 14 | private java.util.Vector cachedDeserFactories = new java.util.Vector(); 15 | 16 | static org.apache.axis.description.OperationDesc [] _operations; 17 | 18 | static { 19 | _operations = new org.apache.axis.description.OperationDesc[1]; 20 | _initOperationDesc1(); 21 | } 22 | 23 | private static void _initOperationDesc1(){ 24 | org.apache.axis.description.OperationDesc oper; 25 | org.apache.axis.description.ParameterDesc param; 26 | oper = new org.apache.axis.description.OperationDesc(); 27 | oper.setName("TCKimlikNoDogrula"); 28 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNo"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, false, false); 29 | oper.addParameter(param); 30 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Ad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 31 | param.setOmittable(true); 32 | oper.addParameter(param); 33 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "Soyad"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false); 34 | param.setOmittable(true); 35 | oper.addParameter(param); 36 | param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "DogumYili"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false); 37 | oper.addParameter(param); 38 | oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); 39 | oper.setReturnClass(boolean.class); 40 | oper.setReturnQName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrulaResult")); 41 | oper.setStyle(org.apache.axis.constants.Style.WRAPPED); 42 | oper.setUse(org.apache.axis.constants.Use.LITERAL); 43 | _operations[0] = oper; 44 | 45 | } 46 | 47 | public KPSPublicSoapStub() throws org.apache.axis.AxisFault { 48 | this(null); 49 | } 50 | 51 | public KPSPublicSoapStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 52 | this(service); 53 | super.cachedEndpoint = endpointURL; 54 | } 55 | 56 | public KPSPublicSoapStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 57 | if (service == null) { 58 | super.service = new org.apache.axis.client.Service(); 59 | } else { 60 | super.service = service; 61 | } 62 | ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); 63 | } 64 | 65 | protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 66 | try { 67 | org.apache.axis.client.Call _call = super._createCall(); 68 | if (super.maintainSessionSet) { 69 | _call.setMaintainSession(super.maintainSession); 70 | } 71 | if (super.cachedUsername != null) { 72 | _call.setUsername(super.cachedUsername); 73 | } 74 | if (super.cachedPassword != null) { 75 | _call.setPassword(super.cachedPassword); 76 | } 77 | if (super.cachedEndpoint != null) { 78 | _call.setTargetEndpointAddress(super.cachedEndpoint); 79 | } 80 | if (super.cachedTimeout != null) { 81 | _call.setTimeout(super.cachedTimeout); 82 | } 83 | if (super.cachedPortName != null) { 84 | _call.setPortName(super.cachedPortName); 85 | } 86 | java.util.Enumeration keys = super.cachedProperties.keys(); 87 | while (keys.hasMoreElements()) { 88 | java.lang.String key = (java.lang.String) keys.nextElement(); 89 | _call.setProperty(key, super.cachedProperties.get(key)); 90 | } 91 | return _call; 92 | } 93 | catch (java.lang.Throwable _t) { 94 | throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); 95 | } 96 | } 97 | 98 | public boolean TCKimlikNoDogrula(long TCKimlikNo, java.lang.String ad, java.lang.String soyad, int dogumYili) throws java.rmi.RemoteException { 99 | if (super.cachedEndpoint == null) { 100 | throw new org.apache.axis.NoEndPointException(); 101 | } 102 | org.apache.axis.client.Call _call = createCall(); 103 | _call.setOperation(_operations[0]); 104 | _call.setUseSOAPAction(true); 105 | _call.setSOAPActionURI("http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula"); 106 | _call.setEncodingStyle(null); 107 | _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); 108 | _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); 109 | _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); 110 | _call.setOperationName(new javax.xml.namespace.QName("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula")); 111 | 112 | setRequestHeaders(_call); 113 | setAttachments(_call); 114 | try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Long(TCKimlikNo), ad, soyad, new java.lang.Integer(dogumYili)}); 115 | 116 | if (_resp instanceof java.rmi.RemoteException) { 117 | throw (java.rmi.RemoteException)_resp; 118 | } 119 | else { 120 | extractAttachments(_call); 121 | try { 122 | return ((java.lang.Boolean) _resp).booleanValue(); 123 | } catch (java.lang.Exception _exception) { 124 | return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue(); 125 | } 126 | } 127 | } catch (org.apache.axis.AxisFault axisFaultException) { 128 | throw axisFaultException; 129 | } 130 | } 131 | 132 | } 133 | --------------------------------------------------------------------------------