├── .mvn └── wrapper │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── easywsdl ├── ExKsoap2-1.0.4.0.jar └── ksoap2-android-assembly-3.6.4-jar-with-dependencies.jar ├── src ├── main │ ├── java │ │ └── com │ │ │ └── starbucks │ │ │ └── starbucks │ │ │ ├── entity │ │ │ ├── enums │ │ │ │ └── Role.java │ │ │ ├── Edevlet.java │ │ │ └── User.java │ │ │ ├── exception │ │ │ ├── UserException.java │ │ │ ├── EdevletException.java │ │ │ └── GeneralExceptionHandle.java │ │ │ ├── repository │ │ │ ├── UserRepository.java │ │ │ └── EdevletRepository.java │ │ │ ├── service │ │ │ ├── abstracts │ │ │ │ ├── EdevletService.java │ │ │ │ └── UserService.java │ │ │ ├── dto │ │ │ │ ├── request │ │ │ │ │ ├── UpdateUserRequest.java │ │ │ │ │ └── CreateUserRequest.java │ │ │ │ └── response │ │ │ │ │ ├── GetUserResponse.java │ │ │ │ │ ├── GetAllUsersResponse.java │ │ │ │ │ ├── UpdateUserResponse.java │ │ │ │ │ └── CreateUserResponse.java │ │ │ └── concretes │ │ │ │ ├── EdevletServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ │ ├── StarbucksApplication.java │ │ │ ├── config │ │ │ └── GeneralConfig.java │ │ │ ├── adapter │ │ │ ├── EDUDateTimeConverter.java │ │ │ ├── EDUMarshalGuid.java │ │ │ ├── docs │ │ │ │ ├── Html │ │ │ │ │ ├── EDUKPSPublicSoap_methods.html │ │ │ │ │ ├── EDUKPSPublicSoap12_methods.html │ │ │ │ │ ├── EDUKPSPublicSoap.html │ │ │ │ │ ├── EDUKPSPublicSoap12.html │ │ │ │ │ ├── MTOMTransfer.html │ │ │ │ │ └── Tips.html │ │ │ │ ├── Index.html │ │ │ │ └── Styles │ │ │ │ │ └── Blueprint_Styles │ │ │ │ │ └── Style.css │ │ │ ├── Metadata.info │ │ │ ├── EDUStandardDateTimeConverter.java │ │ │ ├── EDUHelper.java │ │ │ ├── EDUKPSPublicSoap.java │ │ │ ├── EDUKPSPublicSoap12.java │ │ │ └── EDUExtendedSoapSerializationEnvelope.java │ │ │ └── api │ │ │ └── controller │ │ │ └── UsersController.java │ └── resources │ │ └── application.properties └── test │ └── java │ └── com │ └── starbucks │ └── starbucks │ └── StarbucksApplicationTests.java ├── README.md ├── .gitignore ├── pom.xml ├── mvnw.cmd └── mvnw /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammetTahaDemiryol/starbucks-member/HEAD/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /easywsdl/ExKsoap2-1.0.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammetTahaDemiryol/starbucks-member/HEAD/easywsdl/ExKsoap2-1.0.4.0.jar -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/entity/enums/Role.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.entity.enums; 2 | 3 | public enum Role { 4 | ADMIN,USER 5 | } -------------------------------------------------------------------------------- /easywsdl/ksoap2-android-assembly-3.6.4-jar-with-dependencies.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MuhammetTahaDemiryol/starbucks-member/HEAD/easywsdl/ksoap2-android-assembly-3.6.4-jar-with-dependencies.jar -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/exception/UserException.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.exception; 2 | 3 | public class UserException extends RuntimeException{ 4 | public UserException(String s) { 5 | super(s); 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/exception/EdevletException.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.exception; 2 | 3 | public class EdevletException extends RuntimeException{ 4 | public EdevletException(String message) { 5 | super(message); 6 | } 7 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Starbucks member app 2 | 3 | * In the starbucks registration application, when users want to register, they can register with real e-government or fake e-government services after checking their national identity number, name, surname and date of birth and verifying the accuracy of the information. -------------------------------------------------------------------------------- /src/test/java/com/starbucks/starbucks/StarbucksApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class StarbucksApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.repository; 2 | 3 | import com.starbucks.starbucks.entity.User; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | public interface UserRepository extends JpaRepository { 7 | boolean existsByIdentityNumber(String identityNumber); 8 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/abstracts/EdevletService.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.abstracts; 2 | 3 | import com.starbucks.starbucks.service.dto.request.CreateUserRequest; 4 | 5 | public interface EdevletService { 6 | boolean checkUserIsReal(CreateUserRequest createUserRequest); 7 | boolean checkUserWithMernis(CreateUserRequest createUserRequest) throws Exception; 8 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/StarbucksApplication.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class StarbucksApplication{ 8 | public static void main(String[] args) { 9 | SpringApplication.run(StarbucksApplication.class, args); 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 2 | spring.jpa.hibernate.ddl-auto=update 3 | spring.datasource.url=jdbc:postgresql://localhost:5432/starbucks 4 | spring.datasource.username=postgres 5 | spring.datasource.password=serversql 6 | spring.jpa.show-sql=true 7 | spring.jpa.properties.javax.persistence.validation.mode=none 8 | ############### 9 | default.role="USER" -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/repository/EdevletRepository.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.repository; 2 | 3 | import com.starbucks.starbucks.entity.Edevlet; 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | 6 | import java.time.LocalDate; 7 | 8 | public interface EdevletRepository extends JpaRepository { 9 | boolean existsByNameAndSurnameAndIdentityNumberAndBirthDay(String name, String surName, String identityNumber 10 | , LocalDate birthDay); 11 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/config/GeneralConfig.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.config; 2 | 3 | import com.starbucks.starbucks.adapter.EDUKPSPublicSoap; 4 | import org.modelmapper.ModelMapper; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | 8 | @Configuration 9 | public class GeneralConfig { 10 | @Bean 11 | public ModelMapper createModelMapper(){ 12 | return new ModelMapper(); 13 | } 14 | @Bean 15 | public EDUKPSPublicSoap createPublicSoap(){return new EDUKPSPublicSoap();} 16 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/request/UpdateUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.request; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.EnumType; 5 | import jakarta.persistence.Enumerated; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | import lombok.NoArgsConstructor; 9 | import lombok.Setter; 10 | import org.springframework.beans.factory.annotation.Value; 11 | 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | public class UpdateUserRequest { 17 | @Value("${default.role}") 18 | @Enumerated(EnumType.STRING) 19 | private Role role; 20 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/entity/Edevlet.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.entity; 2 | 3 | import jakarta.persistence.*; 4 | import lombok.AllArgsConstructor; 5 | import lombok.Getter; 6 | import lombok.NoArgsConstructor; 7 | import lombok.Setter; 8 | 9 | import java.time.LocalDate; 10 | 11 | @Entity 12 | @Getter 13 | @Setter 14 | @NoArgsConstructor 15 | @AllArgsConstructor 16 | @Table(name = "e_devlet") 17 | public class Edevlet { 18 | @Id 19 | @GeneratedValue(strategy = GenerationType.IDENTITY) 20 | private int id; 21 | private String name; 22 | private String surname; 23 | @Column(unique = true) 24 | private String identityNumber; 25 | private LocalDate birthDay; 26 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/response/GetUserResponse.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.response; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.EnumType; 5 | import jakarta.persistence.Enumerated; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | import lombok.NoArgsConstructor; 9 | import lombok.Setter; 10 | 11 | import java.time.LocalDate; 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class GetUserResponse { 18 | private String name; 19 | private String surname; 20 | private String identityNumber; 21 | private LocalDate birthDay; 22 | @Enumerated(EnumType.STRING) 23 | private Role role; 24 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/response/GetAllUsersResponse.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.response; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.EnumType; 5 | import jakarta.persistence.Enumerated; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | import lombok.NoArgsConstructor; 9 | import lombok.Setter; 10 | 11 | import java.time.LocalDate; 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class GetAllUsersResponse { 18 | private int id; 19 | private String name; 20 | private String surname; 21 | private String identityNumber; 22 | private LocalDate birthDay; 23 | @Enumerated(EnumType.STRING) 24 | private Role role; 25 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/response/UpdateUserResponse.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.response; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.EnumType; 5 | import jakarta.persistence.Enumerated; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | import lombok.NoArgsConstructor; 9 | import lombok.Setter; 10 | 11 | import java.time.LocalDate; 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class UpdateUserResponse { 18 | private int id; 19 | private String name; 20 | private String surname; 21 | private String identityNumber; 22 | private LocalDate birthDay; 23 | @Enumerated(EnumType.STRING) 24 | private Role role; 25 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/response/CreateUserResponse.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.response; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.EnumType; 5 | import jakarta.persistence.Enumerated; 6 | import lombok.AllArgsConstructor; 7 | import lombok.Getter; 8 | import lombok.NoArgsConstructor; 9 | import lombok.Setter; 10 | 11 | import java.time.LocalDate; 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class CreateUserResponse { 18 | private int id; 19 | private String name; 20 | private String surname; 21 | private String identityNumber; 22 | private LocalDate birthDay; 23 | @Enumerated(EnumType.STRING) 24 | private Role role; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.entity; 2 | 3 | import com.starbucks.starbucks.entity.enums.Role; 4 | import jakarta.persistence.*; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Getter; 7 | import lombok.NoArgsConstructor; 8 | import lombok.Setter; 9 | 10 | import java.time.LocalDate; 11 | 12 | @Entity 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | @Table(name = "users") 18 | public class User { 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private int id; 22 | private String name; 23 | private String surname; 24 | @Column(unique = true) 25 | private String identityNumber; 26 | private LocalDate birthDay; 27 | @Enumerated(EnumType.STRING) 28 | private Role role; 29 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/exception/GeneralExceptionHandle.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.exception; 2 | 3 | import org.springframework.http.HttpStatus; 4 | import org.springframework.http.ResponseEntity; 5 | import org.springframework.web.bind.annotation.ExceptionHandler; 6 | import org.springframework.web.bind.annotation.RestControllerAdvice; 7 | 8 | @RestControllerAdvice 9 | public class GeneralExceptionHandle { 10 | @ExceptionHandler(EdevletException.class) 11 | public ResponseEntity handle(EdevletException e){ 12 | return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST); } 13 | @ExceptionHandler(UserException.class) 14 | public ResponseEntity handle(UserException userException){ 15 | return new ResponseEntity<>(userException.getMessage(), HttpStatus.BAD_REQUEST); } } 16 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUDateTimeConverter.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.util.Date; 13 | 14 | 15 | public interface EDUDateTimeConverter 16 | { 17 | java.util.Date convertDateTime(String strDate); 18 | java.util.Date convertTime(String strDate); 19 | java.util.Date convertDate(String strDate); 20 | String convertDuration(String value); 21 | String getStringFromDateTime(Date value); 22 | String getStringFromDate(Date value); 23 | String getStringFromTime(Date value); 24 | String getStringFromDuration(String value); 25 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.abstracts; 2 | 3 | import com.starbucks.starbucks.service.dto.request.CreateUserRequest; 4 | import com.starbucks.starbucks.service.dto.request.UpdateUserRequest; 5 | import com.starbucks.starbucks.service.dto.response.CreateUserResponse; 6 | import com.starbucks.starbucks.service.dto.response.GetAllUsersResponse; 7 | import com.starbucks.starbucks.service.dto.response.GetUserResponse; 8 | import com.starbucks.starbucks.service.dto.response.UpdateUserResponse; 9 | 10 | import java.util.List; 11 | 12 | public interface UserService { 13 | List getALl(); 14 | GetUserResponse getUserById(int id); 15 | CreateUserResponse saveUser(CreateUserRequest createUserRequest)throws Exception; 16 | UpdateUserResponse updateUser(int id,UpdateUserRequest updateUserRequest); 17 | void deleteUser(int id); 18 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/dto/request/CreateUserRequest.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.dto.request; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import jakarta.validation.constraints.NotBlank; 5 | import lombok.AllArgsConstructor; 6 | import lombok.Getter; 7 | import lombok.NoArgsConstructor; 8 | import lombok.Setter; 9 | import org.hibernate.validator.constraints.Length; 10 | 11 | import java.time.LocalDate; 12 | 13 | @Getter 14 | @Setter 15 | @NoArgsConstructor 16 | @AllArgsConstructor 17 | public class CreateUserRequest { 18 | @NotBlank(message = "Name can not be null!!") 19 | private String name; 20 | @NotBlank(message = "Surname can not be null!!") 21 | private String surname; 22 | @NotBlank(message = "Identity number can not be null!!") 23 | @Length(max = 11,min = 11,message = "Identity number must be 11 character") 24 | private String identityNumber; 25 | private LocalDate birthDay; 26 | } -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar 19 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUMarshalGuid.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | import org.ksoap2.serialization.Marshal; 14 | import org.ksoap2.serialization.PropertyInfo; 15 | import org.ksoap2.serialization.SoapSerializationEnvelope; 16 | import org.xmlpull.v1.XmlPullParser; 17 | import org.xmlpull.v1.XmlPullParserException; 18 | import org.xmlpull.v1.XmlSerializer; 19 | 20 | import java.io.IOException; 21 | import java.util.UUID; 22 | 23 | 24 | public class EDUMarshalGuid implements Marshal 25 | { 26 | public java.lang.Object readInstance(XmlPullParser parser, java.lang.String namespace, java.lang.String name,PropertyInfo expected) throws IOException, XmlPullParserException 27 | { 28 | return UUID.fromString(parser.nextText()); 29 | } 30 | 31 | public void register(SoapSerializationEnvelope cm) 32 | { 33 | cm.addMapping(cm.xsd, "guid", UUID.class, this); 34 | } 35 | 36 | public void writeInstance(XmlSerializer writer, java.lang.Object obj) throws IOException 37 | { 38 | writer.text(obj.toString()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/EDUKPSPublicSoap_methods.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EDUKPSPublicSoap methods 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 |

TCKimlikNoDogrula

22 |

23 | 24 |

25 |

Synchronous operation

26 |
27 |         
28 | import com.starbucks.starbucks.adapter;
29 | ...
30 | Long param0 = ...;//initialization code
31 | String param1 = ...;//initialization code
32 | String param2 = ...;//initialization code
33 | Integer param3 = ...;//initialization code
34 | 
35 | EDUKPSPublicSoap service = new EDUKPSPublicSoap("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
36 | Boolean res = service.TCKimlikNoDogrula(param0,param1,param2,param3);
37 | //in res variable you have a value returned from your web service
38 |             
39 | 
40 |
41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/concretes/EdevletServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.concretes; 2 | 3 | 4 | import com.starbucks.starbucks.adapter.EDUKPSPublicSoap; 5 | import com.starbucks.starbucks.repository.EdevletRepository; 6 | import com.starbucks.starbucks.service.abstracts.EdevletService; 7 | import com.starbucks.starbucks.service.dto.request.CreateUserRequest; 8 | import org.springframework.stereotype.Service; 9 | 10 | @Service 11 | public class EdevletServiceImpl implements EdevletService { 12 | private final EdevletRepository edevletRepository; 13 | private final EDUKPSPublicSoap qbgkpsPublicSoap; 14 | 15 | public EdevletServiceImpl(EdevletRepository edevletRepository, EDUKPSPublicSoap qbgkpsPublicSoap) { 16 | this.edevletRepository = edevletRepository; 17 | this.qbgkpsPublicSoap = qbgkpsPublicSoap; 18 | } 19 | @Override 20 | public boolean checkUserIsReal(CreateUserRequest createUserRequest) { 21 | return edevletRepository.existsByNameAndSurnameAndIdentityNumberAndBirthDay(createUserRequest.getName() 22 | , createUserRequest.getSurname() 23 | , createUserRequest.getIdentityNumber(),createUserRequest.getBirthDay()); 24 | } 25 | @Override 26 | public boolean checkUserWithMernis(CreateUserRequest createUserRequest) throws Exception{ 27 | return qbgkpsPublicSoap.TCKimlikNoDogrula(Long.valueOf(createUserRequest.getIdentityNumber()), 28 | createUserRequest.getName().toUpperCase() 29 | ,createUserRequest.getSurname(),createUserRequest.getBirthDay().getYear()); 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/EDUKPSPublicSoap12_methods.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EDUKPSPublicSoap12 methods 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 |

TCKimlikNoDogrula

22 |

23 | 24 |

25 |

Synchronous operation

26 |
27 |         
28 | import com.starbucks.starbucks.adapter;
29 | ...
30 | Long param0 = ...;//initialization code
31 | String param1 = ...;//initialization code
32 | String param2 = ...;//initialization code
33 | Integer param3 = ...;//initialization code
34 | 
35 | EDUKPSPublicSoap12 service = new EDUKPSPublicSoap12("https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
36 | Boolean res = service.TCKimlikNoDogrula(param0,param1,param2,param3);
37 | //in res variable you have a value returned from your web service
38 |             
39 | 
40 |
41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/api/controller/UsersController.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.api.controller; 2 | 3 | import com.starbucks.starbucks.service.abstracts.UserService; 4 | import com.starbucks.starbucks.service.dto.request.CreateUserRequest; 5 | import com.starbucks.starbucks.service.dto.request.UpdateUserRequest; 6 | import com.starbucks.starbucks.service.dto.response.CreateUserResponse; 7 | import com.starbucks.starbucks.service.dto.response.GetAllUsersResponse; 8 | import com.starbucks.starbucks.service.dto.response.GetUserResponse; 9 | import com.starbucks.starbucks.service.dto.response.UpdateUserResponse; 10 | import jakarta.validation.Valid; 11 | import org.springframework.http.HttpStatus; 12 | import org.springframework.http.ResponseEntity; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import java.util.List; 16 | 17 | @RestController 18 | @RequestMapping("/api/users") 19 | public class UsersController { 20 | private final UserService userService; 21 | 22 | public UsersController(UserService userService) { 23 | this.userService = userService; 24 | } 25 | @GetMapping 26 | public ResponseEntity> getAllUsers(){ 27 | return new ResponseEntity<>(userService.getALl(), HttpStatus.OK); 28 | } 29 | @GetMapping("/{id}") 30 | public ResponseEntity getUserById(@PathVariable int id){ 31 | return new ResponseEntity<>(userService.getUserById(id),HttpStatus.OK); 32 | } 33 | @PostMapping 34 | public ResponseEntity saveUser(@Valid@RequestBody CreateUserRequest userRequest) throws Exception{ 35 | return new ResponseEntity<>(userService.saveUser(userRequest),HttpStatus.CREATED); 36 | } 37 | @DeleteMapping("/{id}") 38 | public ResponseEntity deleteUser(@PathVariable int id){ 39 | userService.deleteUser(id); 40 | return new ResponseEntity<>("Kullanici Silindi",HttpStatus.OK); 41 | } 42 | @PutMapping("/{id}") 43 | public ResponseEntity updateUser(@PathVariable int id, 44 | @Valid@RequestBody UpdateUserRequest updateUserRequest){ 45 | return new ResponseEntity<>(userService.updateUser(id,updateUserRequest),HttpStatus.OK); 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/Metadata.info: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7.0.2.0 5 | Basic 6 | easywsdl 7 | EDUKPSPublicSoap 8 | 9 | 10 | https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx 11 | 12 | com.starbucks.starbucks.adapter 13 | false 14 | true 15 | false 16 | true 17 | false 18 | false 19 | false 20 | false 21 | Default 22 | 23 | true 24 | false 25 | Java 26 | None 27 | true 28 | false 29 | false 30 | 31 | 32 | docs/Styles/Blueprint_Styles/Style.css 33 | docs/Html/Tips.html 34 | docs/Html/MTOMTransfer.html 35 | docs/Html/EDUKPSPublicSoap_methods.html 36 | docs/Html/EDUKPSPublicSoap12_methods.html 37 | docs/Html/EDUKPSPublicSoap12.html 38 | docs/Html/EDUKPSPublicSoap.html 39 | docs/Index.html 40 | EDUStandardDateTimeConverter.java 41 | EDUMarshalGuid.java 42 | EDUKPSPublicSoap12.java 43 | EDUKPSPublicSoap.java 44 | EDUHelper.java 45 | EDUExtendedSoapSerializationEnvelope.java 46 | EDUDateTimeConverter.java 47 | 48 | 49 | ksoap2-android-assembly-3.6.4-jar-with-dependencies.jar 50 | ExKsoap2-1.0.4.0.jar 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/EDUKPSPublicSoap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EDUKPSPublicSoap class 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 |

EDUKPSPublicSoap

22 | 23 |

SOAP Version: 1.1

24 |

Main class which you can use to connect to your web service

25 | 26 |

Important settings

27 |
    28 |
  • Timeout - the timeout for network operations, in milliseconds. By default: 60 sec. 29 |
    30 | Example:
    31 |
    32 |                     
    33 | EDUKPSPublicSoap service = new EDUKPSPublicSoap(null,"https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx",30000);
    34 | service.TCKimlikNoDogrula();
    35 |                     
    36 |         
    37 | 
    38 |
  • 39 |
  • Url - the web service address. By default it is retrieved from the wsdl file 40 |
    41 | Example:
    42 |
    43 |                     
    44 | EDUKPSPublicSoap service = new EDUKPSPublicSoap(null,"https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
    45 | service.TCKimlikNoDogrula();
    46 |                     
    47 |         
    48 | 
    49 |
  • 50 |
  • httpHeaders - allows you to add custom headers to the http requests. 51 |
    52 | Example:
    53 |
    54 |                     
    55 | EDUKPSPublicSoap service = new EDUKPSPublicSoap();
    56 | service.httpHeaders.add( new HeaderProperty("Authorization","Basic QWxhZGRpbjpPcGVuU2VzYW1l"));
    57 | service.TCKimlikNoDogrula();
    58 |                     
    59 | 
    60 | 61 |
  • 62 |
  • 63 | Enable logging - if you enable logging, all requests/responses will be write to the console (for debugging purposes) 64 |
    65 | Example:
    66 |
    67 |                     
    68 | EDUKPSPublicSoap service = new EDUKPSPublicSoap();
    69 | service.enableLogging=true;
    70 | service.TCKimlikNoDogrula();
    71 |                     
    72 | 
    73 |
  • 74 |
75 | 76 |

Methods

77 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/EDUKPSPublicSoap12.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | EDUKPSPublicSoap12 class 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 |

EDUKPSPublicSoap12

22 | 23 |

SOAP Version: 1.2

24 |

Main class which you can use to connect to your web service

25 | 26 |

Important settings

27 |
    28 |
  • Timeout - the timeout for network operations, in milliseconds. By default: 60 sec. 29 |
    30 | Example:
    31 |
    32 |                     
    33 | EDUKPSPublicSoap12 service = new EDUKPSPublicSoap12(null,"https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx",30000);
    34 | service.TCKimlikNoDogrula();
    35 |                     
    36 |         
    37 | 
    38 |
  • 39 |
  • Url - the web service address. By default it is retrieved from the wsdl file 40 |
    41 | Example:
    42 |
    43 |                     
    44 | EDUKPSPublicSoap12 service = new EDUKPSPublicSoap12(null,"https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx");
    45 | service.TCKimlikNoDogrula();
    46 |                     
    47 |         
    48 | 
    49 |
  • 50 |
  • httpHeaders - allows you to add custom headers to the http requests. 51 |
    52 | Example:
    53 |
    54 |                     
    55 | EDUKPSPublicSoap12 service = new EDUKPSPublicSoap12();
    56 | service.httpHeaders.add( new HeaderProperty("Authorization","Basic QWxhZGRpbjpPcGVuU2VzYW1l"));
    57 | service.TCKimlikNoDogrula();
    58 |                     
    59 | 
    60 | 61 |
  • 62 |
  • 63 | Enable logging - if you enable logging, all requests/responses will be write to the console (for debugging purposes) 64 |
    65 | Example:
    66 |
    67 |                     
    68 | EDUKPSPublicSoap12 service = new EDUKPSPublicSoap12();
    69 | service.enableLogging=true;
    70 | service.TCKimlikNoDogrula();
    71 |                     
    72 | 
    73 |
  • 74 |
75 | 76 |

Methods

77 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 3.0.5 9 | 10 | 11 | com.starbucks 12 | Starbucks 13 | 0.0.1-SNAPSHOT 14 | Starbucks 15 | Starbucks 16 | 17 | 17 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-validation 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | 34 | 35 | org.springdoc 36 | springdoc-openapi-starter-webmvc-ui 37 | 2.0.4 38 | 39 | 40 | 41 | 42 | org.modelmapper 43 | modelmapper 44 | 3.1.1 45 | 46 | 47 | 48 | 49 | jakarta.validation 50 | jakarta.validation-api 51 | 3.0.2 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.springframework.boot 65 | spring-boot-devtools 66 | runtime 67 | true 68 | 69 | 70 | org.postgresql 71 | postgresql 72 | runtime 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-configuration-processor 77 | true 78 | 79 | 80 | org.projectlombok 81 | lombok 82 | true 83 | 84 | 85 | org.springframework.boot 86 | spring-boot-starter-test 87 | test 88 | 89 | 90 | 91 | 92 | 93 | 94 | org.springframework.boot 95 | spring-boot-maven-plugin 96 | 97 | 98 | 99 | org.projectlombok 100 | lombok 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUStandardDateTimeConverter.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.text.SimpleDateFormat; 13 | import java.util.Date; 14 | import java.util.Locale; 15 | 16 | 17 | 18 | public class EDUStandardDateTimeConverter implements EDUDateTimeConverter 19 | { 20 | public java.util.TimeZone TimeZone=java.util.TimeZone.getTimeZone("UTC"); 21 | 22 | @Override 23 | public Date convertDateTime(String strDate) 24 | { 25 | java.lang.String[] formats = new java.lang.String[] { 26 | "yyyy-MM-dd'T'HH:mm:ss.SSS", 27 | "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", 28 | "yyyy-MM-dd'T'HH:mm:ssZ", 29 | "yyyy-MM-dd'T'HH:mm:ss", 30 | "yyyy-MM-dd'T'HH:mm", 31 | "yyyy-MM-dd" 32 | }; 33 | return parse(strDate,formats); 34 | } 35 | 36 | private Date parse(String strDate,java.lang.String[] formats){ 37 | if(strDate==null) 38 | { 39 | return null; 40 | } 41 | for (java.lang.String frm : formats) 42 | { 43 | try 44 | { 45 | SimpleDateFormat format = new SimpleDateFormat(frm, Locale.US); 46 | format.setTimeZone(java.util.TimeZone.getTimeZone("UTC")); 47 | return format.parse(strDate); 48 | } 49 | catch (java.lang.Exception ex) 50 | { 51 | } 52 | } 53 | return null; 54 | } 55 | 56 | @Override 57 | public Date convertTime(String strDate) 58 | { 59 | java.lang.String[] formats = new java.lang.String[] { 60 | "HH:mm:ss.SSS", 61 | "HH:mm:ss", 62 | "HH:mm" 63 | }; 64 | return parse(strDate,formats); 65 | } 66 | 67 | @Override 68 | public Date convertDate(String strDate) 69 | { 70 | return convertDateTime(strDate); 71 | } 72 | 73 | @Override 74 | public String convertDuration(String value) { 75 | return value; 76 | } 77 | 78 | @Override 79 | public String getStringFromDateTime(Date value) 80 | { 81 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", Locale.US); 82 | format.setTimeZone(TimeZone); 83 | return format.format(value); 84 | } 85 | 86 | @Override 87 | public String getStringFromDate(Date value) 88 | { 89 | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd", Locale.US); 90 | format.setTimeZone(TimeZone); 91 | return format.format(value); 92 | } 93 | 94 | @Override 95 | public String getStringFromTime(Date value) 96 | { 97 | SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss", Locale.US); 98 | format.setTimeZone(TimeZone); 99 | return format.format(value); 100 | } 101 | 102 | @Override 103 | public String getStringFromDuration(String value) 104 | { 105 | return value; 106 | } 107 | } 108 | 109 | 110 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/service/concretes/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.service.concretes; 2 | 3 | import com.starbucks.starbucks.entity.User; 4 | import com.starbucks.starbucks.entity.enums.Role; 5 | import com.starbucks.starbucks.exception.EdevletException; 6 | import com.starbucks.starbucks.exception.UserException; 7 | import com.starbucks.starbucks.repository.UserRepository; 8 | import com.starbucks.starbucks.service.abstracts.UserService; 9 | import com.starbucks.starbucks.service.dto.request.CreateUserRequest; 10 | import com.starbucks.starbucks.service.dto.request.UpdateUserRequest; 11 | import com.starbucks.starbucks.service.dto.response.CreateUserResponse; 12 | import com.starbucks.starbucks.service.dto.response.GetAllUsersResponse; 13 | import com.starbucks.starbucks.service.dto.response.GetUserResponse; 14 | import com.starbucks.starbucks.service.dto.response.UpdateUserResponse; 15 | import org.modelmapper.ModelMapper; 16 | import org.springframework.stereotype.Service; 17 | 18 | import java.util.List; 19 | 20 | @Service 21 | public class UserServiceImpl implements UserService { 22 | private final UserRepository userRepository; 23 | private final ModelMapper modelMapper; 24 | private final EdevletServiceImpl edevletService; 25 | public UserServiceImpl(UserRepository userRepository, ModelMapper modelMapper, EdevletServiceImpl edevletService) { 26 | this.userRepository = userRepository; 27 | this.modelMapper = modelMapper; 28 | this.edevletService = edevletService; 29 | } 30 | 31 | @Override 32 | public List getALl() { 33 | return userRepository.findAll().stream().map(user -> modelMapper.map(user, GetAllUsersResponse.class)).toList(); 34 | } 35 | 36 | @Override 37 | public GetUserResponse getUserById(int id) { 38 | checkUserIsMember(id); 39 | User user = userRepository.findById(id).orElseThrow(); 40 | return modelMapper.map(user, GetUserResponse.class); 41 | } 42 | 43 | @Override 44 | public CreateUserResponse saveUser(CreateUserRequest createUserRequest) throws Exception{ 45 | checkUserExisist(createUserRequest.getIdentityNumber()); 46 | if (checkUserIsReal(createUserRequest)){ 47 | 48 | User user=modelMapper.map(createUserRequest, User.class); 49 | user.setId(0); 50 | user.setRole(Role.USER); 51 | User createdUser = userRepository.save(user); 52 | return modelMapper.map(createdUser, CreateUserResponse.class); 53 | }else { 54 | throw new EdevletException("The user is not registered because it is not real"); 55 | } 56 | } 57 | @Override 58 | public UpdateUserResponse updateUser(int id,UpdateUserRequest updateUserRequest) { 59 | checkUserIsMember(id); 60 | User user=userRepository.findById(id).orElseThrow(); 61 | user.setRole(updateUserRequest.getRole()); 62 | userRepository.save(user); 63 | return modelMapper.map(user, UpdateUserResponse.class); 64 | } 65 | 66 | @Override 67 | public void deleteUser(int id) { 68 | checkUserIsMember(id); 69 | userRepository.deleteById(id); 70 | } 71 | 72 | ///////////***************++++////////////// 73 | ////////// !private jobs! ////////////// 74 | private void checkUserExisist(String identityNumber){ 75 | if (userRepository.existsByIdentityNumber(identityNumber)) 76 | throw new UserException("The user is already a member"); 77 | } 78 | private boolean checkUserIsReal(CreateUserRequest createUserRequest) throws Exception{ 79 | return edevletService.checkUserWithMernis(createUserRequest); 80 | } 81 | private void checkUserIsMember(int id){ 82 | if (!userRepository.existsById(id)) throw new UserException("User not found by this id"); 83 | } 84 | } -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 18 | easyWSDL - Getting started 19 | 20 | 21 |

Read me first!

22 |

Thanks for using EasyWSDL generator. You have generated classes using Free account which has two main limitations, which are:

23 |
    24 |
  1. Classes generated by Free account cannot be used in commercial projects

  2. 25 |
  3. We have generated a half of your methods only (in this case your webservice contains 1 operations, and we have generated 0 only. The other methods throw UnsupportedOperationException

  4. 26 |
27 |

Basically you should use these classes for testing purposes. You can check if our generator works with your web service, without spending any money. Then if you are satisfied with the results, you can buy a Premium account and generated your classes again.

28 |

Getting started

29 | 30 |
    31 |
  1. 32 |

    In your android/java project create a new package folder (name of this folder should match the Package name of generated classes)

  2. 33 |
  3. 34 |

    Go to src subfolder of generated package and copy all files to your project (to newly created folder).

  4. 35 |
  5. 36 |

    In libs subfolder you will find all jars needed for generated classes. Copy all jars to your project and add references to them (every IDE has different way of adding references to external jars)

    37 |
  6. 38 |
  7. 39 |

    40 | Add INTERNET permission to your AndroidManifest.xml file 41 |

    42 |
    43 |             
    44 |  <uses-permission android:name="android.permission.INTERNET"/>
    45 |             
    46 |         
    47 |
  8. 48 |
  9. 49 |

    50 | Use the following code to connect to your webservice: 51 |

    52 |
    53 |             
    54 | EDUKPSPublicSoap service = new EDUKPSPublicSoap();
    55 | service.MethodToInvoke(...); 56 |
    57 |
    58 |
  10. 59 |
60 | 61 |

Potential problems

62 |
63 |

Warning: I got compilation error: com.android.dex.DexException: Multiple dex files define Lorg/kobjects/...

64 |

65 | This problem occures when you have many copies of ksoap2.jar added as dependencies in your project. For Premium account we add ExKsoap2.jar library which already has ksoap2.jar. Sometimes this causes conflicts. 66 | In this case should add ExKsoap2.jar only to your dependencies (without ksoap2.jar). If you added both ExKsoap2.jar and Ksoap.jar libs, then you can have this issue. To solve it, please remove Ksoap2.jar from dependencies. 67 |

68 |
69 |

Your main service classes

70 | 74 | 75 |

Other topics

76 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/MTOMTransfer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | easyWSDL - MTOM Transfer 18 | 19 | 20 |

MTOM Transfer

21 | 22 |

23 | Typical SOAP web service has some limitation in sending a large binary data (like images, videos, documents, etc). Problem is that the binary data are base64-encoded and added to XML message body. Many XML parsers cannot parse very well huge in size documents. To address this issue there is a possibility to send binary data as an attachment (outside the SOAP message body). Of course Web service has to support this feature (MTOM transfer/attachment). 24 | 25 | So if your web service supports MTOM transfer then you can use EasyWSDL to generate classes with attachment support. To do this you should select Add MTOM transfer in generator page. Please remember to add ExKsoap2-1.X.X.X.jar library to your project (you will find it in libs folder in generated zip file) 26 |

27 | To enable MTOM transfer, you need to set enableMTOM to true, like this: 28 |

Uploading file

29 |
30 |     
31 | MtomTestService service = new MtomTestService();
32 | service.enableMTOM=true;
33 | 
34 | ByteArrayOutputStream stream=wrapper.getImageStream(R.drawable.ic_launcher1);
35 | byte[] image = stream.toByteArray();
36 | Result result = new Result();
37 | result.FileContent=new BinaryObject(image);
38 | result.Message=Integer.toString(image.length);
39 | 
40 | isValid=service.UploadFile_ComplexArray(result);
41 |         
42 |     
43 |

Retrieving file

44 |
45 |     
46 | MimeServiceTestPortBinding service = new MimeServiceTestPortBinding(null,Constants.javaWS_mime_url);
47 | service.enableMTOM=true;
48 | 
49 | BinaryObject imgBytes=service.retrievePicture(1);
50 | SoapAttachment attachment= (SoapAttachment) imgBytes.getUnderlayingObject();
51 | wrapper.setIcon(attachment.getStream(), false);
52 |         
53 |     
54 | BinaryObject class represents any binary data and can be easily created from byte array, InputStream and other types. 55 |

56 | By default, attachments are stored in a memory (it uses MemoryDestinationManager) so in case you retrieve large binary data you still can have OutOfMemoryException in Android. You can change this default behavior by using FileDestinationManager which uses file system to store attachments in files. 57 |

58 |

To configure your classes to store attachments in files you can create a custom service class and overwrite CreateEnvelope method, like this (example from Android):

59 |
60 |         
61 | import android.content.ContextWrapper;
62 | import com.easywsdl.exksoap2.mtom.FileDestinationManager;
63 | import com.example.AndroidCompileTest.wsdl.MtomTestService;
64 | import com.example.AndroidCompileTest.wsdl.ExtendedSoapSerializationEnvelope;
65 | public class CustomService extends MtomTestService
66 | {
67 |     ContextWrapper context;
68 |     FileDestinationManager manager;
69 |     public CustomService(ContextWrapper context)
70 |     {
71 |         this.context=context;
72 |     }
73 |     @Override
74 |     protected ExtendedSoapSerializationEnvelope createEnvelope() {
75 |         ExtendedSoapSerializationEnvelope envelope= super.createEnvelope();
76 |         String baseDirectory=context.getFilesDir().getPath();//directory where you want to store files with attachments
77 |         manager = new FileDestinationManager(baseDirectory)
78 |         envelope.setAttachmentDestinationManager(manager);
79 |         return envelope;
80 |     }
81 |     public void RemoveFiles()
82 |     {
83 |         manager.RemoveAllAttachments();
84 |     }
85 | }
86 |             
87 |         
88 |

In baseDirectory you should set a path to the folder where you want to store files. We recommend to use a dedicated folder which can be deleted if you don't need attachments any more.

89 |
90 |

91 | Keep in mind that attachments can be large and every time your application download a new attachment it will take some space in device storage, so you should remove attachment files when you don't need them. To remove all attachment files, you can use RemoveAllFiles() method. 92 |

93 |
94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUHelper.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | import java.util.*; 13 | import org.ksoap2.serialization.*; 14 | import org.kxml2.kdom.Element; 15 | import org.kxml2.kdom.Node; 16 | 17 | 18 | public class EDUHelper 19 | { 20 | public static < T, E> T getKeyByValue(java.util.Map< T, E> map, E value) { 21 | for (java.util.Map.Entry< T, E> entry : map.entrySet()) { 22 | if (value.equals(entry.getValue())) { 23 | return entry.getKey(); 24 | } 25 | } 26 | return null; 27 | } 28 | 29 | public static java.lang.Object getAttribute(AttributeContainer obj,java.lang.String name,java.lang.String namespace) 30 | { 31 | for (int i=0;i < obj.getAttributeCount();i++){ 32 | AttributeInfo info = new AttributeInfo(); 33 | obj.getAttributeInfo(i,info); 34 | if(info.name.equals(name) && info.namespace.equals(namespace)) 35 | { 36 | return info.getValue(); 37 | } 38 | } 39 | return null; 40 | } 41 | 42 | 43 | public static Element convertToHeader(java.lang.Object obj,java.lang.String namespace,java.lang.String name) 44 | { 45 | org.kxml2.kdom.Element parentElement = new org.kxml2.kdom.Element().createElement(namespace,name); 46 | if(obj==null) 47 | { 48 | return parentElement; 49 | } 50 | if(obj instanceof KvmSerializable) 51 | { 52 | KvmSerializable soapObject =(KvmSerializable)obj; 53 | for(int i = 0;i < soapObject.getPropertyCount();i++){ 54 | PropertyInfo info = new PropertyInfo(); 55 | soapObject.getPropertyInfo(i,new Hashtable(),info); 56 | java.lang.Object value=soapObject.getProperty(i); 57 | if(value!=null && value!=SoapPrimitive.NullSkip && value!=SoapPrimitive.NullNilElement) 58 | { 59 | info.setValue(value); 60 | Element el1= convertToHeader( info.getValue(),info.getNamespace(),info.getName()); 61 | parentElement.addChild(Node.ELEMENT, el1); 62 | } 63 | } 64 | } 65 | else if(obj!=null && obj!=SoapPrimitive.NullSkip && obj!=SoapPrimitive.NullNilElement) 66 | { 67 | java.lang.String value=obj.toString(); 68 | if (obj instanceof java.util.Date) 69 | { 70 | java.util.Date date = (java.util.Date) obj; 71 | value = EDUExtendedSoapSerializationEnvelope.getDateTimeConverter().getStringFromDateTime(date); 72 | } 73 | parentElement.addChild(org.kxml2.kdom.Node.TEXT,value); 74 | } 75 | if(obj instanceof AttributeContainer) 76 | { 77 | AttributeContainer attrContainer= (AttributeContainer)obj; 78 | for(int i=0;i < attrContainer.getAttributeCount();i++) 79 | { 80 | AttributeInfo info=new AttributeInfo(); 81 | attrContainer.getAttributeInfo(i,info); 82 | Object value=info.getValue(); 83 | parentElement.setAttribute(info.namespace,info.name,value!=null?value.toString():"" ); 84 | } 85 | } 86 | return parentElement; 87 | } 88 | 89 | public static Element findOutHeader(java.lang.String name,SoapSerializationEnvelope envelope) 90 | { 91 | if(envelope.headerIn==null) 92 | { 93 | return null; 94 | } 95 | for(int i=0;i < envelope.headerIn.length;i++) { 96 | Element elem=envelope.headerIn[i]; 97 | if(elem.getName().equals(name) && (elem.getChildCount()>0||elem.getAttributeCount()>0)) 98 | return elem; 99 | } 100 | return null; 101 | } 102 | 103 | public static java.lang.Object convertToSoapObject(Element element) 104 | { 105 | if(element.getChildCount()==0 || (element.getChildCount()==1 && !(element.getChild(0) instanceof Element))) 106 | { 107 | SoapPrimitive primitive = new SoapPrimitive(element.getNamespace(),element.getName(),element.getChildCount()==1? element.getText(0):null); 108 | return primitive; 109 | } 110 | else 111 | { 112 | SoapObject obj = new SoapObject(element.getNamespace(),element.getName()); 113 | for (int i=0;i < element.getChildCount();i++) 114 | { 115 | Element childElement=element.getElement(i); 116 | java.lang.Object childObject=convertToSoapObject(childElement); 117 | if(childObject instanceof SoapObject) 118 | { 119 | SoapObject soapObj= (SoapObject) childObject; 120 | obj.addProperty(soapObj.getName(),childObject); 121 | } 122 | else 123 | { 124 | SoapPrimitive primitive= (SoapPrimitive) childObject; 125 | obj.addProperty(primitive.getName(),primitive); 126 | } 127 | } 128 | return obj; 129 | } 130 | } 131 | public static boolean isEmpty(CharSequence str) { 132 | return str == null || str.length() == 0; 133 | } 134 | 135 | public static ArrayList< PropertyInfo> getProperties(SoapObject soapObject,String name) 136 | { 137 | ArrayList< PropertyInfo> list = new ArrayList< PropertyInfo>(); 138 | int size = soapObject.getPropertyCount(); 139 | for (int i0=0;i0 < size;i0++) 140 | { 141 | PropertyInfo info=soapObject.getPropertyInfo(i0); 142 | if ( info.name.equals(name)) 143 | { 144 | list.add(info); 145 | } 146 | } 147 | return list; 148 | } 149 | 150 | public static UUID emptyGuid() 151 | { 152 | return new UUID(0,0); 153 | } 154 | } -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 50 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 124 | 125 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% ^ 162 | %JVM_CONFIG_MAVEN_PROPS% ^ 163 | %MAVEN_OPTS% ^ 164 | %MAVEN_DEBUG_OPTS% ^ 165 | -classpath %WRAPPER_JAR% ^ 166 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 167 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 168 | if ERRORLEVEL 1 goto error 169 | goto end 170 | 171 | :error 172 | set ERROR_CODE=1 173 | 174 | :end 175 | @endlocal & set ERROR_CODE=%ERROR_CODE% 176 | 177 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 178 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 179 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 180 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 181 | :skipRcPost 182 | 183 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 184 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 185 | 186 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 187 | 188 | cmd /C exit /B %ERROR_CODE% 189 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Html/Tips.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | easyWSDL - Tips & tricks 18 | 19 | 20 | 21 |

Basic authentication

22 | 23 |

24 | To implement a Basic authentication, you have to add a special http header to your service (before you invoke any methods). Here you have an example how to do this: 25 |

26 |
 27 |     
 28 | EDUKPSPublicSoap service = new EDUKPSPublicSoap();
 29 | service.httpHeaders.add(new HeaderProperty("Authorization", "Basic " +
 30 | org.kobjects.base64.Base64.encode("user:password".getBytes())));
 31 | service.TCKimlikNoDogrula();
 32 | 
 33 |         
 34 |         
35 |
36 |
37 |

How to use any collection?

38 |

39 | Some web services use <any> element to return/retrieve any type of data. The schema (structure) of these data is unknown so EasyWSDL are not able to generate a strongly typed 40 | fields for them. Instead, there is one field any which is a collection of PropertyInfo objects and using it you can still retrieve or send such data in a raw format. 41 | You can also add any collection to all generated classes by selecting Generate All classes in generator settings. 42 | Use this feature only if you find that some elements are missing in the generated classes. 43 |
44 |
45 | Here you will find example how to retrieve and send data using any collection. 46 |

47 | 48 |
 49 |     
 50 | <n4:SearchGroups xmlns:n4="http://namespace.url/IBodyArchitectAccessService/">
 51 |     <n5:ExerciseSearchCriteriaGroup xmlns:n5="http://schemas.datacontract.org/2004/07/BodyArchitect.Service.V2.Model">
 52 |         Global
 53 |     </n5:ExerciseSearchCriteriaGroup>
 54 | </n4:SearchGroups>
 55 |         
 56 | 
57 |
58 |
59 |

Sending custom value

60 |
 61 |     
 62 | PartialRetrievingInfo info=new PartialRetrievingInfo();
 63 | ExerciseSearchCriteria exerciseSearchCriteria = new ExerciseSearchCriteria();
 64 | exerciseSearchCriteria.ExerciseTypes=new ArrayOfExerciseType();
 65 | 
 66 | //begin of creating data for any collection
 67 | PropertyInfo exerciseTypeAny = new PropertyInfo();
 68 | exerciseTypeAny.name="SearchGroups";
 69 | exerciseTypeAny.namespace="http://namespace.url/IBodyArchitectAccessService/";
 70 | SoapObject obj = new SoapObject("http://schemas.datacontract.org/2004/07/BodyArchitect.Service.V2.Model","ExerciseSearchCriteriaGroup");
 71 | exerciseTypeAny.setValue(obj);
 72 | 
 73 | PropertyInfo inner = new PropertyInfo();
 74 | inner.name="ExerciseSearchCriteriaGroup";
 75 | inner.namespace="http://schemas.datacontract.org/2004/07/BodyArchitect.Service.V2.Model";
 76 | inner.type= PropertyInfo.STRING_CLASS;
 77 | inner.setValue("Global");
 78 | obj.addProperty(inner);
 79 | exerciseSearchCriteria.any.add(exerciseTypeAny);
 80 | //end
 81 | 
 82 | PagedResultOfExerciseDTO5oAtqRlh exercises = service.GetExercises(sessionData.Token, exerciseSearchCriteria, info);
 83 |         
 84 | 
85 |

Retrieving custom value

86 |
 87 |     
 88 | ProfileInformationDTO profileInfo=service.GetProfileInformation(sessionData.Token, criteria);
 89 | for (PropertyInfo info : profileInfo.any)
 90 | {
 91 |   if(info.name.equals("Name"))
 92 |   {
 93 |     Object value=info.getValue();
 94 |   }
 95 |   else if(info.name.equals("Age"))
 96 |   {
 97 |     //...
 98 |   }
 99 | }
100 |         
101 | 
102 | 103 |

In the latest generator we have introduced a feature to detect a strong types in any collections. To use this option, you have to set CreateClassesForAny property in you service class:

104 |
service.CreateClassesForAny=true;
105 |

With this option, you should find your objects instead of raw SoapObject in any collection.

106 |
107 |

Important

108 | If you still have raw SoapObject objects in any collection, you should generate classes with option Advanced settings -> Generate All classes. 109 |
110 |
111 |
112 |

Best practices

113 |

114 | Sometimes you need to modify generated classes. The recommended way of doing it is to create a new class inherits from the generated class and make changes there (if possible of course). Using this you can easily regenerate 115 | classes again without loosing your modifications. 116 |

117 |

Here you find an example how to configure internal ksoap2 Transport class in your service class

118 | 119 |
120 |     
121 | public class MyService extends EDUKPSPublicSoap
122 | {
123 |     @Override
124 |     protected Transport createTransport() {
125 |     	//changing transport to HttpsTransportSE
126 |         Transport transport= new HttpsTransportSE(Proxy.NO_PROXY,url,500,"",timeOut);
127 |         transport.debug=true;
128 |         return transport;
129 |     }
130 |     @Override
131 |     protected ExtendedSoapSerializationEnvelope createEnvelope() {
132 |     	//configure envelope
133 |         ExtendedSoapSerializationEnvelope envelope= super.createEnvelope();
134 |         envelope.dotNet=true;
135 |         envelope.implicitTypes=false;
136 |         return envelope;
137 |     }
138 |     @Override
139 |     protected void sendRequest(String methodName, ExtendedSoapSerializationEnvelope envelope, Transport transport) throws Exception {
140 |         try{
141 |        	//here we want to print to output requestDump and responseDump after sending request to the server
142 |             super.sendRequest(methodName, envelope, transport);
143 |         }
144 |         catch (Exception e) {
145 |             throw e;
146 |         } finally {
147 |             if (transport.debug) {
148 |                 if (transport.requestDump != null) {
149 |                     System.err.println(transport.requestDump);
150 |                 }
151 |                 if (transport.responseDump != null) {
152 |                     System.err.println(transport.responseDump);
153 |                 }
154 |             }
155 |         }
156 |     }
157 | }
158 |         
159 | 
160 |

Now to connect to your web service you should use MyService class instead of EDUKPSPublicSoap.

161 | 162 |
163 |
164 |

How to set a cookie from the response (cookie management)?

165 |

166 | The easiest way is to maintain a cookies between requests is to use CookieManager class. Basically put these two lines at the start of your application 167 |

168 | 169 |
170 |     
171 |     CookieManager cookieManager = new CookieManager();
172 |     CookieHandler.setDefault(cookieManager);
173 |     
174 | 
175 | 176 |
177 |
178 |

How to create custom Date/Time handler?

179 |

180 | If you find that easyWSDL classes handle date/time in a wrong way, you can create a custom provider. First step is to create a converter class, where you could override one or more methods: 181 |

182 | 183 |
184 |     
185 |     public class MyCustomDateConverter extends StandardDateTimeConverter
186 |     {
187 |         @Override
188 |         public DateTime convertDateTime(String strDate) {
189 |             DateTimeFormatter parser1 = ISODateTimeFormat.dateTimeNoMillis();
190 |             return parser1.parseDateTime(strDate);
191 |         }
192 |     }
193 |     
194 | 
195 |

196 | Next is to create an instance of this class and set it into EDUExtendedSoapSerializationEnvelope. You need to do this before you connect to your webservice. 197 |

198 |
199 |     
200 |     MyCustomDateConverter converter = new MyCustomDateConverter();
201 |     ExtendedSoapSerializationEnvelope.setDateTimeConverter(converter);
202 |     
203 | 
204 | 205 | 206 | 207 | 208 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUKPSPublicSoap.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | 14 | import org.ksoap2.HeaderProperty; 15 | import org.ksoap2.serialization.*; 16 | import org.ksoap2.transport.*; 17 | import org.kxml2.kdom.Element; 18 | 19 | import java.lang.reflect.Constructor; 20 | import java.util.ArrayList; 21 | import java.util.Arrays; 22 | import java.util.List; 23 | 24 | 25 | public class EDUKPSPublicSoap 26 | { 27 | interface EDUIWcfMethod 28 | { 29 | EDUExtendedSoapSerializationEnvelope CreateSoapEnvelope() throws java.lang.Exception; 30 | 31 | java.lang.Object ProcessResult(EDUExtendedSoapSerializationEnvelope __envelope,java.lang.Object result) throws java.lang.Exception; 32 | } 33 | 34 | String url="https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 35 | 36 | int timeOut=60000; 37 | 38 | public List< HeaderProperty> httpHeaders= new ArrayList< HeaderProperty>(); 39 | public boolean enableLogging; 40 | 41 | 42 | public EDUKPSPublicSoap(){} 43 | 44 | public EDUKPSPublicSoap(String url) 45 | { 46 | this.url = url; 47 | } 48 | 49 | public EDUKPSPublicSoap(String url,int timeOut) 50 | { 51 | this.url = url; 52 | this.timeOut=timeOut; 53 | } 54 | 55 | protected org.ksoap2.transport.Transport createTransport() 56 | { 57 | try 58 | { 59 | java.net.URI uri = new java.net.URI(url); 60 | if(uri.getScheme().equalsIgnoreCase("https")) 61 | { 62 | int port=uri.getPort()>0?uri.getPort():443; 63 | String path=uri.getPath(); 64 | if(uri.getQuery()!=null && uri.getQuery()!="") 65 | { 66 | path+="?"+uri.getQuery(); 67 | } 68 | return new com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE(uri.getHost(), port, path, timeOut); 69 | } 70 | else 71 | { 72 | return new com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE(url,timeOut); 73 | } 74 | 75 | } 76 | catch (java.net.URISyntaxException e) 77 | { 78 | } 79 | return null; 80 | } 81 | 82 | protected EDUExtendedSoapSerializationEnvelope createEnvelope() 83 | { 84 | EDUExtendedSoapSerializationEnvelope envelope= new EDUExtendedSoapSerializationEnvelope(EDUExtendedSoapSerializationEnvelope.VER11); 85 | envelope.enableLogging = enableLogging; 86 | 87 | return envelope; 88 | } 89 | 90 | protected java.util.List sendRequest(String methodName,EDUExtendedSoapSerializationEnvelope envelope,org.ksoap2.transport.Transport transport ,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile )throws java.lang.Exception 91 | { 92 | if(transport instanceof com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE ) 93 | { 94 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 95 | } 96 | else 97 | { 98 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 99 | } 100 | } 101 | 102 | java.lang.Object getResult(java.lang.Class destObj,java.lang.Object source,String resultName,EDUExtendedSoapSerializationEnvelope __envelope) throws java.lang.Exception 103 | { 104 | if(source==null) 105 | { 106 | return null; 107 | } 108 | if(source instanceof SoapPrimitive) 109 | { 110 | SoapPrimitive soap =(SoapPrimitive)source; 111 | if(soap.getName().equals(resultName)) 112 | { 113 | java.lang.Object instance=__envelope.get(source,destObj,false); 114 | return instance; 115 | } 116 | } 117 | else 118 | { 119 | SoapObject soap = (SoapObject)source; 120 | if (soap.hasProperty(resultName)) 121 | { 122 | java.lang.Object j=soap.getProperty(resultName); 123 | if(j==null) 124 | { 125 | return null; 126 | } 127 | java.lang.Object instance=__envelope.get(j,destObj,false); 128 | return instance; 129 | } 130 | else if( soap.getName().equals(resultName)) 131 | { 132 | java.lang.Object instance=__envelope.get(source,destObj,false); 133 | return instance; 134 | } 135 | } 136 | 137 | return null; 138 | } 139 | 140 | 141 | 142 | 143 | public Boolean TCKimlikNoDogrula(final Long TCKimlikNo,final String Ad,final String Soyad,final Integer DogumYili) throws java.lang.Exception 144 | { 145 | com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile __profile = new com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile(); 146 | return (Boolean)execute(new EDUIWcfMethod() 147 | { 148 | @Override 149 | public EDUExtendedSoapSerializationEnvelope CreateSoapEnvelope(){ 150 | EDUExtendedSoapSerializationEnvelope __envelope = createEnvelope(); 151 | SoapObject __soapReq = new SoapObject("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula"); 152 | __envelope.setOutputSoapObject(__soapReq); 153 | 154 | PropertyInfo __info=null; 155 | __info = new PropertyInfo(); 156 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 157 | __info.name="TCKimlikNo"; 158 | __info.type=PropertyInfo.LONG_CLASS; 159 | __info.setValue(TCKimlikNo); 160 | __soapReq.addProperty(__info); 161 | __info = new PropertyInfo(); 162 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 163 | __info.name="Ad"; 164 | __info.type=PropertyInfo.STRING_CLASS; 165 | __info.setValue(Ad!=null?Ad:SoapPrimitive.NullSkip); 166 | __soapReq.addProperty(__info); 167 | __info = new PropertyInfo(); 168 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 169 | __info.name="Soyad"; 170 | __info.type=PropertyInfo.STRING_CLASS; 171 | __info.setValue(Soyad!=null?Soyad:SoapPrimitive.NullSkip); 172 | __soapReq.addProperty(__info); 173 | __info = new PropertyInfo(); 174 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 175 | __info.name="DogumYili"; 176 | __info.type=PropertyInfo.INTEGER_CLASS; 177 | __info.setValue(DogumYili); 178 | __soapReq.addProperty(__info); 179 | return __envelope; 180 | } 181 | 182 | @Override 183 | public java.lang.Object ProcessResult(EDUExtendedSoapSerializationEnvelope __envelope,java.lang.Object __result)throws java.lang.Exception { 184 | SoapObject __soap=(SoapObject)__result; 185 | java.lang.Object obj = __soap.getProperty("TCKimlikNoDogrulaResult"); 186 | if (obj instanceof SoapPrimitive) 187 | { 188 | SoapPrimitive j =(SoapPrimitive) obj; 189 | return Boolean.valueOf(j.toString()); 190 | } 191 | else if (obj!= null && obj instanceof Boolean){ 192 | return (Boolean)obj; 193 | } 194 | return null; 195 | } 196 | },"http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula",__profile); 197 | } 198 | 199 | protected java.lang.Object execute(EDUIWcfMethod wcfMethod,String methodName,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile) throws java.lang.Exception 200 | { 201 | org.ksoap2.transport.Transport __httpTransport=createTransport(); 202 | __httpTransport.debug=enableLogging; 203 | EDUExtendedSoapSerializationEnvelope __envelope=wcfMethod.CreateSoapEnvelope(); 204 | try 205 | { 206 | sendRequest(methodName, __envelope, __httpTransport,profile); 207 | } 208 | finally { 209 | if (__httpTransport.debug) { 210 | if (__httpTransport.requestDump != null) { 211 | System.out.println("requestDump: "+__httpTransport.requestDump); 212 | 213 | } 214 | if (__httpTransport.responseDump != null) { 215 | System.out.println("responseDump: "+__httpTransport.responseDump); 216 | } 217 | } 218 | } 219 | java.lang.Object __retObj = __envelope.bodyIn; 220 | if (__retObj instanceof org.ksoap2.SoapFault){ 221 | org.ksoap2.SoapFault __fault = (org.ksoap2.SoapFault)__retObj; 222 | throw convertToException(__fault,__envelope); 223 | }else{ 224 | return wcfMethod.ProcessResult(__envelope,__retObj); 225 | } 226 | } 227 | 228 | 229 | protected java.lang.Exception convertToException(org.ksoap2.SoapFault fault,EDUExtendedSoapSerializationEnvelope envelope) 230 | { 231 | org.ksoap2.SoapFault newException = fault; 232 | return newException; 233 | } 234 | } 235 | 236 | 237 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUKPSPublicSoap12.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | 3 | //---------------------------------------------------- 4 | // 5 | // Generated by www.easywsdl.com 6 | // Version: 7.0.2.0 7 | // 8 | // Created by Quasar Development 9 | // 10 | //---------------------------------------------------- 11 | 12 | 13 | 14 | import org.ksoap2.HeaderProperty; 15 | import org.ksoap2.serialization.*; 16 | import org.ksoap2.transport.*; 17 | import org.kxml2.kdom.Element; 18 | 19 | import java.lang.reflect.Constructor; 20 | import java.util.ArrayList; 21 | import java.util.Arrays; 22 | import java.util.List; 23 | 24 | 25 | public class EDUKPSPublicSoap12 26 | { 27 | interface EDUIWcfMethod 28 | { 29 | EDUExtendedSoapSerializationEnvelope CreateSoapEnvelope() throws java.lang.Exception; 30 | 31 | java.lang.Object ProcessResult(EDUExtendedSoapSerializationEnvelope __envelope,java.lang.Object result) throws java.lang.Exception; 32 | } 33 | 34 | String url="https://tckimlik.nvi.gov.tr/Service/KPSPublic.asmx"; 35 | 36 | int timeOut=60000; 37 | 38 | public List< HeaderProperty> httpHeaders= new ArrayList< HeaderProperty>(); 39 | public boolean enableLogging; 40 | 41 | 42 | public EDUKPSPublicSoap12(){} 43 | 44 | public EDUKPSPublicSoap12(String url) 45 | { 46 | this.url = url; 47 | } 48 | 49 | public EDUKPSPublicSoap12(String url,int timeOut) 50 | { 51 | this.url = url; 52 | this.timeOut=timeOut; 53 | } 54 | 55 | protected org.ksoap2.transport.Transport createTransport() 56 | { 57 | try 58 | { 59 | java.net.URI uri = new java.net.URI(url); 60 | if(uri.getScheme().equalsIgnoreCase("https")) 61 | { 62 | int port=uri.getPort()>0?uri.getPort():443; 63 | String path=uri.getPath(); 64 | if(uri.getQuery()!=null && uri.getQuery()!="") 65 | { 66 | path+="?"+uri.getQuery(); 67 | } 68 | return new com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE(uri.getHost(), port, path, timeOut); 69 | } 70 | else 71 | { 72 | return new com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE(url,timeOut); 73 | } 74 | 75 | } 76 | catch (java.net.URISyntaxException e) 77 | { 78 | } 79 | return null; 80 | } 81 | 82 | protected EDUExtendedSoapSerializationEnvelope createEnvelope() 83 | { 84 | EDUExtendedSoapSerializationEnvelope envelope= new EDUExtendedSoapSerializationEnvelope(EDUExtendedSoapSerializationEnvelope.VER12); 85 | envelope.enableLogging = enableLogging; 86 | 87 | return envelope; 88 | } 89 | 90 | protected java.util.List sendRequest(String methodName,EDUExtendedSoapSerializationEnvelope envelope,org.ksoap2.transport.Transport transport ,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile )throws java.lang.Exception 91 | { 92 | if(transport instanceof com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE ) 93 | { 94 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 95 | } 96 | else 97 | { 98 | return ((com.easywsdl.exksoap2.transport.AdvancedHttpsTransportSE)transport).call(methodName, envelope,httpHeaders,null,profile); 99 | } 100 | } 101 | 102 | java.lang.Object getResult(java.lang.Class destObj,java.lang.Object source,String resultName,EDUExtendedSoapSerializationEnvelope __envelope) throws java.lang.Exception 103 | { 104 | if(source==null) 105 | { 106 | return null; 107 | } 108 | if(source instanceof SoapPrimitive) 109 | { 110 | SoapPrimitive soap =(SoapPrimitive)source; 111 | if(soap.getName().equals(resultName)) 112 | { 113 | java.lang.Object instance=__envelope.get(source,destObj,false); 114 | return instance; 115 | } 116 | } 117 | else 118 | { 119 | SoapObject soap = (SoapObject)source; 120 | if (soap.hasProperty(resultName)) 121 | { 122 | java.lang.Object j=soap.getProperty(resultName); 123 | if(j==null) 124 | { 125 | return null; 126 | } 127 | java.lang.Object instance=__envelope.get(j,destObj,false); 128 | return instance; 129 | } 130 | else if( soap.getName().equals(resultName)) 131 | { 132 | java.lang.Object instance=__envelope.get(source,destObj,false); 133 | return instance; 134 | } 135 | } 136 | 137 | return null; 138 | } 139 | 140 | 141 | 142 | 143 | public Boolean TCKimlikNoDogrula(final Long TCKimlikNo,final String Ad,final String Soyad,final Integer DogumYili) throws java.lang.Exception 144 | { 145 | com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile __profile = new com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile(); 146 | return (Boolean)execute(new EDUIWcfMethod() 147 | { 148 | @Override 149 | public EDUExtendedSoapSerializationEnvelope CreateSoapEnvelope(){ 150 | EDUExtendedSoapSerializationEnvelope __envelope = createEnvelope(); 151 | SoapObject __soapReq = new SoapObject("http://tckimlik.nvi.gov.tr/WS", "TCKimlikNoDogrula"); 152 | __envelope.setOutputSoapObject(__soapReq); 153 | 154 | PropertyInfo __info=null; 155 | __info = new PropertyInfo(); 156 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 157 | __info.name="TCKimlikNo"; 158 | __info.type=PropertyInfo.LONG_CLASS; 159 | __info.setValue(TCKimlikNo); 160 | __soapReq.addProperty(__info); 161 | __info = new PropertyInfo(); 162 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 163 | __info.name="Ad"; 164 | __info.type=PropertyInfo.STRING_CLASS; 165 | __info.setValue(Ad!=null?Ad:SoapPrimitive.NullSkip); 166 | __soapReq.addProperty(__info); 167 | __info = new PropertyInfo(); 168 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 169 | __info.name="Soyad"; 170 | __info.type=PropertyInfo.STRING_CLASS; 171 | __info.setValue(Soyad!=null?Soyad:SoapPrimitive.NullSkip); 172 | __soapReq.addProperty(__info); 173 | __info = new PropertyInfo(); 174 | __info.namespace="http://tckimlik.nvi.gov.tr/WS"; 175 | __info.name="DogumYili"; 176 | __info.type=PropertyInfo.INTEGER_CLASS; 177 | __info.setValue(DogumYili); 178 | __soapReq.addProperty(__info); 179 | return __envelope; 180 | } 181 | 182 | @Override 183 | public java.lang.Object ProcessResult(EDUExtendedSoapSerializationEnvelope __envelope,java.lang.Object __result)throws java.lang.Exception { 184 | SoapObject __soap=(SoapObject)__result; 185 | java.lang.Object obj = __soap.getProperty("TCKimlikNoDogrulaResult"); 186 | if (obj instanceof SoapPrimitive) 187 | { 188 | SoapPrimitive j =(SoapPrimitive) obj; 189 | return Boolean.valueOf(j.toString()); 190 | } 191 | else if (obj!= null && obj instanceof Boolean){ 192 | return (Boolean)obj; 193 | } 194 | return null; 195 | } 196 | },"http://tckimlik.nvi.gov.tr/WS/TCKimlikNoDogrula",__profile); 197 | } 198 | 199 | protected java.lang.Object execute(EDUIWcfMethod wcfMethod,String methodName,com.easywsdl.exksoap2.ws_specifications.profile.WS_Profile profile) throws java.lang.Exception 200 | { 201 | org.ksoap2.transport.Transport __httpTransport=createTransport(); 202 | __httpTransport.debug=enableLogging; 203 | EDUExtendedSoapSerializationEnvelope __envelope=wcfMethod.CreateSoapEnvelope(); 204 | try 205 | { 206 | sendRequest(methodName, __envelope, __httpTransport,profile); 207 | } 208 | finally { 209 | if (__httpTransport.debug) { 210 | if (__httpTransport.requestDump != null) { 211 | System.out.println("requestDump: "+__httpTransport.requestDump); 212 | 213 | } 214 | if (__httpTransport.responseDump != null) { 215 | System.out.println("responseDump: "+__httpTransport.responseDump); 216 | } 217 | } 218 | } 219 | java.lang.Object __retObj = __envelope.bodyIn; 220 | if (__retObj instanceof org.ksoap2.SoapFault){ 221 | org.ksoap2.SoapFault __fault = (org.ksoap2.SoapFault)__retObj; 222 | throw convertToException(__fault,__envelope); 223 | }else{ 224 | return wcfMethod.ProcessResult(__envelope,__retObj); 225 | } 226 | } 227 | 228 | 229 | protected java.lang.Exception convertToException(org.ksoap2.SoapFault fault,EDUExtendedSoapSerializationEnvelope envelope) 230 | { 231 | org.ksoap2.SoapFault newException = fault; 232 | return newException; 233 | } 234 | } 235 | 236 | 237 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /usr/local/etc/mavenrc ] ; then 40 | . /usr/local/etc/mavenrc 41 | fi 42 | 43 | if [ -f /etc/mavenrc ] ; then 44 | . /etc/mavenrc 45 | fi 46 | 47 | if [ -f "$HOME/.mavenrc" ] ; then 48 | . "$HOME/.mavenrc" 49 | fi 50 | 51 | fi 52 | 53 | # OS specific support. $var _must_ be set to either true or false. 54 | cygwin=false; 55 | darwin=false; 56 | mingw=false 57 | case "`uname`" in 58 | CYGWIN*) cygwin=true ;; 59 | MINGW*) mingw=true;; 60 | Darwin*) darwin=true 61 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 62 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 63 | if [ -z "$JAVA_HOME" ]; then 64 | if [ -x "/usr/libexec/java_home" ]; then 65 | export JAVA_HOME="`/usr/libexec/java_home`" 66 | else 67 | export JAVA_HOME="/Library/Java/Home" 68 | fi 69 | fi 70 | ;; 71 | esac 72 | 73 | if [ -z "$JAVA_HOME" ] ; then 74 | if [ -r /etc/gentoo-release ] ; then 75 | JAVA_HOME=`java-config --jre-home` 76 | fi 77 | fi 78 | 79 | if [ -z "$M2_HOME" ] ; then 80 | ## resolve links - $0 may be a link to maven's home 81 | PRG="$0" 82 | 83 | # need this for relative symlinks 84 | while [ -h "$PRG" ] ; do 85 | ls=`ls -ld "$PRG"` 86 | link=`expr "$ls" : '.*-> \(.*\)$'` 87 | if expr "$link" : '/.*' > /dev/null; then 88 | PRG="$link" 89 | else 90 | PRG="`dirname "$PRG"`/$link" 91 | fi 92 | done 93 | 94 | saveddir=`pwd` 95 | 96 | M2_HOME=`dirname "$PRG"`/.. 97 | 98 | # make it fully qualified 99 | M2_HOME=`cd "$M2_HOME" && pwd` 100 | 101 | cd "$saveddir" 102 | # echo Using m2 at $M2_HOME 103 | fi 104 | 105 | # For Cygwin, ensure paths are in UNIX format before anything is touched 106 | if $cygwin ; then 107 | [ -n "$M2_HOME" ] && 108 | M2_HOME=`cygpath --unix "$M2_HOME"` 109 | [ -n "$JAVA_HOME" ] && 110 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 111 | [ -n "$CLASSPATH" ] && 112 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 113 | fi 114 | 115 | # For Mingw, ensure paths are in UNIX format before anything is touched 116 | if $mingw ; then 117 | [ -n "$M2_HOME" ] && 118 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 119 | [ -n "$JAVA_HOME" ] && 120 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 121 | fi 122 | 123 | if [ -z "$JAVA_HOME" ]; then 124 | javaExecutable="`which javac`" 125 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 126 | # readlink(1) is not available as standard on Solaris 10. 127 | readLink=`which readlink` 128 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 129 | if $darwin ; then 130 | javaHome="`dirname \"$javaExecutable\"`" 131 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 132 | else 133 | javaExecutable="`readlink -f \"$javaExecutable\"`" 134 | fi 135 | javaHome="`dirname \"$javaExecutable\"`" 136 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 137 | JAVA_HOME="$javaHome" 138 | export JAVA_HOME 139 | fi 140 | fi 141 | fi 142 | 143 | if [ -z "$JAVACMD" ] ; then 144 | if [ -n "$JAVA_HOME" ] ; then 145 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 146 | # IBM's JDK on AIX uses strange locations for the executables 147 | JAVACMD="$JAVA_HOME/jre/sh/java" 148 | else 149 | JAVACMD="$JAVA_HOME/bin/java" 150 | fi 151 | else 152 | JAVACMD="`\\unset -f command; \\command -v java`" 153 | fi 154 | fi 155 | 156 | if [ ! -x "$JAVACMD" ] ; then 157 | echo "Error: JAVA_HOME is not defined correctly." >&2 158 | echo " We cannot execute $JAVACMD" >&2 159 | exit 1 160 | fi 161 | 162 | if [ -z "$JAVA_HOME" ] ; then 163 | echo "Warning: JAVA_HOME environment variable is not set." 164 | fi 165 | 166 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 167 | 168 | # traverses directory structure from process work directory to filesystem root 169 | # first directory with .mvn subdirectory is considered project base directory 170 | find_maven_basedir() { 171 | 172 | if [ -z "$1" ] 173 | then 174 | echo "Path not specified to find_maven_basedir" 175 | return 1 176 | fi 177 | 178 | basedir="$1" 179 | wdir="$1" 180 | while [ "$wdir" != '/' ] ; do 181 | if [ -d "$wdir"/.mvn ] ; then 182 | basedir=$wdir 183 | break 184 | fi 185 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 186 | if [ -d "${wdir}" ]; then 187 | wdir=`cd "$wdir/.."; pwd` 188 | fi 189 | # end of workaround 190 | done 191 | echo "${basedir}" 192 | } 193 | 194 | # concatenates all lines of a file 195 | concat_lines() { 196 | if [ -f "$1" ]; then 197 | echo "$(tr -s '\n' ' ' < "$1")" 198 | fi 199 | } 200 | 201 | BASE_DIR=`find_maven_basedir "$(pwd)"` 202 | if [ -z "$BASE_DIR" ]; then 203 | exit 1; 204 | fi 205 | 206 | ########################################################################################## 207 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 208 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 209 | ########################################################################################## 210 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Found .mvn/wrapper/maven-wrapper.jar" 213 | fi 214 | else 215 | if [ "$MVNW_VERBOSE" = true ]; then 216 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 217 | fi 218 | if [ -n "$MVNW_REPOURL" ]; then 219 | jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 220 | else 221 | jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar" 222 | fi 223 | while IFS="=" read key value; do 224 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 225 | esac 226 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 227 | if [ "$MVNW_VERBOSE" = true ]; then 228 | echo "Downloading from: $jarUrl" 229 | fi 230 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 231 | if $cygwin; then 232 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 233 | fi 234 | 235 | if command -v wget > /dev/null; then 236 | if [ "$MVNW_VERBOSE" = true ]; then 237 | echo "Found wget ... using wget" 238 | fi 239 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 240 | wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 241 | else 242 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" 243 | fi 244 | elif command -v curl > /dev/null; then 245 | if [ "$MVNW_VERBOSE" = true ]; then 246 | echo "Found curl ... using curl" 247 | fi 248 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 249 | curl -o "$wrapperJarPath" "$jarUrl" -f 250 | else 251 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 252 | fi 253 | 254 | else 255 | if [ "$MVNW_VERBOSE" = true ]; then 256 | echo "Falling back to using Java to download" 257 | fi 258 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 259 | # For Cygwin, switch paths to Windows format before running javac 260 | if $cygwin; then 261 | javaClass=`cygpath --path --windows "$javaClass"` 262 | fi 263 | if [ -e "$javaClass" ]; then 264 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 265 | if [ "$MVNW_VERBOSE" = true ]; then 266 | echo " - Compiling MavenWrapperDownloader.java ..." 267 | fi 268 | # Compiling the Java class 269 | ("$JAVA_HOME/bin/javac" "$javaClass") 270 | fi 271 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 272 | # Running the downloader 273 | if [ "$MVNW_VERBOSE" = true ]; then 274 | echo " - Running MavenWrapperDownloader.java ..." 275 | fi 276 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 277 | fi 278 | fi 279 | fi 280 | fi 281 | ########################################################################################## 282 | # End of extension 283 | ########################################################################################## 284 | 285 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 286 | if [ "$MVNW_VERBOSE" = true ]; then 287 | echo $MAVEN_PROJECTBASEDIR 288 | fi 289 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 290 | 291 | # For Cygwin, switch paths to Windows format before running java 292 | if $cygwin; then 293 | [ -n "$M2_HOME" ] && 294 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 295 | [ -n "$JAVA_HOME" ] && 296 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 297 | [ -n "$CLASSPATH" ] && 298 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 299 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 300 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 301 | fi 302 | 303 | # Provide a "standardized" way to retrieve the CLI args that will 304 | # work with both Windows and non-Windows executions. 305 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 306 | export MAVEN_CMD_LINE_ARGS 307 | 308 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 309 | 310 | exec "$JAVACMD" \ 311 | $MAVEN_OPTS \ 312 | $MAVEN_DEBUG_OPTS \ 313 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 314 | "-Dmaven.home=${M2_HOME}" \ 315 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 316 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 317 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/EDUExtendedSoapSerializationEnvelope.java: -------------------------------------------------------------------------------- 1 | package com.starbucks.starbucks.adapter; 2 | //---------------------------------------------------- 3 | // 4 | // Generated by www.easywsdl.com 5 | // Version: 7.0.2.0 6 | // 7 | // Created by Quasar Development 8 | // 9 | //---------------------------------------------------- 10 | 11 | import org.ksoap2.SoapEnvelope; 12 | import org.ksoap2.serialization.*; 13 | import org.kxml2.io.KXmlParser; 14 | import org.kxml2.kdom.Element; 15 | import org.xmlpull.v1.XmlPullParser; 16 | import org.xmlpull.v1.XmlPullParserFactory; 17 | import org.xmlpull.v1.XmlSerializer; 18 | import org.xmlpull.v1.XmlPullParserException; 19 | 20 | import java.io.IOException; 21 | import java.lang.reflect.Field; 22 | import java.lang.reflect.InvocationTargetException; 23 | import java.lang.reflect.Constructor; 24 | import java.lang.reflect.Method; 25 | import java.util.HashMap; 26 | import java.util.Vector; 27 | import java.io.StringReader; 28 | import java.io.StringWriter; 29 | 30 | 31 | class EDUSoapFaultEx extends org.ksoap2.SoapFault 32 | { 33 | public Object fault; 34 | } 35 | 36 | //If you have a compilation error here then you have to add a reference to ExKsoap2.jar to your project (you can find it in Libs folder in the generated zip file) 37 | public class EDUExtendedSoapSerializationEnvelope extends com.easywsdl.exksoap2.serialization.ExSoapSerializationEnvelope { 38 | static HashMap< java.lang.String,java.lang.Class> classNames = new HashMap< java.lang.String, java.lang.Class>(); 39 | public static String TAG="easyWSDL"; 40 | 41 | protected static final int QNAME_NAMESPACE = 0; 42 | private static final String TYPE_LABEL = "type"; 43 | public boolean enableLogging; 44 | 45 | public static void setDateTimeConverter(EDUDateTimeConverter converter) 46 | { 47 | if(converter==null) 48 | { 49 | dateTimeConverter = new EDUStandardDateTimeConverter(); 50 | } 51 | dateTimeConverter=converter; 52 | } 53 | 54 | public static EDUDateTimeConverter getDateTimeConverter() 55 | { 56 | return dateTimeConverter; 57 | } 58 | 59 | private static EDUDateTimeConverter dateTimeConverter = new EDUStandardDateTimeConverter(); 60 | 61 | public EDUExtendedSoapSerializationEnvelope() { 62 | this(SoapEnvelope.VER11); 63 | } 64 | 65 | public EDUExtendedSoapSerializationEnvelope(int soapVersion) { 66 | super(soapVersion); 67 | implicitTypes = true; 68 | setAddAdornments(false); 69 | new EDUMarshalGuid().register(this); 70 | new MarshalFloat().register(this); 71 | } 72 | 73 | 74 | @Override 75 | public void writeBody(XmlSerializer writer) throws IOException { 76 | if(this.bodyOut instanceof SoapObject) 77 | { 78 | SoapObject root=(SoapObject)this.bodyOut; 79 | if(root.getName().equals("") && root.getNamespace().equals("")) 80 | { 81 | Field declaredField = null; 82 | try { 83 | 84 | Vector multiRef = new Vector(); 85 | multiRef.addElement(this.bodyOut); 86 | 87 | declaredField = SoapSerializationEnvelope.class.getDeclaredField("multiRef"); 88 | boolean accessible = declaredField.isAccessible(); 89 | declaredField.setAccessible(true); 90 | declaredField.set(this, multiRef); 91 | declaredField.setAccessible(accessible); 92 | 93 | } catch (NoSuchFieldException 94 | | SecurityException 95 | | IllegalArgumentException 96 | | IllegalAccessException e) { 97 | e.printStackTrace(); 98 | } 99 | 100 | this.writeElement(writer, this.bodyOut, (PropertyInfo)null, null); 101 | return; 102 | } 103 | } 104 | super.writeBody(writer); 105 | } 106 | 107 | @Override 108 | protected void writeProperty(XmlSerializer writer, java.lang.Object obj, PropertyInfo type) throws IOException { 109 | //!!!!! If you have a compilation error here then you are using old version of ksoap2 library. Please upgrade to the latest version. 110 | //!!!!! You can find a correct version in Lib folder from generated zip file!!!!! 111 | if (obj == null || obj== SoapPrimitive.NullNilElement) { 112 | writer.attribute(xsi, version >= VER12 ? NIL_LABEL : NULL_LABEL, "true"); 113 | return; 114 | } 115 | if(writeReferenceObject(writer,obj)) 116 | { 117 | return; 118 | } 119 | java.lang.Object[] qName = getInfo(null, obj); 120 | if (!type.multiRef && qName[2] == null ) 121 | { 122 | if (!implicitTypes || (obj.getClass() != type.type && !(obj instanceof Vector ) && type.type!=java.lang.String.class )) { 123 | java.lang.String xmlName=EDUHelper.getKeyByValue(classNames,obj.getClass()); 124 | if(xmlName!=null) { 125 | java.lang.String[] parts = xmlName.split("\\^\\^"); 126 | java.lang.String prefix = writer.getPrefix(parts[0], true); 127 | writer.attribute(xsi, TYPE_LABEL, prefix + ":" + parts[1]); 128 | } 129 | else 130 | { 131 | if(type.type instanceof String) { 132 | java.lang.String xsdPrefix = writer.getPrefix(xsd, true); 133 | java.lang.String myType = (java.lang.String) type.type; 134 | java.lang.String[] parts = myType.split("\\^\\^"); 135 | if (parts.length == 2) { 136 | xsdPrefix = writer.getPrefix(parts[0], true); 137 | myType = parts[1]; 138 | } 139 | 140 | writer.attribute(xsi, TYPE_LABEL, xsdPrefix + ":" + myType); 141 | } 142 | else 143 | { 144 | java.lang.String prefix = writer.getPrefix(type.namespace, true); 145 | writer.attribute(xsi, TYPE_LABEL, prefix + ":" + obj.getClass().getSimpleName()); 146 | } 147 | 148 | } 149 | } 150 | //super.writeProperty(writer,obj,type); 151 | 152 | //!!!!! If you have a compilation error here then you are using old version of ksoap2 library. Please upgrade to the latest version. 153 | //!!!!! You can find a correct version in Lib folder from generated zip file!!!!! 154 | writeElement(writer, obj, type, qName[QNAME_MARSHAL]); 155 | } 156 | else { 157 | super.writeProperty(writer, obj, type); 158 | } 159 | } 160 | 161 | public SoapObject GetExceptionDetail(Element detailElement,java.lang.String exceptionElementNS,java.lang.String exceptionElementName) 162 | { 163 | int index=detailElement.indexOf(exceptionElementNS,exceptionElementName,0); 164 | if(index>-1) 165 | { 166 | Element errorElement=detailElement.getElement(index); 167 | return GetSoapObject(errorElement); 168 | } 169 | return null; 170 | } 171 | 172 | public SoapObject GetSoapObject(Element detailElement) { 173 | try{ 174 | XmlSerializer xmlSerializer = XmlPullParserFactory.newInstance().newSerializer(); 175 | StringWriter writer = new StringWriter(); 176 | xmlSerializer.setOutput(writer); 177 | detailElement.write(xmlSerializer); 178 | xmlSerializer.flush(); 179 | 180 | XmlPullParser xpp = new KXmlParser(); 181 | xpp.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); 182 | 183 | xpp.setInput(new StringReader(writer.toString())); 184 | xpp.nextTag(); 185 | SoapObject soapObj = new SoapObject(detailElement.getNamespace(),detailElement.getName()); 186 | readSerializable(xpp,soapObj); 187 | return soapObj; 188 | } 189 | catch (java.lang.Exception e) 190 | { 191 | if(enableLogging) 192 | { 193 | e.printStackTrace(); 194 | } 195 | } 196 | return null; 197 | } 198 | 199 | public java.lang.Object GetHeader(Element detailElement) { 200 | if(detailElement.getChildCount()>0 && detailElement.getText(0)!=null) 201 | { 202 | SoapPrimitive primitive = new SoapPrimitive(detailElement.getNamespace(),detailElement.getName(),detailElement.getText(0)); 203 | return primitive; 204 | } 205 | 206 | return GetSoapObject(detailElement); 207 | } 208 | private Object createObject(Object soap, Class cl) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { 209 | Object obj=cl.newInstance(); 210 | Method ctor = obj.getClass().getMethod("loadFromSoap",Object.class,EDUExtendedSoapSerializationEnvelope.class); 211 | ctor.invoke(obj,soap,this); 212 | return obj; 213 | } 214 | 215 | public java.lang.Object get(java.lang.Object soap,java.lang.Class cl,boolean typeFromClass) 216 | { 217 | if(soap==null) 218 | { 219 | return null; 220 | } 221 | try 222 | { 223 | if(typeFromClass) 224 | { 225 | return createObject(soap, cl); 226 | } 227 | java.lang.Object refAttr=getReference(soap); 228 | if (refAttr != null) 229 | { 230 | return refAttr; 231 | } 232 | else 233 | { 234 | if(soap instanceof SoapObject) 235 | { 236 | if(cl ==SoapObject.class) 237 | { 238 | return soap; 239 | } 240 | java.lang.String key=String.format("%s^^%s",((SoapObject)soap).getNamespace(),((SoapObject)soap).getName()); 241 | if(classNames.containsKey(key)) 242 | { 243 | cl=classNames.get(key); 244 | } 245 | } 246 | return createObject(soap, cl); 247 | } 248 | } 249 | catch (java.lang.Exception e) 250 | { 251 | if(enableLogging) 252 | { 253 | e.printStackTrace(); 254 | } 255 | return null; 256 | } 257 | } 258 | 259 | 260 | public java.lang.Object getSpecificType(java.lang.Object obj) 261 | { 262 | if(obj==null) 263 | { 264 | return null; 265 | } 266 | if(obj instanceof SoapObject) 267 | { 268 | SoapObject soapObject=(SoapObject)obj; 269 | java.lang.String key=soapObject.getNamespace()+"^^"+soapObject.getName(); 270 | if(classNames.containsKey(key)) 271 | { 272 | java.lang.Class cl=classNames.get(key); 273 | try 274 | { 275 | return createObject(soapObject, cl); 276 | } 277 | catch (java.lang.Exception e) 278 | { 279 | if(enableLogging) 280 | { 281 | e.printStackTrace(); 282 | } 283 | } 284 | } 285 | } 286 | 287 | return obj; 288 | } 289 | 290 | public static java.lang.Object getXSDType(java.lang.Object param) 291 | { 292 | if(param==null) 293 | { 294 | return null; 295 | } 296 | java.lang.Class obj=param.getClass(); 297 | if(obj.equals(java.lang.String.class)) 298 | { 299 | return "string"; 300 | } 301 | if(obj.equals(int.class) || obj.equals(java.lang.Integer.class)) 302 | { 303 | return "int"; 304 | } 305 | if(obj.equals(float.class) || obj.equals(java.lang.Float.class)) 306 | { 307 | return "float"; 308 | } 309 | if(obj.equals(double.class) || obj.equals(java.lang.Double.class)) 310 | { 311 | return "double"; 312 | } 313 | if(obj.equals(java.math.BigDecimal.class)) 314 | { 315 | return "decimal"; 316 | } 317 | if(obj.equals(short.class) || obj.equals(java.lang.Short.class)) 318 | { 319 | return "short"; 320 | } 321 | if(obj.equals(long.class) || obj.equals(java.lang.Long.class)) 322 | { 323 | return "long"; 324 | } 325 | if(obj.equals(boolean.class) || obj.equals(java.lang.Boolean.class)) 326 | { 327 | return "boolean"; 328 | } 329 | java.lang.String xmlName=EDUHelper.getKeyByValue(classNames,obj); 330 | if(xmlName==null) 331 | { 332 | return obj; 333 | } 334 | return xmlName; 335 | } 336 | } 337 | 338 | -------------------------------------------------------------------------------- /src/main/java/com/starbucks/starbucks/adapter/docs/Styles/Blueprint_Styles/Style.css: -------------------------------------------------------------------------------- 1 | /* This file defines styles for all template elements. 2 | 3 | The following pages can help you get started with CSS: 4 | * CSS Tutorial (http://w3schools.com/css/default.asp) 5 | * CSS3 Tutorial (http://w3schools.com/css3/default.asp) 6 | * CSS Reference (http://w3schools.com/cssref/default.asp) */ 7 | 8 | 9 | body 10 | { 11 | font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; 12 | margin: 0px; 13 | padding: 0; 14 | background: #f2f2f2 url('../../Storage/Blueprint_Files/CommonImages/debut_light.png'); 15 | color: #696969; 16 | } 17 | 18 | /* Import font from Google Web Fonts */ 19 | @font-face { 20 | font-family: 'Electrolize'; 21 | font-style: normal; 22 | font-weight: 400; 23 | src: local('Electrolize'), local('Electrolize-Regular'), url(https://themes.googleusercontent.com/static/fonts/electrolize/v2/DDy9sgU2U7S4xAwH5thnJ4bN6UDyHWBl620a-IRfuBk.woff) format('woff'); 24 | } 25 | 26 | /* Import font from Storage */ 27 | @font-face { 28 | font-family:'PTSansNarrowRegular'; 29 | src: local('PTSansNarrowRegular'), url('../../Storage/Blueprint_Files/Fonts/PTN57F-webfont.eot') format('embedded-opentype'),url('../../Storage/Blueprint_Files/Fonts/PTN57F-webfont.woff') format('woff'),url('.ttf') format('truetype/resources/Storage/Blueprint%20Template_Files/Fonts/PTN57F-webfont'),url('../../Storage/Blueprint_Files/Fonts/PTN57F-webfont.svg') format('svg'); 30 | font-weight: normal; 31 | font-style: normal; 32 | } 33 | 34 | a 35 | { 36 | color: #1240ab; 37 | } 38 | 39 | a:link,a:visited 40 | { 41 | color: #1240ab; 42 | } 43 | 44 | a:hover 45 | { 46 | color: #4671D5; 47 | text-decoration: none; 48 | } 49 | 50 | a:active 51 | { 52 | color: #2A4480; 53 | } 54 | 55 | a img 56 | { 57 | border:0; 58 | } 59 | 60 | p 61 | { 62 | text-align: justify; 63 | } 64 | 65 | h1 66 | { 67 | font-family: 'Electrolize', sans-serif; 68 | color: #6c8cd5; 69 | margin-top:10px; 70 | margin-bottom:10px; 71 | } 72 | 73 | h2 74 | { 75 | border-bottom: 1px solid #DEDEDE; 76 | border-left: 5px solid #C4D1EE; 77 | font-family: 'PTSansNarrowRegular', sans-serif; 78 | text-align: left; 79 | color: #886DDF; 80 | margin-top: 10px; 81 | margin-bottom: 10px; 82 | padding-bottom: 5px; 83 | padding-left: 5px; 84 | } 85 | 86 | ul 87 | { 88 | list-style-image: url('../../Storage/Blueprint_Files/CommonImages/list_item.png'); 89 | padding-left: 40px; 90 | } 91 | ul li 92 | { 93 | margin-top: 0.25em; 94 | margin-bottom: 0.25em; 95 | vertical-align: middle; 96 | } 97 | 98 | ol 99 | { 100 | padding-left: 40px; 101 | font-family: 'Electrolize', sans-serif; 102 | color: #1240ab; 103 | font-weight: bold; 104 | } 105 | ol li 106 | { 107 | margin-top: 0.4em; 108 | margin-bottom: 0.4em; 109 | } 110 | ol li p 111 | { 112 | margin: 0; 113 | font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif; 114 | font-weight: normal; 115 | color:#696969; 116 | } 117 | 118 | /* --- Custom classes --- */ 119 | 120 | /* Start Page */ 121 | 122 | #startDiv1 123 | { 124 | background: url('../../Storage/Blueprint_Files/CommonImages/noisy_grid.png'); 125 | } 126 | 127 | #startDiv2 128 | { 129 | background: url('../../Storage/Blueprint_Files/Images/AbstractBanner_WireGrids.jpg') no-repeat left top; 130 | height: 120px; 131 | border-bottom: 1px solid #a2a2a2; 132 | border-left:5px solid #4671D5; 133 | } 134 | 135 | #startDiv2 h1 136 | { 137 | margin: 0; 138 | padding: 10px; 139 | padding-top: 30px; 140 | color: #412c84; 141 | font-size: 40px; 142 | } 143 | 144 | #startWrapper 145 | { 146 | background: white; 147 | margin: 0; 148 | text-align: justify; 149 | } 150 | 151 | #startWrapper p 152 | { 153 | padding-left: 10px; 154 | } 155 | 156 | #startTemplatesTable 157 | { 158 | width: 100%; 159 | padding: 10px; 160 | } 161 | 162 | #startTemplatesTable td 163 | { 164 | vertical-align: top; 165 | width: 33%; 166 | } 167 | 168 | #startTemplatesTable h2 169 | { 170 | padding-top: 0; 171 | padding-left: 10px; 172 | border: 0px none; 173 | } 174 | 175 | #startContactUs 176 | { 177 | padding: 10px; 178 | } 179 | 180 | /* Wrapper & footer elements */ 181 | 182 | .wrapperDiv 183 | { 184 | background: white url('../../Storage/Blueprint_Files/CommonImages/panel_back.png') repeat-x left top; 185 | padding: 8px; 186 | text-align: justify; 187 | } 188 | 189 | .footer 190 | { 191 | font-size: 12px; 192 | padding: 8px; 193 | background-color: transparent; 194 | background-image: url('../../Storage/Blueprint_Files/CommonImages/panel_back.png'); 195 | background-repeat: repeat-x; 196 | background-position: left top; 197 | color: #696969; 198 | } 199 | 200 | /* Tables */ 201 | /* Simple table */ 202 | .tableSimple 203 | { 204 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 205 | font-size: 12px; 206 | margin: 10px; 207 | margin-left: 30px; 208 | width: 100%; 209 | text-align: left; 210 | border-collapse: collapse; 211 | border: 1px solid #1240ab; 212 | } 213 | .tableSimple th 214 | { 215 | padding: 15px 10px 10px 10px; 216 | font-weight: normal; 217 | font-size: 14px; 218 | color: #3914b0; 219 | text-align:left; 220 | } 221 | .tableSimple tbody 222 | { 223 | background: white; 224 | } 225 | .tableSimple td 226 | { 227 | padding: 10px; 228 | color: #333; 229 | border-top: 1px dashed #06266f; 230 | text-align: left; 231 | } 232 | .tableSimple tfoot td 233 | { 234 | text-align:left; 235 | } 236 | .tableSimple tbody tr:hover td 237 | { 238 | color: #06266f; 239 | background: #F0EDFB; 240 | } 241 | 242 | /* Table with odd and even rows */ 243 | .tableZebra 244 | { 245 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 246 | font-size: 12px; 247 | margin: 10px; 248 | margin-left: 30px; 249 | text-align: left; 250 | border-collapse: collapse; 251 | } 252 | .tableZebra th 253 | { 254 | font-size: 14px; 255 | font-weight: normal; 256 | padding: 10px 8px; 257 | color: #3914b0; 258 | } 259 | .tableZebra td 260 | { 261 | padding: 8px; 262 | color: #333; 263 | } 264 | .tableZebra .odd 265 | { 266 | background: #EFEAFF; 267 | } 268 | 269 | /* Table with both rows and columns having odd/even styles */ 270 | .tableVerZebra 271 | { 272 | font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif; 273 | font-size: 12px; 274 | margin: 10px; 275 | margin-left: 30px; 276 | text-align: left; 277 | border-collapse: collapse; 278 | } 279 | .tableVerZebra th 280 | { 281 | font-size: 14px; 282 | font-weight: normal; 283 | padding: 12px 15px; 284 | border-right: 1px solid #fff; 285 | border-left: 1px solid #fff; 286 | color: #3914b0; 287 | } 288 | .tableVerZebra td 289 | { 290 | padding: 8px 15px; 291 | border-right: 1px solid #fff; 292 | border-left: 1px solid #fff; 293 | color: #333; 294 | } 295 | .tableVerZebraColOdd 296 | { 297 | background: #E0E6F6; 298 | } 299 | .tableVerZebraColEven 300 | { 301 | background: #F0EDFB; 302 | } 303 | .tableVerZebra .odd 304 | { 305 | background: #d9d1f2; 306 | border-bottom: 1px solid #AEA7C2; 307 | } 308 | .tableVerZebra .even 309 | { 310 | background: #dce4ff; 311 | border-bottom: 1px solid #99D699; 312 | } 313 | 314 | /* Pictures */ 315 | 316 | .bigImage 317 | { 318 | width: 500px; 319 | height: 355px; 320 | margin:auto; 321 | display:block; 322 | padding-top: 15px; 323 | padding-bottom: 12px; 324 | } 325 | 326 | .bigImageSignature 327 | { 328 | text-align: center; 329 | } 330 | 331 | /* Info Box */ 332 | .infoBox 333 | { 334 | width: 500px; 335 | background-color: #efefef; 336 | border-left: 5px solid #a7bae6; 337 | padding: 8px; 338 | font-size: 0.8em; 339 | } 340 | 341 | .warningBox 342 | { 343 | width: 500px; 344 | background-color: #FFFAD0; 345 | border-left: 5px solid #EEAD4D; 346 | padding: 8px; 347 | font-size: 0.8em; 348 | } 349 | 350 | /* Round Corners Box */ 351 | .roundCornersBox 352 | { 353 | padding: 10px; 354 | width: 400px; 355 | margin: auto; 356 | margin-top: 10px; 357 | margin-bottom: 10px; 358 | border: 1px solid #1240ab; 359 | -moz-box-shadow: 2px 2px 5px #a2a2a2; 360 | -webkit-box-shadow: 2px 2px 5px #a2a2a2; 361 | box-shadow: 2px 2px 5px #a2a2a2; 362 | 363 | border-radius: 8px 8px 8px 8px; 364 | -moz-border-radius: 8px 8px 8px 8px; 365 | -webkit-border-radius: 8px 8px 8px 8px; 366 | } 367 | 368 | /* Text Shadow */ 369 | .textShadow 370 | { 371 | text-shadow: 1px 1px 1px #a2a2a2; 372 | } 373 | 374 | .textGlow 375 | { 376 | text-shadow: 0px 0px 5px #6666DD; 377 | } 378 | 379 | /* Gradients */ 380 | .gradTopBottom 381 | { 382 | height: 100px; 383 | margin-bottom: 10px; 384 | margin-top: 10px; 385 | 386 | /* Safari 4-5, Chrome 1-9 */ 387 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#1240ab), to(#dbd4f3)); 388 | 389 | /* Safari 5.1, Chrome 10+ */ 390 | background: -webkit-linear-gradient(top, #dbd4f3, #1240ab); 391 | 392 | /* Firefox 3.6+ */ 393 | background: -moz-linear-gradient(top, #dbd4f3, #1240ab); 394 | 395 | /* IE 10 */ 396 | background: -ms-linear-gradient(top, #dbd4f3, #1240ab); 397 | 398 | /* Opera 11.10+ */ 399 | background: -o-linear-gradient(top, #dbd4f3, #1240ab); 400 | } 401 | 402 | .gradLeftRight 403 | { 404 | height: 100px; 405 | margin-bottom: 10px; 406 | margin-top: 10px; 407 | 408 | /* Safari 4-5, Chrome 1-9 */ 409 | background: -webkit-gradient(linear, left top, right top, from(#1240ab), to(#dbd4f3)); 410 | 411 | /* Safari 5.1, Chrome 10+ */ 412 | background: -webkit-linear-gradient(left, #dbd4f3, #1240ab); 413 | 414 | /* Firefox 3.6+ */ 415 | background: -moz-linear-gradient(left, #dbd4f3, #1240ab); 416 | 417 | /* IE 10 */ 418 | background: -ms-linear-gradient(left, #dbd4f3, #1240ab); 419 | 420 | /* Opera 11.10+ */ 421 | background: -o-linear-gradient(left, #dbd4f3, #1240ab); 422 | } 423 | 424 | .gradLeftRightCustomStops 425 | { 426 | height: 100px; 427 | margin-bottom: 10px; 428 | margin-top: 10px; 429 | 430 | /* Safari 4-5, Chrome 1-9 */ 431 | background: -webkit-gradient(linear, left top, right top, from(#dbd4f3), color-stop(0.05, #1240ab), color-stop(0.5, #dbd4f3), color-stop(0.95, #1240ab), to(#dbd4f3)); 432 | 433 | /* Safari 5.1+, Chrome 10+ */ 434 | background: -webkit-linear-gradient(left, #dbd4f3, #1240ab 5%, #dbd4f3, #1240ab 95%, #dbd4f3); 435 | 436 | /* Firefox 3.6+ */ 437 | background: -moz-linear-gradient(left, #dbd4f3, #1240ab 5%, #dbd4f3, #1240ab 95%, #dbd4f3); 438 | 439 | /* IE 10 */ 440 | background: -ms-linear-gradient(left, #dbd4f3, #1240ab 5%, #dbd4f3, #1240ab 95%, #dbd4f3); 441 | 442 | /* Opera 11.10+ */ 443 | background: -o-linear-gradient(left, #dbd4f3, #1240ab 5%, #dbd4f3, #1240ab 95%, #dbd4f3); 444 | } 445 | 446 | /* Animation */ 447 | .movingTextContainer 448 | { 449 | height: 220px; 450 | width: 550px; 451 | margin: auto; 452 | margin-top: 10px; 453 | margin-bottom: 10px; 454 | } 455 | 456 | .movingText 457 | { 458 | position: relative; 459 | width: 350px; 460 | animation: movingTextAnimation 5s infinite; 461 | -moz-animation: movingTextAnimation 5s infinite; /* Firefox */ 462 | -webkit-animation: movingTextAnimation 5s infinite; /* Safari and Chrome */ 463 | -o-animation: movingTextAnimation 5s infinite; /* Opera */ 464 | } 465 | 466 | @keyframes movingTextAnimation 467 | { 468 | 0% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 469 | 25% {text-shadow: 0px 0px 5px #1240ab; left: 200px; top: 0px;} 470 | 50% {text-shadow: 0px 0px 10px #1240ab; left: 200px; top: 200px;} 471 | 75% {text-shadow: 0px 0px 5px #1240ab; left: 0px; top: 200px;} 472 | 100% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 473 | } 474 | 475 | @-moz-keyframes movingTextAnimation /* Firefox */ 476 | { 477 | 0% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 478 | 25% {text-shadow: 0px 0px 5px #1240ab; left: 200px; top: 0px;} 479 | 50% {text-shadow: 0px 0px 10px #1240ab; left: 200px; top: 200px;} 480 | 75% {text-shadow: 0px 0px 5px #1240ab; left: 0px; top: 200px;} 481 | 100% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 482 | } 483 | 484 | @-webkit-keyframes movingTextAnimation /* Safari and Chrome */ 485 | { 486 | 0% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 487 | 25% {text-shadow: 0px 0px 5px #1240ab; left: 200px; top: 0px;} 488 | 50% {text-shadow: 0px 0px 10px #1240ab; left: 200px; top: 200px;} 489 | 75% {text-shadow: 0px 0px 5px #1240ab; left: 0px; top: 200px;} 490 | 100% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 491 | } 492 | 493 | @-o-keyframes movingTextAnimation /* Opera */ 494 | { 495 | 0% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 496 | 25% {text-shadow: 0px 0px 5px #1240ab; left: 200px; top: 0px;} 497 | 50% {text-shadow: 0px 0px 10px #1240ab; left: 200px; top: 200px;} 498 | 75% {text-shadow: 0px 0px 5px #1240ab; left: 0px; top: 200px;} 499 | 100% {text-shadow: 0px 0px 1px #1240ab; left: 0px; top: 0px;} 500 | } 501 | 502 | /* Variables */ 503 | 504 | .varGlobal 505 | { 506 | background-color: #efefef; 507 | white-space:nowrap; 508 | } 509 | 510 | .varProject 511 | { 512 | background-color: #CCFFCC; 513 | white-space:nowrap; 514 | } 515 | 516 | /* Conditional Content */ 517 | 518 | .condContentInclude 519 | { 520 | background-color: #E0F5FF; 521 | } 522 | 523 | .condContentExclude 524 | { 525 | background-color: #FFE1CC; 526 | } 527 | 528 | 529 | /* Snippets */ 530 | 531 | .sampleSnippet 532 | { 533 | background-color: #F4E8FF; 534 | } 535 | 536 | /* Multiple Columns */ 537 | 538 | .multiColTable 539 | { 540 | width: 100%; 541 | } 542 | 543 | .multiColTable td 544 | { 545 | width: 30%; 546 | padding-left: 10px; 547 | padding-right: 10px; 548 | text-align: justify; 549 | vertical-align: top; 550 | } 551 | 552 | .multiColDiv 553 | { 554 | -moz-column-count:3; /* Firefox */ 555 | -webkit-column-count:3; /* Safari and Chrome */ 556 | column-count:3; 557 | padding-left: 10px; 558 | padding-right: 10px; 559 | } 560 | 561 | /* Fixed Panel */ 562 | 563 | .fixedPanelMainText 564 | { 565 | padding-top: 50px; 566 | } 567 | 568 | .fixedPanel 569 | { 570 | position: fixed; 571 | top: 0; 572 | left: 30px; 573 | padding: 10px; 574 | 575 | width: 550px; 576 | border-bottom: 3px solid #D3DCF2; 577 | background-color: #f3f3f3; 578 | } 579 | 580 | .nextTopicLink 581 | { 582 | float: right; 583 | } 584 | 585 | .seeAlso 586 | { 587 | color: #06266f; 588 | font-size:24px; 589 | } 590 | 591 | .seeAlsoList 592 | { 593 | padding-left: 20px; 594 | } 595 | 596 | /* Embedded Video */ 597 | 598 | .embeddedVideo 599 | { 600 | margin-left: 50px; 601 | margin-bottom: 10px; 602 | } 603 | 604 | /* Tutorials */ 605 | 606 | .tutorialNavBar 607 | { 608 | padding: 5px; 609 | font-family:'PTSansNarrowRegular', sans-serif; 610 | background-color: #f3f3f3; 611 | border-left: 5px solid #d3dcf2; 612 | } 613 | 614 | .tutorialNavLink 615 | { 616 | font-family:'PTSansNarrowRegular', sans-serif; 617 | } 618 | 619 | /* FAQ */ 620 | 621 | .faqQuestion 622 | { 623 | font-weight: bold; 624 | font-style: italic; 625 | color: #412c84; 626 | } 627 | 628 | .faqQuestionText 629 | { 630 | font-style: italic; 631 | background-color: #efefef; 632 | border-left: 5px solid #a7bae6; 633 | padding-left: 15px; 634 | padding-top: 3px; 635 | padding-bottom: 3px; 636 | } 637 | 638 | .faqAnswer 639 | { 640 | color: #412c84; 641 | font-weight: bold; 642 | } --------------------------------------------------------------------------------