In service-oriented solution I designed there was an interface where some operations were handled by BizTalk while some were just straight data services with no need for orchestration. The idea was to keep web service operations in one endpoint for business reasons, security and operational considerations. Using WCF way of describing interface example may look like this:


[ServiceContract(Name=“TestService”, Namespace = “http://mynamespaces.com/TestService”)]
public interface ITestService

{
  [OperationContract(Name =
“ProcessItem”,
    Action=“http://mynamespaces.com/TestService/ProcessItem“,
    ReplyAction=“http://mynamespaces.com/TestService/ProcessItemResponse”
)] 
  ProcessItemResponse ProcessItem(DataItem item);

  [OperationContract(Name=
“GetDataItem”,
    Action=http://mynamespaces.com/TestService/GetDataItem,
    ReplyAction=“http://mynamespaces.com/TestService/GetDataItemResponse”
)]
  DataItem GetDataItem(DataItemInfo info);
}


ProcessItem operation is BizTalk orchestration exposed as web service and GetDataItem is a simple data service that does not require orchestration. The question is how to generate WSDL contract and server proxy knowing that BizTalk publishing process will override any changes we make to the proxy code. It is quite possible since BizTalk proxy derives from System.Web.Services.WebService class and is defined in partial class. All we need is to put BizTalk operations in one code file and the rest into another and provide proper binding declarations on them. Here’s code for BizTalk part of the TestService.cs:


    [System.Web.Services.WebServiceBindingAttribute(
        Name
=TestService,
        ConformsTo
= System.Web.Services.WsiProfiles.None,
        EmitConformanceClaims
= false)]
    [System.Web.Services.WebServiceAttribute(
        Name
=TestService,
        Namespace
=http://mynamespaces.com/TestService<SPAN style="COLOR: