* We now export simple <wsp:Policy>, currently supporting only
those elements that WsdlImporter can import.
WsdlImporter:
https://github.com/mono/mono/commit/cdc98dba1b83341c25a1daab4ae7c217d4961ad1
* Implement `MetadataExporter.Errors' and use it for error
reporting.
* Fixed WsdlExporter's caching to correclty deal with duplicate
ExportContract() and ExportEndpoint() calls.
* Emit <soap12:operation> depending on the binding's MessageVersion.
(FIXME: I didn't implement soap faults yet).
* MetadataTests: Check whether the policy elements are correct.
* MetadataTests: Add test containing simple [OperationContract] method
for http and net.tcp; checks the <soap:operation> / <soap12:operation>
elements.
* New test to check WsdlExporter's behavior regarding duplicate
contracts and endpoints.
* ConnectionOrientedTransportBindingElement.cs, CustomBindingTests.cs,
HttpTransportBindingElementTest.cs: Added test for custom message
encodings.
The WsdlImporter can now import Bindings and Endpoints
from the WSDL, currently supporting BasicHttpBinding,
BasicHttpsBinding and NetTcpBinding.
There is also - limited and still experimental - support
for WS-Policy 1.5. I only did the very basic pieces so
far, for instance things like TransportWithMessageCredentials
are not supported yet.
The policy importer will emit lots of warnings via
`MetadataImporter.Errors` (as warnings, not errors) whenever
it encounters something that it doesn't understand and
is also forgiving towards unknown and/or mal-formed
policy assertions.
This behavior is different from the MS runtime, which is
very strict, but there are simply too many missing pieces
to be more pedentic here. Check whether Errors.Count == 0
to see whether all policy assertions have been correctly
imported.
There are also a few metadata samples, which are part of the
new nunit tests. These are currently working:
BasicHttp.xml, BasicHttp_Mtom.xml, BasicHttp_NtlmAuth.xml,
BasicHttp_TransportSecurity.xml, BasicHttps.xml,
BasicHttps_NtlmAuth.xml, NetTcp.xml, NetTcp_TransferMode.xml,
NetTcp_TransportSecurity.xml
There are a few more in the Tests/MetadataTests/Resources/
directory which demonstrate missing pieces.
This allows
HttpRequestMessageProperty request = new HttpRequestMessageProperty ();
request.Headers.Add ("Foo", "Bar");
OperationContext.Current.OutgoingMessageProperties.Add (HttpRequestMessageProperty.Name, request);
The code was already there, but disabled for the NET_2_1 profile.
.NET throws a EndpointNotFoundException encapsulating a WebException when a
REST request returns a 404.
The attached patch tests for a 404 and throws the same exception chain thrown
by .NET.
OutgoingWebRequestContext throws a NullReferenceException when making a REST
call. The exception is thrown because there are no Headers in the context.
Attached patch simply tests for null before copying values from Headers.
System.ServiceModel.Channels.HttpRequestChannel never added the configured
certificate to the HttpWebRequest which prevented client side authentication.
The attached patch does exactly that if a certificate has been configured.
There were several issues here:
- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
when it should first try to find one whose URL matches the current request exactly.