https://github.com/inomera/web-service-partner-simulation
Web Service Partner Simulation
https://github.com/inomera/web-service-partner-simulation
Last synced: about 1 month ago
JSON representation
Web Service Partner Simulation
- Host: GitHub
- URL: https://github.com/inomera/web-service-partner-simulation
- Owner: inomera
- License: mit
- Created: 2024-08-22T09:35:43.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-22T15:13:37.000Z (10 months ago)
- Last Synced: 2025-03-30T10:41:29.751Z (2 months ago)
- Language: Java
- Size: 62.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web Service Partner Simulation
## Overview
This project provides a set of web service endpoints for managing subscriptions. The endpoints are implemented using
Spring Boot and are exposed via SOAP web services.## WSDL and Endpoint
The WSDL for the web service can be accessed at the following URL:
- **PIMS Partner WSDL**: [http://localhost:8080/PimsPartnerSubscription.wsdl](http://localhost:8080/PimsPartnerSubscription.wsdl)
- **PIMS Partner Endpoint**: [http://localhost:8080/services](http://localhost:8080/services)## Endpoints
### SubscriptionPartnerEndpoint
This endpoint handles various subscription-related requests. The namespace URI for all operations
is `http://www.avea.com.tr/pims-partner/schema/subscription`.#### Operations
1. **SubscriptionCreatedRequest**
- **Local Part**: `SubscriptionCreatedRequest`
- **Method**: `handleSubscriptionCreatedRequest`
- **Description**: Handles the creation of a new subscription.
- **Response**: `SubscriptionCreatedResponse`2. **SubscriptionToBeDeactivatedRequest**
- **Local Part**: `SubscriptionToBeDeactivatedRequest`
- **Method**: `handleSubscriptionToBeDeactivatedRequest`
- **Description**: Handles the request to deactivate a subscription at the end of the current period.
- **Response**: `SubscriptionToBeDeactivatedResponse`3. **SubscriptionDeactivatedRequest**
- **Local Part**: `SubscriptionDeactivatedRequest`
- **Method**: `handleSubscriptionDeactivatedRequest`
- **Description**: Handles the deactivation of a subscription.
- **Response**: `SubscriptionDeactivatedResponse`## Example Requests
### SubscriptionCreatedRequest
```xml
NOT260778
SUB3538
OFRMEDYA
PRDMEDYA
2024-08-21T19:44:13.468+03:00
2024-08-21T19:44:13.468+03:00
2024-08-21T19:44:13.468+03:00
1
ACTIVE
SPP27750
SUB3538
OPP190083
2024-08-21T19:44:13.468+03:00
1
true
2024-08-21T19:44:13.468+03:00
2024-08-21T19:44:13.468+03:00
2024-08-21T19:44:13.468+03:00
2024-09-20T19:44:13.468+03:00
2024-12-20T19:44:13.468+03:00
0
SPP27748
SUB3538
OPP190081
2024-08-21T19:44:13.468+03:00
SRVCONTENTMEDYA
PUNIT
2024-08-21T19:44:13.468+03:00
SPP27746
SUB3538
OPP190080
2024-08-21T19:44:13.468+03:00
SRVSMSMOMEDYA
PUNIT
2024-08-21T19:44:13.468+03:00
SPP27744
SUB3538
OPP190082
2024-08-21T19:44:13.468+03:00
SRVSMSMTMEDYA
PUNIT
2024-08-21T19:44:13.468+03:00
905554443323
TX1672760
activationCode
32ChdQePYw
```
### SubscriptionCreatedResponse
#### Success
```xml
OK
Service processed successfully
```
#### Fail
```xml
FAILED
WSPS: Simulating partner error.
```
### SubscriptionToBeDeactivatedRequest
```xml
NOT260844
SUB3604
OFRMEDYA
PRDMEDYA
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-09-21T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
1
ACTIVE
SPP28108
SUB3604
OPP190083
2024-08-22T10:39:38.643+03:00
1
true
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-09-21T10:39:38.643+03:00
2024-12-21T10:39:38.643+03:00
0
SPP28106
SUB3604
OPP190081
2024-08-22T10:39:38.643+03:00
SRVCONTENTMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
SPP28102
SUB3604
OPP190082
2024-08-22T10:39:38.643+03:00
SRVSMSMTMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
SPP28104
SUB3604
OPP190080
2024-08-22T10:39:38.643+03:00
SRVSMSMOMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
905554443323
TX1673013
subscriptionStopReason
İş ortağının isteğiyle abonelik iptal edildi.
com.inomera.pims.sal.so.subscription.SubscriptionStopRequestReason
PARTNER_DEACTIVE
stopChannel
PTRAPI
activationCode
32ChdQePYw
```
### SubscriptionToBeDeactivatedResponse
#### Success
```xml
OK
Service processed successfully
```
#### Fail
```xml
FAILED
WSPS: Simulating partner error.
```
### SubscriptionDeactivatedRequest
```xml
NOT260845
SUB3604
OFRMEDYA
PRDMEDYA
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
1
DEACTIVE
SPP28108
SUB3604
OPP190083
2024-08-22T10:39:38.643+03:00
1
true
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-08-22T10:39:38.643+03:00
2024-09-21T10:39:38.643+03:00
2024-12-21T10:39:38.643+03:00
-2586538526
SPP28106
SUB3604
OPP190081
2024-08-22T10:39:38.643+03:00
SRVCONTENTMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
SPP28102
SUB3604
OPP190082
2024-08-22T10:39:38.643+03:00
SRVSMSMTMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
SPP28104
SUB3604
OPP190080
2024-08-22T10:39:38.643+03:00
SRVSMSMOMEDYA
PUNIT
2024-08-22T10:39:38.643+03:00
905554443323
TX1673019
subscriptionStopReason
İş ortağının isteğiyle abonelik iptal edildi.
com.inomera.pims.sal.so.subscription.SubscriptionStopRequestReason
PARTNER_DEACTIVE
stopChannel
PTRAPI
activationCode
32ChdQePYw
```
### SubscriptionDeactivatedResponse
#### Success
```xml
OK
Service processed successfully
```
#### Fail
```xml
FAILED
WSPS: Simulating partner error.
```
## Logging
The endpoint methods log various details about the requests and responses for debugging purposes. The logs include
information such as subscription keys, offer keys, creation dates, start dates, and activation codes.## Security
The `PimsApiSecurityInterceptor` class handles basic authentication for the web service. It checks the `Authorization`
header for valid credentials.## Build and Run
This project supports both Maven and Gradle for building and running the application. The generated classes will be
placed in the appropriate directory.### Prerequisites
- JDK 21
- Spring Boot 3.3.2### Using Maven
To build and run the project using Maven, use the following commands:
```shell
./mvnw clean install
./mvnw spring-boot:run
```### Using Gradle
To build and run the project using Gradle, use the following commands:
```shell
./gradlew clean build
./gradlew bootRun
```## Contact
For any questions or issues, please contact the development team.