-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1073 from avoronin565/XmlIncludeAttribute
Add XmlIncludeAttribute support when generating wsdl.
- Loading branch information
Showing
4 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using System; | ||
using System.ServiceModel; | ||
using System.Xml.Serialization; | ||
|
||
namespace SoapCore.Tests.Wsdl.Services | ||
{ | ||
[ServiceContract] | ||
internal interface IXmlIncludeService | ||
{ | ||
[XmlInclude(typeof(XmlIncludeService.Dog))] | ||
[XmlInclude(typeof(XmlIncludeService.Cat))] | ||
[OperationContract] | ||
XmlIncludeService.Animal Test(XmlIncludeService.Animal value); | ||
} | ||
|
||
public class XmlIncludeService : IXmlIncludeService | ||
{ | ||
public Animal Test(Animal value) | ||
{ | ||
return value; | ||
} | ||
|
||
[Serializable] | ||
[XmlInclude(typeof(Dog))] | ||
[XmlInclude(typeof(Cat))] | ||
public class Animal | ||
{ | ||
} | ||
|
||
[Serializable] | ||
public class Dog : Animal | ||
{ | ||
} | ||
|
||
[Serializable] | ||
public class Cat : Animal | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters