Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,243 @@
//
// TestExport.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Net;
using System.Xml;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using QName = System.Xml.XmlQualifiedName;
using WS = System.Web.Services.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.ServiceModel.MetadataTests {
[TestFixture]
public class TestExport {
internal const string HttpUri = "http://tempuri.org/TestHttp/";
[Test]
public void SimpleExport ()
{
var label = new TestLabel ("DuplicateContract");
var cd = new ContractDescription ("MyContract");
var endpoint = new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri));
var exporter = new WsdlExporter ();
exporter.ExportContract (cd);
exporter.ExportEndpoint (endpoint);
CheckExport (
exporter, new QName ("MyContract", "http://tempuri.org/"),
"BasicHttpBinding", 1, label);
}
[Test]
public void DuplicateContract ()
{
var label = new TestLabel ("DuplicateContract");
var cd = new ContractDescription ("MyContract");
var endpoint = new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri));
var exporter = new WsdlExporter ();
exporter.ExportContract (cd);
exporter.ExportContract (cd);
exporter.ExportEndpoint (endpoint);
CheckExport (
exporter, new QName ("MyContract", "http://tempuri.org/"),
"BasicHttpBinding", 1, label);
}
[Test]
public void DuplicateEndpoint ()
{
var label = new TestLabel ("DuplicateEndpoint");
var cd = new ContractDescription ("MyContract");
var endpoint = new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri));
var exporter = new WsdlExporter ();
exporter.ExportEndpoint (endpoint);
exporter.ExportEndpoint (endpoint);
CheckExport (
exporter, new QName ("MyContract", "http://tempuri.org/"),
"BasicHttpBinding", 1, label);
}
[Test]
public void DuplicateEndpoint2 ()
{
var label = new TestLabel ("DuplicateEndpoint2");
var cd = new ContractDescription ("MyContract");
var endpoint = new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri));
var endpoint2 = new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri));
var exporter = new WsdlExporter ();
exporter.ExportEndpoint (endpoint);
exporter.ExportEndpoint (endpoint);
exporter.ExportEndpoint (endpoint2);
CheckExport (
exporter, new QName ("MyContract", "http://tempuri.org/"),
"BasicHttpBinding", 2, label);
}
public static void CheckExport (
WsdlExporter exporter, QName contractName, string bindingName,
int countEndpoints, TestLabel label)
{
Assert.That (exporter.GeneratedWsdlDocuments, Is.Not.Null, label.Get ());
Assert.That (exporter.GeneratedWsdlDocuments.Count, Is.EqualTo (1), label.Get ());
var wsdl = exporter.GeneratedWsdlDocuments [0];
CheckExport (wsdl, contractName, bindingName, countEndpoints, label);
}
public static void CheckExport (
WS.ServiceDescription wsdl, QName contractName, string bindingName,
int countEndpoints, TestLabel label)
{
label.EnterScope ("ServiceDescription");
Assert.That (wsdl.TargetNamespace, Is.EqualTo (contractName.Namespace), label.Get ());
Assert.That (wsdl.Name, Is.EqualTo ("service"), label.Get ());
label.LeaveScope ();
label.EnterScope ("Bindings");
Assert.That (wsdl.Bindings, Is.Not.Null, label.Get ());
Assert.That (wsdl.Bindings.Count, Is.EqualTo (countEndpoints), label.Get ());
for (int i = 0; i < countEndpoints; i++) {
label.EnterScope (string.Format ("#{0}", i+1));
var binding = wsdl.Bindings [i];
var expectedName = string.Format (
"{0}_{1}{2}", bindingName, contractName.Name,
i > 0 ? i.ToString () : "");
Assert.That (binding.Name, Is.EqualTo (expectedName), label.Get ());
Assert.That (binding.Type, Is.EqualTo (contractName), label.Get ());
label.LeaveScope ();
}
label.LeaveScope ();
label.EnterScope ("PortTypes");
Assert.That (wsdl.PortTypes, Is.Not.Null, label.Get ());
Assert.That (wsdl.PortTypes.Count, Is.EqualTo (1), label.Get ());
var portType = wsdl.PortTypes [0];
Assert.That (portType.Name, Is.EqualTo (contractName.Name), label.Get ());
label.LeaveScope ();
label.EnterScope ("Services");
Assert.That (wsdl.Services, Is.Not.Null, label.Get ());
Assert.That (wsdl.Services.Count, Is.EqualTo (1), label.Get ());
var service = wsdl.Services [0];
Assert.That (service.Name, Is.EqualTo ("service"), label.Get ());
label.LeaveScope ();
label.EnterScope ("Ports");
Assert.That (service.Ports, Is.Not.Null, label.Get ());
Assert.That (service.Ports.Count, Is.EqualTo (countEndpoints), label.Get ());
for (int i = 0; i < countEndpoints; i++) {
label.EnterScope (string.Format ("#{0}", i+1));
var port = service.Ports [i];
var expectedName = string.Format (
"{0}_{1}{2}", bindingName, contractName.Name,
i > 0 ? i.ToString () : "");
var qname = new QName (expectedName, contractName.Namespace);
Assert.That (port.Name, Is.EqualTo (qname.Name), label.Get ());
Assert.That (port.Binding, Is.EqualTo (qname), label.Get ());
label.LeaveScope ();
}
label.LeaveScope ();
}
[Test]
public void Mtom_Policy ()
{
var label = new TestLabel ("Mtom_Policy");
var contract = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding ();
binding.MessageEncoding = WSMessageEncoding.Mtom;
var endpoint = new ServiceEndpoint (
contract, binding, new EndpointAddress (HttpUri));
var exporter = new WsdlExporter ();
exporter.ExportEndpoint (endpoint);
Assert.That (exporter.GeneratedWsdlDocuments, Is.Not.Null, label.Get ());
Assert.That (exporter.GeneratedWsdlDocuments.Count, Is.EqualTo (1), label.Get ());
var wsdl = exporter.GeneratedWsdlDocuments [0];
Assert.That (wsdl.Bindings, Is.Not.Null, label.Get ());
Assert.That (wsdl.Bindings.Count, Is.EqualTo (1), label.Get ());
var wsb = wsdl.Bindings [0];
label.EnterScope ("Binding");
Assert.That (wsb.Extensions, Is.Not.Null, label.Get ());
Assert.That (wsb.Extensions.Count, Is.EqualTo (2), label.Get ());
label.LeaveScope ();
label.EnterScope ("Extensions");
WS.SoapBinding soap = null;
XmlElement xml = null;
foreach (var extension in wsb.Extensions) {
if (extension is WS.SoapBinding)
soap = (WS.SoapBinding)extension;
else if (extension is XmlElement)
xml = (XmlElement)extension;
else
Assert.Fail ("Unknown extension.", label);
}
Assert.That (soap, Is.Not.Null, label.Get ());
Assert.That (xml, Is.Not.Null, label.Get ());
label.LeaveScope ();
label.EnterScope ("Policy");
var assertions = BindingTestAssertions.AssertPolicy (wsdl, xml, label);
Assert.That (assertions.Count, Is.EqualTo (1), label.Get ());
var assertion = assertions [0];
Assert.That (assertion.NamespaceURI, Is.EqualTo ("http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"), label.Get ());
Assert.That (assertion.LocalName, Is.EqualTo ("OptimizedMimeSerialization"), label.Get ());
label.LeaveScope ();
}
}
}

View File

@@ -0,0 +1,326 @@
//
// Testcases.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Net;
using System.Xml;
using System.Text;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
using NUnit.Framework.SyntaxHelpers;
using WS = System.Web.Services.Description;
namespace MonoTests.System.ServiceModel.MetadataTests {
/*
* This class is abstract to allow it to be run multiple times with
* different TestContexts.
*/
[Category ("MetadataTests")]
public abstract class ImportTests {
public abstract TestContext Context {
get;
}
protected MetadataSet GetMetadata (string name, out TestLabel label)
{
label = new TestLabel (name);
return Context.GetMetadata (name);
}
protected MetadataSet GetMetadataAndConfig (
string name, out XmlDocument config, out TestLabel label)
{
var metadata = GetMetadata (name, out label);
config = Context.GetConfiguration (name);
return metadata;
}
[Test]
public virtual void BasicHttp ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, BasicHttpSecurityMode.None, label);
}
[Test]
public virtual void BasicHttp_TransportSecurity ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_TransportSecurity", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, BasicHttpSecurityMode.Transport, label);
}
[Test]
[Category ("NotWorking")]
public virtual void BasicHttp_MessageSecurity ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_MessageSecurity", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, BasicHttpSecurityMode.Message, label);
}
[Test]
[Category ("NotWorking")]
public virtual void BasicHttp_TransportWithMessageCredential ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_TransportWithMessageCredential", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, BasicHttpSecurityMode.TransportWithMessageCredential, label);
}
[Test]
public virtual void BasicHttp_Mtom ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_Mtom", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, WSMessageEncoding.Mtom, label);
}
[Test]
public virtual void BasicHttp_NtlmAuth ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_NtlmAuth", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, BasicHttpSecurityMode.TransportCredentialOnly,
WSMessageEncoding.Text, HttpClientCredentialType.Ntlm,
AuthenticationSchemes.Ntlm, label);
}
#if NET_4_5
[Test]
public virtual void BasicHttps ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttps", out label);
BindingTestAssertions.BasicHttpsBinding (
Context, doc, BasicHttpSecurityMode.Transport, WSMessageEncoding.Text,
HttpClientCredentialType.None, AuthenticationSchemes.Anonymous,
label);
}
[Test]
public virtual void BasicHttps_NtlmAuth ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttps_NtlmAuth", out label);
BindingTestAssertions.BasicHttpsBinding (
Context, doc, BasicHttpSecurityMode.Transport, WSMessageEncoding.Text,
HttpClientCredentialType.Ntlm, AuthenticationSchemes.Ntlm,
label);
}
[Test]
[Category ("NotWorking")]
public virtual void BasicHttps_Certificate ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttps_Certificate", out label);
BindingTestAssertions.BasicHttpsBinding (
Context, doc, BasicHttpSecurityMode.Transport, WSMessageEncoding.Text,
HttpClientCredentialType.Certificate, AuthenticationSchemes.Anonymous,
label);
}
[Test]
[Category ("NotWorking")]
public virtual void BasicHttps_TransportWithMessageCredential ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttps_TransportWithMessageCredential", out label);
BindingTestAssertions.BasicHttpsBinding (
Context, doc, BasicHttpSecurityMode.TransportWithMessageCredential,
WSMessageEncoding.Text, HttpClientCredentialType.None,
AuthenticationSchemes.Anonymous, label);
}
#endif
[Test]
public virtual void NetTcp ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.None, false, TransferMode.Buffered, label);
}
[Test]
public virtual void NetTcp_TransferMode ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_TransferMode", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.None, false,
TransferMode.Streamed, label);
}
[Test]
public virtual void NetTcp_TransportSecurity ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_TransportSecurity", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.Transport, false,
TransferMode.Buffered, label);
}
[Test]
[Category ("NotWorking")]
public virtual void NetTcp_MessageSecurity ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_MessageSecurity", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.Message, false,
TransferMode.Buffered, label);
}
[Test]
[Category ("NotWorking")]
public virtual void NetTcp_TransportWithMessageCredential ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_TransportWithMessageCredential", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.TransportWithMessageCredential, false,
TransferMode.Buffered, label);
}
[Test]
public virtual void NetTcp_Binding ()
{
var label = new TestLabel ("NetTcp_Binding");
label.EnterScope ("None");
BindingTestAssertions.CheckNetTcpBinding (
new NetTcpBinding (SecurityMode.None), SecurityMode.None,
false, TransferMode.Buffered, label);
label.LeaveScope ();
label.EnterScope ("Transport");
BindingTestAssertions.CheckNetTcpBinding (
new NetTcpBinding (SecurityMode.Transport), SecurityMode.Transport,
false, TransferMode.Buffered, label);
label.LeaveScope ();
}
[Test]
[Category ("NotWorking")]
public virtual void NetTcp_Binding2 ()
{
var label = new TestLabel ("NetTcp_Binding2");
label.EnterScope ("TransportWithMessageCredential");
BindingTestAssertions.CheckNetTcpBinding (
new NetTcpBinding (SecurityMode.TransportWithMessageCredential),
SecurityMode.TransportWithMessageCredential, false,
TransferMode.Buffered, label);
label.LeaveScope ();
}
[Test]
[Category ("NotWorking")]
public virtual void NetTcp_ReliableSession ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_ReliableSession", out label);
BindingTestAssertions.NetTcpBinding (
Context, doc, SecurityMode.None, true,
TransferMode.Buffered, label);
}
[Test]
public virtual void BasicHttp_Operation ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_Operation", out label);
BindingTestAssertions.TestOperation (doc, false, label);
}
[Test]
public virtual void NetTcp_Operation ()
{
TestLabel label;
var doc = GetMetadata ("NetTcp_Operation", out label);
BindingTestAssertions.TestOperation (doc, true, label);
}
[Test]
public virtual void BasicHttp_Config ()
{
TestLabel label;
XmlDocument config;
var metadata = GetMetadataAndConfig (
"BasicHttp_Config", out config, out label);
BindingTestAssertions.AssertConfig (metadata, config, label);
}
[Test]
public virtual void BasicHttp_Config2 ()
{
TestLabel label;
XmlDocument config;
var metadata = GetMetadataAndConfig (
"BasicHttp_Config2", out config, out label);
BindingTestAssertions.AssertConfig (metadata, config, label);
}
}
}

View File

@@ -0,0 +1,44 @@
//
// ImportTests_CreateMetadata.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using NUnit.Framework;
namespace MonoTests.System.ServiceModel.MetadataTests {
/*
* Create the metadata programmatically.
*
*/
[TestFixture]
public class ImportTests_CreateMetadata : ImportTests {
public override TestContext Context {
get { return TestContext.CreateMetadataContext; }
}
}
}

View File

@@ -0,0 +1,62 @@
//
// ImportTests_LoadMetadata.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Net;
using System.Xml;
using System.Text;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
using NUnit.Framework.SyntaxHelpers;
namespace MonoTests.System.ServiceModel.MetadataTests {
/*
* Load the metadata from a file / embedded resource.
*
*/
[TestFixture]
public class ImportTests_LoadMetadata : ImportTests {
public override TestContext Context {
get { return TestContext.LoadMetadataContext; }
}
[Test]
public virtual void BasicHttp_Mtom_EmbeddedPolicy ()
{
TestLabel label;
var doc = GetMetadata ("BasicHttp_Mtom_EmbeddedPolicy", out label);
BindingTestAssertions.BasicHttpBinding (
Context, doc, WSMessageEncoding.Mtom, label);
}
}
}

View File

@@ -0,0 +1,47 @@
//
// ImportTests_RoundTrip.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using NUnit.Framework;
namespace MonoTests.System.ServiceModel.MetadataTests {
/*
* Export the metadata into a string, then import it back.
*
* This tests both the WsdlExporter and the WsdlImporter.
*
*/
[TestFixture]
public class ImportTests_RoundTrip : ImportTests {
public override TestContext Context {
get { return TestContext.RoundTripContext; }
}
}
}

View File

@@ -0,0 +1,443 @@
//
// MetadataProvider.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.IO;
using System.Reflection;
using System.ServiceModel;
using System.ServiceModel.Security;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Configuration;
using WS = System.Web.Services.Description;
namespace MonoTests.System.ServiceModel.MetadataTests {
public static class MetadataSamples {
internal const string HttpUri = "http://tempuri.org/TestHttp/";
internal const string HttpsUri = "https://tempuri.org/TestHttps/";
internal const string NetTcpUri = "net-tcp://tempuri.org:8000/TestNetTcp/";
internal const string CustomUri = "custom://tempuri.org:8000/Test/";
[MetadataSample]
public static MetadataSet BasicHttp ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new BasicHttpBinding (), new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttp_TransportSecurity ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding ();
binding.Security.Mode = BasicHttpSecurityMode.Transport;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttp_MessageSecurity ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding ();
binding.Security.Mode = BasicHttpSecurityMode.Message;
binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.Certificate;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttp_TransportWithMessageCredential ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding ();
binding.Security.Mode = BasicHttpSecurityMode.TransportWithMessageCredential;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttp_Mtom ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding ();
binding.MessageEncoding = WSMessageEncoding.Mtom;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttp_NtlmAuth ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpBinding (BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
#if NET_4_5
[MetadataSample]
public static MetadataSet BasicHttps ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new BasicHttpsBinding (), new EndpointAddress (HttpsUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttps_NtlmAuth ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpsBinding ();
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpsUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttps_Certificate ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpsBinding ();
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Certificate;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpsUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet BasicHttps_TransportWithMessageCredential ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new BasicHttpsBinding (BasicHttpsSecurityMode.TransportWithMessageCredential);
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpsUri)));
return exporter.GetGeneratedMetadata ();
}
#endif
[MetadataSample]
public static MetadataSet NetTcp ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.None, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_TransportSecurity ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.Transport, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_MessageSecurity ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.Message, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_TransportWithMessageCredential ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.TransportWithMessageCredential, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_ReliableSession ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new NetTcpBinding (SecurityMode.None, true);
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_TransferMode ()
{
var exporter = new WsdlExporter ();
var cd = new ContractDescription ("MyContract");
var binding = new NetTcpBinding (SecurityMode.None, false);
binding.TransferMode = TransferMode.Streamed;
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[ServiceContract]
public interface IMyContract {
[OperationContract]
void Hello ();
}
[MetadataSample]
public static MetadataSet BasicHttp_Operation ()
{
var exporter = new WsdlExporter ();
var cd = ContractDescription.GetContract (typeof (IMyContract));
var binding = new BasicHttpBinding ();
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample]
public static MetadataSet NetTcp_Operation ()
{
var exporter = new WsdlExporter ();
var cd = ContractDescription.GetContract (typeof (IMyContract));
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.None, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample (CreateConfig = true)]
public static MetadataSet BasicHttp_Config ()
{
var exporter = new WsdlExporter ();
var cd = ContractDescription.GetContract (typeof (IMyContract));
var binding = new BasicHttpBinding ();
exporter.ExportEndpoint (new ServiceEndpoint (
cd, binding, new EndpointAddress (HttpUri)));
return exporter.GetGeneratedMetadata ();
}
[MetadataSample (CreateConfig = true)]
public static MetadataSet BasicHttp_Config2 ()
{
var exporter = new WsdlExporter ();
var cd = ContractDescription.GetContract (typeof (IMyContract));
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new BasicHttpBinding (),
new EndpointAddress (HttpUri)));
exporter.ExportEndpoint (new ServiceEndpoint (
cd, new NetTcpBinding (SecurityMode.None, false),
new EndpointAddress (NetTcpUri)));
return exporter.GetGeneratedMetadata ();
}
#region Helper API
public static void Export (string outputDir)
{
if (!Directory.Exists (outputDir))
Directory.CreateDirectory (outputDir);
var bf = BindingFlags.Public | BindingFlags.Static;
foreach (var method in typeof (MetadataSamples).GetMethods (bf)) {
MetadataSampleAttribute sampleAttr = null;
foreach (var obj in method.GetCustomAttributes (false)) {
var cattr = obj as MetadataSampleAttribute;
if (cattr != null) {
sampleAttr = cattr;
break;
}
}
if (sampleAttr == null)
continue;
var name = sampleAttr.Name ?? method.Name;
var metadata = (MetadataSet)method.Invoke (null, null);
var xmlFilename = Path.Combine (outputDir, name + ".xml");
TestContext.SaveMetadata (xmlFilename, metadata);
if (!sampleAttr.CreateConfig)
continue;
var configFilename = Path.Combine (outputDir, name + ".config");
TestContext.GenerateConfig (configFilename, metadata);
}
}
public static MetadataSet GetMetadataByName (string name)
{
if (name.EndsWith (".xml"))
name = name.Substring (name.Length - 4);
var bf = BindingFlags.Public | BindingFlags.Static;
foreach (var method in typeof (MetadataSamples).GetMethods (bf)) {
MetadataSampleAttribute sampleAttr = null;
foreach (var obj in method.GetCustomAttributes (false)) {
var cattr = obj as MetadataSampleAttribute;
if (cattr != null) {
sampleAttr = cattr;
break;
}
}
if (sampleAttr == null)
continue;
if (!name.Equals (sampleAttr.Name ?? method.Name))
continue;
return (MetadataSet)method.Invoke (null, null);
}
throw new InvalidOperationException (string.Format (
"No such metadata sample: '{0}'", name));
}
public class MetadataSampleAttribute : Attribute {
public MetadataSampleAttribute ()
{
}
public MetadataSampleAttribute (string name)
{
Name = name;
}
public string Name {
get; set;
}
public bool CreateConfig {
get; set;
}
}
#endregion
}
}

