GithubHelp home page GithubHelp logo

pmorelli92 / soaphttpclient Goto Github PK

View Code? Open in Web Editor NEW
112.0 112.0 22.0 144 KB

HttpClient wrapper for sending SOAP messages.

License: GNU General Public License v3.0

C# 100.00%
async client http soap wrapper

soaphttpclient's Introduction

soaphttpclient's People

Contributors

bkanteruk avatar dashkan avatar pmorelli-origin avatar pmorelli92 avatar richardslater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soaphttpclient's Issues

Not Compatible with .Net Standard 2.0

:(

I was hoping to use this in a very large project, but I need to use it in a .Net Standard 2.0 library.

Since it uses HttpClientFactory, it's not compatible with .Net Standard 2.0.

Is there an older working version that is Standard compatible? Or perhaps there is a workaround, such as an alternative constructor that takes an HttpClient instead of factory?

Thanks,
James

How to Parse the XML Response?

I have tried the NASA SOAP API though it is working properly. I got the XML String.

How to parse it to object to loop and show the result?

get SOAP envelope XML

Hi.

How can I catch/get the entire SOAP envelope XML that is sent? Mi goal is to get the entire message that have been sent and save it.

Actually I am saving the XML body (the one that I pass to PostAsync function) but I need the entire message on SOAP.

how to setup authorization?

Foundational http request message below:

Http 1.1

...headers...

Authorization: Basic [Base64 encoded with user name : password...]

In this situation, how to setup "Authorization" header by SoapHttpClient?

thank you very much

Header should be SOAPAction for Soap 1.1 instead of ActionHeader

I'm using the SoapClient to communicate with a SOAP 1.1 service. I got an error that the action wasn't defined even though I specified an action when I called to post async. I discovered this is because the HTTP Request Header that the SoapClient sets is "ActionHeader" but I believe the SOAP 1.1 specification requires a "SOAPAction" header (https://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528).

Any chance you can change line 80 of SoapClient.cs to use "SOAPAction" instead of "ActionHeader"?

Need to set different access user login token for the test suites.

I have created SOAPUI project with OAuth 2.0 access token. I need to set the different user access token in different Test Suites, But now if I add access token for one test step it gets applied to all, here I need different user access for different testsuites.

No authorization options?

Hey, im trying to use your package but there is no way to use any authorization option i am right? I have a SOAP Service that requires Basic Authorization for example. Thanks!

Support CancellationTokens

@pmorelli92 ,

Thanks for the great library. I added support for cancellation tokens in a PR #10 . Can you take a look to see if it's something you are willing to add to the project?

Thanks!

How to specify method name?

Hi,

I want to call web service which expect following:

POST ... HTTP/1.1
Host: ...
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "..."

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope ...>
  <soap:Body>
    <METHOD_NAME xmlns="...">
      <requestData />
    </METHOD_NAME >
  </soap:Body>
</soap:Envelope>

How to tell SoapHttpClient about METHOD_NAME?

Edit timeout

Hi.
A process gives me an error 'The operation was canceled.'
My question is whether the timeout can be increased and how much the default would be.

sorry my english T.T

How to Add Authorization with Bearer Token to Soap Request -> Add Soap Action

I want to use your SoapHttpClient for making Soap Request but I have difficulties in setting it up. Biggest hurdle is adding a Bearer Token to the SOAP Request.

In the SOAP UI I can add a Bearer token like this:
image

How can I do the same thing trough code? (@RichardSlater @pmorelli92 @pmorelli-origin)


What I tried in steps:

  1. Generating the Token trough the TokenClient of IdentityModel package.
  2. Add it as a header like this:
var header = new XElement("Authorization", $"Bearer {token}");
  1. Sending the request.
using (var soapClient = new SoapClient())
{
    var result =
        await soapClient.PostAsync(
            endpoint: endpoint,
            soapVersion: SoapVersion.Soap11,
            body: body,
            header: header);

            Log.Information(await result.Content.ReadAsStringAsync());
}
  1. Inspecting the result
    Internal Server Error
    I think this is most probably because I didn't add the token in the right way.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.