NET_2_1 is also defined whenever we define MOBILE, so they have the same effect. Silverlight was 2.1 but it's been dead for a while now, and we do not even support it.
Unlike our own XsdDataContractExporter, referencesource one generates
an extra schema that targets xs:* (XmlSchema.Namespace).
That should not be generated as part of WSDL, so exclude it.
The problem already starts when creating the OperationDescription; we need
to also look at the End* method here to correctly parse the reply parameters.
Then ClientRuntimeChannel.Process needs to distinguish between sync/async
and copy the out/byref parameters when needed.
* 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.
* System.Runtime.Serialization/XsdDataContractImporter:
Check ImportOptions.ReferencedCollectionTypes to determine the proxy type.
* System.ServiceModel.Description/MetadataImporter.cs:
Very simply implementation of the 'State' property.
* System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs:
Use it here.
* Test/Resources/WSDL: Added some sample .wsdl files for the new tests; adding
these as resources to the test dll.
* Test/System.Runtime.Serialization: Added WsdlHelper.cs,
XsdDataContractImporterTest2.cs and XsdDataContractExportTest2.cs
There is no bug report, the problem has been reported here:
http://stackoverflow.com/questions/12551090/monotouch-wcf-service-reference-cs-errors/12669880
DataContractSerializerMessageContractImporter.IsOperationImported()
did not check the method's return value, so it failed to recognize
methods such as
[OperationContract]
DateTime GetDate ();
as already being imported. This caused the method to be imported with
both the DataContractMessageContractImporterInternal and the
XmlSerializerMessageContractImporterInternal, but the latter does not
resolve type references, see the FIXME in that class.
I also added a new test case for this.