View File

@@ -0,0 +1,281 @@
//
// Test_Misc.cs
//
// Author:
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Net;
using System.Xml;
using System.Text;
using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using NUnit.Framework;
using NUnit.Framework.Constraints;
using NUnit.Framework.SyntaxHelpers;
using WS = System.Web.Services.Description;
namespace MonoTests.System.ServiceModel.MetadataTests {
public class MiscImportTests {
[Test]
public void BasicHttpBinding_ImportBinding ()
{
var label = new TestLabel ("BasicHttpBinding_ImportBinding");
var doc = TestContext.LoadMetadata ("BasicHttp");
var sd = (WS.ServiceDescription)doc.MetadataSections [0].Metadata;
var wsdlBinding = sd.Bindings [0];
var importer = new WsdlImporter (doc);
Assert.That (sd.Bindings, Is.Not.Null, label.Get ());
Assert.That (sd.Bindings.Count, Is.EqualTo (1), label.Get ());
var binding = importer.ImportBinding (wsdlBinding);
BindingTestAssertions.CheckImportErrors (importer, label);
Assert.That (binding, Is.Not.Null, label.Get ());
}
[Test]
public void BasicHttpBinding_ImportEndpoint ()
{
var label = new TestLabel ("BasicHttpBinding_ImportEndpoint");
var doc = TestContext.LoadMetadata ("BasicHttp");
var sd = (WS.ServiceDescription)doc.MetadataSections [0].Metadata;
label.EnterScope ("wsdl");
Assert.That (sd.Services, Is.Not.Null, label.Get ());
Assert.That (sd.Services.Count, Is.EqualTo (1), label.Get ());
var service = sd.Services [0];
Assert.That (service.Ports, Is.Not.Null, label.Get ());
Assert.That (service.Ports.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
var importer = new WsdlImporter (doc);
var port = importer.ImportEndpoint (service.Ports [0]);
BindingTestAssertions.CheckImportErrors (importer, label);
Assert.That (port, Is.Not.Null, label.Get ());
}
[Test]
public void BasicHttpBinding_Error ()
{
var label = new TestLabel ("BasicHttpBinding_Error");
var doc = TestContext.LoadMetadata ("http-error.xml");
var sd = (WS.ServiceDescription)doc.MetadataSections [0].Metadata;
var wsdlBinding = sd.Bindings [0];
var importer = new WsdlImporter (doc);
label.EnterScope ("all");
var bindings = importer.ImportAllBindings ();
Assert.That (bindings, Is.Not.Null, label.Get ());
Assert.That (bindings.Count, Is.EqualTo (0), label.Get ());
label.EnterScope ("errors");
Assert.That (importer.Errors, Is.Not.Null, label.Get ());
Assert.That (importer.Errors.Count, Is.EqualTo (1), label.Get ());
var error = importer.Errors [0];
Assert.That (error.IsWarning, Is.False, label.Get ());
label.LeaveScope ();
label.LeaveScope ();
label.EnterScope ("single");
try {
importer.ImportBinding (wsdlBinding);
Assert.Fail (label.Get ());
} catch {
;
}
Assert.That (importer.Errors.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
label.EnterScope ("single-first");
var importer2 = new WsdlImporter (doc);
try {
importer2.ImportBinding (wsdlBinding);
Assert.Fail (label.Get ());
} catch {
;
}
Assert.That (importer2.Errors.Count, Is.EqualTo (1), label.Get ());
try {
importer2.ImportBinding (wsdlBinding);
Assert.Fail (label.Get ());
} catch {
;
}
var bindings2 = importer.ImportAllBindings ();
Assert.That (bindings2, Is.Not.Null, label.Get ());
Assert.That (bindings2.Count, Is.EqualTo (0), label.Get ());
label.LeaveScope ();
}
[Test]
public void BasicHttpBinding_Error2 ()
{
var label = new TestLabel ("BasicHttpBinding_Error2");
var doc = TestContext.LoadMetadata ("http-error.xml");
var sd = (WS.ServiceDescription)doc.MetadataSections [0].Metadata;
label.EnterScope ("wsdl");
Assert.That (sd.Services, Is.Not.Null, label.Get ());
Assert.That (sd.Services.Count, Is.EqualTo (1), label.Get ());
var service = sd.Services [0];
Assert.That (service.Ports, Is.Not.Null, label.Get ());
Assert.That (service.Ports.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
var importer = new WsdlImporter (doc);
label.EnterScope ("all");
var endpoints = importer.ImportAllEndpoints ();
Assert.That (endpoints, Is.Not.Null, label.Get ());
Assert.That (endpoints.Count, Is.EqualTo (0), label.Get ());
label.EnterScope ("errors");
Assert.That (importer.Errors, Is.Not.Null, label.Get ());
Assert.That (importer.Errors.Count, Is.EqualTo (2), label.Get ());
Assert.That (importer.Errors [0].IsWarning, Is.False, label.Get ());
Assert.That (importer.Errors [1].IsWarning, Is.False, label.Get ());
label.LeaveScope ();
label.LeaveScope ();
label.EnterScope ("single");
try {
importer.ImportEndpoint (service.Ports [0]);
Assert.Fail (label.Get ());
} catch {
;
}
Assert.That (importer.Errors.Count, Is.EqualTo (2), label.Get ());
label.LeaveScope ();
label.EnterScope ("single-first");
var importer2 = new WsdlImporter (doc);
try {
importer2.ImportEndpoint (service.Ports [0]);
Assert.Fail (label.Get ());
} catch {
;
}
Assert.That (importer2.Errors.Count, Is.EqualTo (2), label.Get ());
try {
importer2.ImportEndpoint (service.Ports [0]);
Assert.Fail (label.Get ());
} catch {
;
}
var endpoints2 = importer.ImportAllEndpoints ();
Assert.That (endpoints2, Is.Not.Null, label.Get ());
Assert.That (endpoints2.Count, Is.EqualTo (0), label.Get ());
label.LeaveScope ();
}
[Test]
public void BasicHttpBinding_ImportEndpoints ()
{
var label = new TestLabel ("BasicHttpBinding_ImportEndpoints");
var doc = TestContext.LoadMetadata ("BasicHttp");
var sd = (WS.ServiceDescription)doc.MetadataSections [0].Metadata;
label.EnterScope ("wsdl");
Assert.That (sd.Bindings, Is.Not.Null, label.Get ());
Assert.That (sd.Bindings.Count, Is.EqualTo (1), label.Get ());
var binding = sd.Bindings [0];
Assert.That (sd.Services, Is.Not.Null, label.Get ());
Assert.That (sd.Services.Count, Is.EqualTo (1), label.Get ());
var service = sd.Services [0];
Assert.That (service.Ports, Is.Not.Null, label.Get ());
Assert.That (service.Ports.Count, Is.EqualTo (1), label.Get ());
var port = service.Ports [0];
Assert.That (sd.PortTypes, Is.Not.Null, label.Get ());
Assert.That (sd.PortTypes.Count, Is.EqualTo (1), label.Get ());
var portType = sd.PortTypes [0];
label.LeaveScope ();
var importer = new WsdlImporter (doc);
label.EnterScope ("by-service");
var byService = importer.ImportEndpoints (service);
BindingTestAssertions.CheckImportErrors (importer, label);
Assert.That (byService, Is.Not.Null, label.Get ());
Assert.That (byService.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
label.EnterScope ("by-binding");
var byBinding = importer.ImportEndpoints (binding);
BindingTestAssertions.CheckImportErrors (importer, label);
Assert.That (byBinding, Is.Not.Null, label.Get ());
Assert.That (byBinding.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
label.EnterScope ("by-port-type");
var byPortType = importer.ImportEndpoints (portType);
BindingTestAssertions.CheckImportErrors (importer, label);
Assert.That (byPortType, Is.Not.Null, label.Get ());
Assert.That (byPortType.Count, Is.EqualTo (1), label.Get ());
label.LeaveScope ();
}
}
}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMyContract" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://tempuri.org/TestHttp/" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IMyContract" contract="IMyContract"
name="BasicHttpBinding_IMyContract" />
</client>
</system.serviceModel>
</configuration>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import namespace="http://tempuri.org/" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="IMyContract_Hello_InputMessage">
<wsdl:part name="parameters" element="tns:Hello" />
</wsdl:message>
<wsdl:message name="IMyContract_Hello_OutputMessage">
<wsdl:part name="parameters" element="tns:HelloResponse" />
</wsdl:message>
<wsdl:portType name="IMyContract">
<wsdl:operation name="Hello">
<wsdl:input wsaw:Action="http://tempuri.org/IMyContract/Hello" message="tns:IMyContract_Hello_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IMyContract/HelloResponse" message="tns:IMyContract_Hello_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IMyContract" type="tns:IMyContract">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Hello">
<soap:operation soapAction="http://tempuri.org/IMyContract/Hello" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_IMyContract" binding="tns:BasicHttpBinding_IMyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
<wsx:MetadataSection xmlns="" Dialect="http://www.w3.org/2001/XMLSchema" Identifier="http://tempuri.org/">
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Hello">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="HelloResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
</xs:schema>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IMyContract" />
</basicHttpBinding>
<netTcpBinding>
<binding name="NetTcpBinding_IMyContract">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="http://tempuri.org/TestHttp/" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IMyContract" contract="IMyContract"
name="BasicHttpBinding_IMyContract" />
<endpoint address="net-tcp://tempuri.org:8000/TestNetTcp/" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IMyContract" contract="IMyContract"
name="NetTcpBinding_IMyContract" />
</client>
</system.serviceModel>
</configuration>

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="NetTcpBinding_IMyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1" />
<wsaw:UsingAddressing />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import namespace="http://tempuri.org/" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="IMyContract_Hello_InputMessage">
<wsdl:part name="parameters" element="tns:Hello" />
</wsdl:message>
<wsdl:message name="IMyContract_Hello_OutputMessage">
<wsdl:part name="parameters" element="tns:HelloResponse" />
</wsdl:message>
<wsdl:portType name="IMyContract">
<wsdl:operation name="Hello">
<wsdl:input wsaw:Action="http://tempuri.org/IMyContract/Hello" message="tns:IMyContract_Hello_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IMyContract/HelloResponse" message="tns:IMyContract_Hello_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IMyContract" type="tns:IMyContract">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Hello">
<soap:operation soapAction="http://tempuri.org/IMyContract/Hello" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NetTcpBinding_IMyContract" type="tns:IMyContract">
<wsp:PolicyReference URI="#NetTcpBinding_IMyContract_policy" />
<soap12:binding transport="http://schemas.microsoft.com/soap/tcp" />
<wsdl:operation name="Hello">
<soap12:operation soapAction="http://tempuri.org/IMyContract/Hello" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_IMyContract" binding="tns:BasicHttpBinding_IMyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
<wsdl:port name="NetTcpBinding_IMyContract" binding="tns:NetTcpBinding_IMyContract">
<soap12:address location="net-tcp://tempuri.org:8000/TestNetTcp/" />
<wsa10:EndpointReference>
<wsa10:Address>net-tcp://tempuri.org:8000/TestNetTcp/</wsa10:Address>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
<wsx:MetadataSection xmlns="" Dialect="http://www.w3.org/2001/XMLSchema" Identifier="http://tempuri.org/">
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Hello">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="HelloResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
</xs:schema>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:AsymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:InitiatorToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:InitiatorToken>
<sp:RecipientToken>
<wsp:Policy>
<sp:X509Token sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
<wsp:Policy>
<sp:WssX509V3Token10 />
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:RecipientToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
<sp:OnlySignEntireHeadersAndBody />
</wsp:Policy>
</sp:AsymmetricBinding>
<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:MustSupportRefKeyIdentifier />
<sp:MustSupportRefIssuerSerial />
</wsp:Policy>
</sp:Wss10>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<wsp:PolicyReference URI="#BasicHttpBinding_MyContract_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<wsp:PolicyReference URI="#BasicHttpBinding_MyContract_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,68 @@
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<MetadataSection Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="service" targetNamespace="http://tempuri.org/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<xs:schema xmlns:tns="http://tempuri.org/Imports" targetNamespace="http://tempuri.org/Imports" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
</xs:schema>
</types>
<portType name="MyContract" />
<binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
</binding>
<service name="service">
<port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</port>
</service>
</definitions>
</MetadataSection>
<MetadataSection Dialect="http://www.w3.org/2001/XMLSchema" Identifier="http://schemas.microsoft.com/2003/10/Serialization/">
<xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="anyType" nillable="true" type="xs:anyType" />
<xs:element name="anyURI" nillable="true" type="xs:anyURI" />
<xs:element name="base64Binary" nillable="true" type="xs:base64Binary" />
<xs:element name="boolean" nillable="true" type="xs:boolean" />
<xs:element name="byte" nillable="true" type="xs:byte" />
<xs:element name="dateTime" nillable="true" type="xs:dateTime" />
<xs:element name="decimal" nillable="true" type="xs:decimal" />
<xs:element name="double" nillable="true" type="xs:double" />
<xs:element name="float" nillable="true" type="xs:float" />
<xs:element name="int" nillable="true" type="xs:int" />
<xs:element name="long" nillable="true" type="xs:long" />
<xs:element name="QName" nillable="true" type="xs:QName" />
<xs:element name="short" nillable="true" type="xs:short" />
<xs:element name="string" nillable="true" type="xs:string" />
<xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte" />
<xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt" />
<xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong" />
<xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort" />
<xs:element name="char" nillable="true" type="tns:char" />
<xs:simpleType name="char">
<xs:restriction base="xs:int" />
</xs:simpleType>
<xs:element name="duration" nillable="true" type="tns:duration" />
<xs:simpleType name="duration">
<xs:restriction base="xs:duration">
<xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?" />
<xs:minInclusive value="-P10675199DT2H48M5.4775808S" />
<xs:maxInclusive value="P10675199DT2H48M5.4775807S" />
</xs:restriction>
</xs:simpleType>
<xs:element name="guid" nillable="true" type="tns:guid" />
<xs:simpleType name="guid">
<xs:restriction base="xs:string">
<xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}" />
</xs:restriction>
</xs:simpleType>
<xs:attribute name="FactoryType" type="xs:QName" />
</xs:schema>
</MetadataSection>
</Metadata>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<http:NtlmAuthentication xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http" />
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<wsp:PolicyReference URI="#BasicHttpBinding_MyContract_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import namespace="http://tempuri.org/" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="IMyContract_Hello_InputMessage">
<wsdl:part name="parameters" element="tns:Hello" />
</wsdl:message>
<wsdl:message name="IMyContract_Hello_OutputMessage">
<wsdl:part name="parameters" element="tns:HelloResponse" />
</wsdl:message>
<wsdl:portType name="IMyContract">
<wsdl:operation name="Hello">
<wsdl:input wsaw:Action="http://tempuri.org/IMyContract/Hello" message="tns:IMyContract_Hello_InputMessage" />
<wsdl:output wsaw:Action="http://tempuri.org/IMyContract/HelloResponse" message="tns:IMyContract_Hello_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IMyContract" type="tns:IMyContract">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Hello">
<soap:operation soapAction="http://tempuri.org/IMyContract/Hello" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_IMyContract" binding="tns:BasicHttpBinding_IMyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
<wsx:MetadataSection xmlns="" Dialect="http://www.w3.org/2001/XMLSchema" Identifier="http://tempuri.org/">
<xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Hello">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
<xs:element name="HelloResponse">
<xs:complexType>
<xs:sequence />
</xs:complexType>
</xs:element>
</xs:schema>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<wsp:PolicyReference URI="#BasicHttpBinding_MyContract_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Metadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns="http://schemas.xmlsoap.org/ws/2004/09/mex">
<wsx:MetadataSection xmlns="" Dialect="http://schemas.xmlsoap.org/wsdl/" Identifier="http://tempuri.org/">
<wsdl:definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="service" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsp:Policy wsu:Id="BasicHttpBinding_MyContract_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp />
</wsp:Policy>
</sp:TransportBinding>
<sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssUsernameToken10 />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SignedSupportingTokens>
<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy />
</sp:Wss10>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsdl:types />
<wsdl:portType name="MyContract" />
<wsdl:binding name="BasicHttpBinding_MyContract" type="tns:MyContract">
<wsp:PolicyReference URI="#BasicHttpBinding_MyContract_policy" />
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
</wsdl:binding>
<wsdl:service name="service">
<wsdl:port name="BasicHttpBinding_MyContract" binding="tns:BasicHttpBinding_MyContract">
<soap:address location="http://tempuri.org/TestHttp/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
</wsx:MetadataSection>
</Metadata>

Some files were not shown because too many files have changed in this diff Show More