We're trying to use SOAP requests to interact with a booking API using Visual Studio C#.
We've interfaced with a Web Service of another API without issue but this one is proving problematic.
We've added it as a Service Reference and Visual Studio has generated all the classes for it and web.config entries so that all seems well.
However when we try and make a simple request to the client SOAP Service we get the following error:
Namespace='com.hrs.soap.hrs' is not supported with rpc\literal SOAP. The wrapper element has to be unqualified.
The code is:
PingRequest pingrequest = new PingRequest();
SoapServiceClient service = new SoapServiceClient();
service.ping(pingrequest);
This what's been added in the Web.config file:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="HRSSoapServiceBinding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="..."
binding="basicHttpBi