Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
VahidFarahmandian committed Jul 1, 2023
2 parents a1285c9 + ee1d710 commit b0333f1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: build-ci

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --configuration Release --no-build
1 change: 0 additions & 1 deletion 01-Core/Jinget.Core/Jinget.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>Vahid Farahmandian</Authors>
Expand Down
15 changes: 8 additions & 7 deletions 02-Handlers/Jinget.Handlers.ExternalServiceHandlers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var jingetServiceHandler = new JingetServiceHandler<SampleGetResponse>();
```csharp
var result = await jingetServiceHandler.GetAsync("https://jsonplaceholder.typicode.com", "/users", true, null);
```

------------
### How to call SOAP web Services:

1. For SOAP services, it would be important to create the request envelope before sending the request. To create the request envelop, You need to create classes for different parts of the request envelop. For example suppose that we need to model the following request envelop:
Expand Down Expand Up @@ -115,12 +115,13 @@ var (envelope, request) = new SampleSOAPRequest().CreateEnvelope();
envelope.Body.Add = new SampleSOAPRequest.SampleSOAPGet { intA = 1, intB = 2 };

var result = await jingetServiceHandler.PostAsync("http://www.dneonline.com/calculator.asmx", envelope.ToString(), true, new Dictionary<string, string>
{
{"Content-Type","text/xml" },
{"SOAPAction","http://tempuri.org/Add" }
});
{
{"Content-Type","text/xml" },
{"SOAPAction","http://tempuri.org/Add" }
});
```
In line number 2, we have our envelop and all we need to do, is to pass our parameters. In line number 4, the envelop is being send to the PostAsync method as string value. It is important to note the `SOAPAction` header.

------------
### How to use custom Service Handler

Expand All @@ -132,7 +133,7 @@ For example suppose that we have a class called `CustomHandler` as below:
...
}
```

------------
# How to install
In order to install Jinget please refer to [nuget.org](https://www.nuget.org/packages/Jinget.Handlers.ExternalServiceHandlers "nuget.org")

Expand All @@ -144,4 +145,4 @@ Sample codes are available via Unit Test projects which are provided beside the

📧 Email: farahmandian2011@gmail.com

📣 Instagram: https://www.instagram.com/vahidfarahmandian
📣 Instagram: https://www.instagram.com/vahidfarahmandian

0 comments on commit b0333f1

Please sign in to comment.