Configure RestSharp XML serializer - xml-serialization

I have a .Net Core 3.1 console app to communicate with my WebApi app. Is there a way to configure the XML serializer that RestSharp uses for its RestRequest.AddBody() method? I need to add some XmlWriterSettings to it.

Related

Consume a SOAP Service in an Azure function

Environment
Visual Studio 2017 Enterprise on MAC, Mono 5.12.0.309
Problem
I've successfully built and packaged an Azure Function. Now, I'd like to call a SOAP Web service in the function (over which I have no control). I added a Web Reference to the published WSDL and tried to compile the function which resulted in a ton of errors primarily indicating "System.Web.Services" namespace is missing.
"System.Web" doesn't seem to be part of .NET Core 2.1 (that is referenced in the function project). How would I then add a reference to "System.Web.Services" assembly? Is there a NuGet package?
UPDATE
Part of this was my lack of understanding of what .NET Core actually is. Since I'm using .NET Core, I can't make reference to assemblies that are targeting .NET Framework. "System.Web.Services" seems to be one.
Now the question becomes, how one would then call SOAP Services from .NET Core application?
You can use the new WCF client side stack on .NET Core: https://github.com/dotnet/wcf
There is a good sample to a question on this thread: Calling a SOAP service in .net Core

Calling spring boot rest service from GWT

I want the gwt app to call a spring boot rest service with basic authentication which consumes and produces a json object and is deployed on a seperate server from the gwt app.
Any hints on how this can be done ?
There is a library called restygwt to easily define REST calls. I think there is an easy way to set the 'Basic' header.

AspNet Core Consuming WebService (VS2015)

In my AspNet Core project I need to consume a SOAP/WSDL WebService. I am using VS2015 and have made a non-aspnet core project to test the webservice (went fine), but with AspNet Core, I cannot seem to find a way to make this happen. It looks like SOAP webservice isn't supported (yet?) but if that is the case, is there a different way to consume a soap webservice?
I am already using the net461 framework so I can use the normal .NET libraries, but VS2015 doesn't expose the “Add Service Reference” menu option.
Find this similar question. I have not implemented/verified/tested it but hopefully yo can find some guidance. The sample is using the prior version of AspNet Core (AspNet 5)
ASP.NET 5 add WCF service reference
https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide
See if this helps. In VS 2017, I am able to add the service reference from connected services in a .net core project. You might need to install "WCF Service Reference Provider" Extension.

Adding AuthenticationStatement block to SAML token using Java Metro STS

I'm developing a java Security Token Service using the Metro framework in NetBeans 8.0 following this tutorial: https://metro.java.net/2.0.1/guide/Building_custom_STS_.html
I've implemented the STSAttributeProvider interface to provide custom attributes and build up the <AttributeStatement>. In the same manner I would like to add an <AuthenticationStatement> block in the SAML response but I can't seem to find out how to do this. What would be the correct approach?
Thanks!

SudzC iPhone Request

I wanted some clarification regarding SudzC for iPhone. Does SudzC support SOAP 1.2?
I tried using SudzC with the web service http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl and it works fine but with my web service it doesn't. The only difference I can spot is that the above service uses SOAP1.1 while mine used 1.2.
Regards,
EC
You pretty much answered your own question. A service expecting a soap 1.2 message is not required to be backward compatible to soap 1.1 formatted messages. You can configure WCF to accept soap 1.1 messages by creating a custom binding as show here. Although that WCF config is for a client, you can also configure a service to use that custom binding. If the service needs to support soap 1.2 messages, you can just leave your existing endpoint configured as-is and create a new endpoint for the soap 1.1 custom binding.