├── CustomerManagementSystem
├── .classpath
├── .gitignore
├── .project
├── .settings
│ ├── org.eclipse.core.resources.prefs
│ └── org.eclipse.jdt.core.prefs
└── src
│ ├── Main.java
│ ├── abstracts
│ ├── CustomerCheckManager.java
│ └── CustomerManager.java
│ ├── adapters
│ └── MernisServiceAdapter.java
│ ├── entities
│ └── Customer.java
│ ├── interfaces
│ ├── CustomerCheckService.java
│ ├── CustomerService.java
│ ├── Entity.java
│ ├── RealPersonService.java
│ └── Result.java
│ ├── services
│ ├── NeroCustomerManager.java
│ ├── StarbucksCustomerCheckManager.java
│ └── StarbucksCustomerManager.java
│ ├── tr
│ └── gov
│ │ └── nvi
│ │ └── tckimlik
│ │ └── WS
│ │ ├── KPSPublic.java
│ │ ├── KPSPublicLocator.java
│ │ ├── KPSPublicSoap.java
│ │ ├── KPSPublicSoapProxy.java
│ │ └── KPSPublicSoapStub.java
│ └── utils
│ ├── CheckServiceUtils.java
│ └── Result.java
└── README.md
/CustomerManagementSystem/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | CustomerManagementSystem
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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/.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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/.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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/Main.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smtdeveloper/CustomerManagementSystem/baaf1b57810016131f00ffd4cb3d2a06f51cbfdb/CustomerManagementSystem/src/Main.java
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/abstracts/CustomerCheckManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smtdeveloper/CustomerManagementSystem/baaf1b57810016131f00ffd4cb3d2a06f51cbfdb/CustomerManagementSystem/src/abstracts/CustomerCheckManager.java
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/abstracts/CustomerManager.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smtdeveloper/CustomerManagementSystem/baaf1b57810016131f00ffd4cb3d2a06f51cbfdb/CustomerManagementSystem/src/abstracts/CustomerManager.java
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/adapters/MernisServiceAdapter.java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smtdeveloper/CustomerManagementSystem/baaf1b57810016131f00ffd4cb3d2a06f51cbfdb/CustomerManagementSystem/src/adapters/MernisServiceAdapter.java
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/entities/Customer.java:
--------------------------------------------------------------------------------
1 | package entities;
2 |
3 | import java.sql.Date;
4 |
5 | import interfaces.Entity;
6 |
7 | public class Customer implements Entity {
8 |
9 | private int id;
10 | private String firstName;
11 | private String lastName;
12 | private String identityNumber;
13 | private Date birthDate;
14 |
15 | public Customer() {
16 |
17 | }
18 |
19 | public Customer(int id, String firstName, String lastName, String identityNumber, Date birthDate) {
20 | super();
21 | this.id = id;
22 | this.firstName = firstName;
23 | this.lastName = lastName;
24 | this.identityNumber = identityNumber;
25 | this.birthDate = birthDate;
26 | }
27 |
28 | public int getId() {
29 | return id;
30 | }
31 | public void setId(int id) {
32 | this.id = id;
33 | }
34 | public String getFirstName() {
35 | return firstName;
36 | }
37 | public void setFirstName(String firstName) {
38 | this.firstName = firstName;
39 | }
40 | public String getLastName() {
41 | return lastName;
42 | }
43 | public void setLastName(String lastName) {
44 | this.lastName = lastName;
45 | }
46 | public String getIdentityNumber() {
47 | return identityNumber;
48 | }
49 | public void setIdentityNumber(String identityNumber) {
50 | this.identityNumber = identityNumber;
51 | }
52 | public Date getBirthDate() {
53 | return birthDate;
54 | }
55 | public void setBirthDate(Date birthDate) {
56 | this.birthDate = birthDate;
57 | }
58 |
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/interfaces/CustomerCheckService.java:
--------------------------------------------------------------------------------
1 | package interfaces;
2 |
3 | import entities.Customer;
4 |
5 |
6 | public interface CustomerCheckService {
7 |
8 | Result CheckIfRealPerson(Customer customer);
9 | Result CheckIfYoungerAgeThan(Customer customer, int age);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/interfaces/CustomerService.java:
--------------------------------------------------------------------------------
1 | package interfaces;
2 |
3 | import entities.Customer;
4 |
5 | public interface CustomerService {
6 |
7 | void add(Customer customer);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/interfaces/Entity.java:
--------------------------------------------------------------------------------
1 | package interfaces;
2 |
3 | public interface Entity {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/interfaces/RealPersonService.java:
--------------------------------------------------------------------------------
1 | package interfaces;
2 |
3 | import entities.Customer;
4 |
5 | public interface RealPersonService {
6 |
7 | Result CheckIfRealPerson(Customer customer);
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/interfaces/Result.java:
--------------------------------------------------------------------------------
1 | package interfaces;
2 |
3 | public interface Result {
4 |
5 | boolean isSuccess();
6 | String getMessage();
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/services/NeroCustomerManager.java:
--------------------------------------------------------------------------------
1 | package services;
2 |
3 | import abstracts.CustomerManager;
4 |
5 | public class NeroCustomerManager extends CustomerManager {
6 |
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/services/StarbucksCustomerCheckManager.java:
--------------------------------------------------------------------------------
1 | package services;
2 |
3 | import abstracts.CustomerCheckManager;
4 | import entities.Customer;
5 | import interfaces.RealPersonService;
6 | import interfaces.Result;
7 |
8 | public class StarbucksCustomerCheckManager extends CustomerCheckManager {
9 |
10 | private RealPersonService realPersonService;
11 |
12 | public StarbucksCustomerCheckManager(RealPersonService realPersonService){
13 | this.realPersonService = realPersonService;
14 | }
15 |
16 | @Override
17 | public Result CheckIfRealPerson(Customer customer) {
18 |
19 | return realPersonService.CheckIfRealPerson(customer);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/services/StarbucksCustomerManager.java:
--------------------------------------------------------------------------------
1 | package services;
2 |
3 | import abstracts.CustomerManager;
4 | import entities.Customer;
5 | import interfaces.CustomerCheckService;
6 | import interfaces.Result;
7 | import utils.CheckServiceUtils;
8 |
9 | public class StarbucksCustomerManager extends CustomerManager {
10 |
11 | private CustomerCheckService customerCheckService;
12 |
13 |
14 | public StarbucksCustomerManager(CustomerCheckService customerCheckService) {
15 | this.customerCheckService = customerCheckService;
16 | }
17 |
18 |
19 | @Override
20 | public void add(Customer customer) {
21 |
22 | Result result = CheckServiceUtils.runCheckServices(new Result[] {
23 | customerCheckService.CheckIfRealPerson(customer),
24 | customerCheckService.CheckIfYoungerAgeThan(customer, 15)
25 | });
26 |
27 | if(!result.isSuccess()) {
28 | System.out.println(result.getMessage());
29 | return;
30 | }
31 |
32 | super.add(customer);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/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 | }
--------------------------------------------------------------------------------
/CustomerManagementSystem/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 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/utils/CheckServiceUtils.java:
--------------------------------------------------------------------------------
1 | package utils;
2 |
3 | import interfaces.Result;
4 |
5 | public class CheckServiceUtils {
6 |
7 | public static Result runCheckServices(Result[] customerCheckServices) {
8 | for (Result customerCheckService : customerCheckServices) {
9 | if(!customerCheckService.isSuccess()) {
10 | return customerCheckService;
11 | }
12 | }
13 | return new utils.Result(true);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/CustomerManagementSystem/src/utils/Result.java:
--------------------------------------------------------------------------------
1 | package utils;
2 |
3 | public class Result implements interfaces.Result {
4 |
5 | private boolean success;
6 | private String message;
7 |
8 | public Result(boolean success) {
9 | this.success = success;
10 | }
11 |
12 | public Result(Boolean success, String message) {
13 | this(success);
14 | this.message = message;
15 | }
16 |
17 | public boolean isSuccess() {
18 | return success;
19 | }
20 |
21 | public String getMessage() {
22 | return message;
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # CustomerManagementSystem
3 |
4 |
Customer Management System - müşteri yönetim sistemi / Mernis ile TC Doğrulama
5 |
6 | SMTcoder : Projeye yıldız Vermeyi Unutmayın 🚀 Teşekkürler! ❤️
7 |
8 |
9 |
10 |
11 | MERNİS ( Kimlik Doğrulama Servisi ) Projeye Ekleme
12 | Üst menüden, "File - New - Project"
13 |
14 | 
15 |
16 |
17 | Wizards: kısmında "Java Project" yazıp, alt taraftan "Java Project" yazanı seçip "Next" butonuna basıyoruz.
18 | !
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | Project name "MernisTest" olarak açıyorum, "Use an execution environment JRE:" kısmından JavaSE-1.8 seçiyoruz. (Mernis servisi için stabil sürüm) ve "Finish" diyoruz.
27 | 
28 |
29 | Module name "MernisTest" olarak belirledim. "Don't Create" butonuna basıyorum ve projemi oluşturuyorum.
30 |
31 |
32 | 
33 |
34 | Oluşan projeme sağ tıklayıp, "New - Other" seçiyorum.
35 |
36 | 
37 |
38 | Wizards: kısmına "Web Service Client" yazıp, "Web Services altında ki Web Service Client" olanı seçiyorum ve "Next" butonuna basıyorum.
39 | 
40 |
41 | Service definition: kısmına "https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx?WSDL" adresini yapıştırıyorum ve "Finish" butonuna basıyorum.
42 |
43 | 
44 |
45 | Yine projemde "src" klasörüne sağ tıklayarak "New - Class" seçiyorum.
46 |
47 | 
48 |
49 | Package: kısmını boş bırakıyorum, Name: kısmına "Main" yazıyorum, [ ] public static void main. yazan kısmı seçiyorum ve "Finish" butonuna basıyorum.
50 |
51 |
52 | 
53 | Kırmızı çerçeveye aldığım her şeyi aynı şekilde yazarak projenizi mernis kimlik kontrolü ile birlikte çalıştırabilirsiniz.
54 |
55 |
56 | 
57 |
58 |
59 |
60 |
61 | Sosyal Medya Hesaplarım 😛
62 |
63 |
64 |
65 | instagram
66 |
67 |
68 |
69 |
70 | linkedin
71 |
72 |
73 |
74 |
75 | youtube
76 |
77 |
78 |
79 |
80 |
81 | Google Play uygulamalarım
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | Projeye yıldız Vermeyi Unutmayın 🚀
91 | Teşekkürler! ❤️
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------