4/12/2018 2:37 PM Windows Communication Foundation: Migration, interop, upgrade, and integration Risman Adnan ISV Lead, Microsoft Indonesia rismana@microsoft.com http://geeks.netindonesia.net/blogs/risman © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Integration Motivations 4/12/2018 2:37 PM Integration Motivations Deployed LOB logic is the core asset Lengthy application lifecycle Stability is key Duplication often unacceptable Utility throttled by proprietary access New end-to-end solutions on top of existing heterogeneous environment Goal of integration: Provide the benefits of SO without outweighing the cost of adoption © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF Degrees Of Integration 4/12/2018 2:37 PM WCF Degrees Of Integration Wire-level interoperability WS-* protocols for ASP.NET, WSE and non-MSFT web-services and clients Product level integration Feature level support for integrating COM and COM+ applications Feature level support to integrate with existing MSMQ applications Extensible channel architecture to implement integration between WCF and technology X Code Migration © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
.NET Framework v2.0 Web Services 4/12/2018 2:37 PM .NET Framework v2.0 Web Services ASP.NET Web services implementation in the .NET v2.0 Framework Supports WS-I Basic Profile (BP) 1.1 for simple services with metadata support Doesn’t implement WS-* specifications WSE 3.0 is an add-on to the .NET v2.0 Framework WSE 3.0 released with Visual Studio 2005 Implements several WS-* specifications Adds message security to ASP.NET Web services and supports the Basic Security Profile (BSP) 1.0 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
ASP.NET Web Services WS-I Basic Profile Conformance 4/12/2018 2:37 PM ASP.NET Web Services WS-I Basic Profile Conformance WebServiceBinding attribute [WebServiceBinding(ConformsTo=WsiProfiles.BasicProfile1_1, EmitConformanceClaims=true)] [WebService(Namespace="Microsoft.Sample.WebServices")] public class BPConformance_asmx { [WebMethod] public string HelloWorldBP() string message = "'Hello World' from a Basic Profile compliant (BP-compliant) Web Service."; return message; } } © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
ASP.NET Web Services to WCF Interoperability Guidance 4/12/2018 2:37 PM ASP.NET Web Services to WCF Interoperability Guidance Embrace Basic Profile (BP) conformance .NET 2.0 is BP conformant by default Use SOAP 1.1 KISS - Keep Interoperable Schemas Simple Avoid rpc/encoded as not BP compliant SOAP Extensions - harder to migrate © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Web Services Architecture Web Services Enhancements 3.0 4/12/2018 2:37 PM Applications & Application Infrastructure Connected Applications Business Process … Management Security Reliability Transactions Metadata Foundation Messaging XML … HTTP TCP Custom Transports © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WSE 3.0 Turnkey Security Scenarios 4/12/2018 2:37 PM WSE 3.0 Turnkey Security Scenarios Based on industry best practices UsernameOverCertificate AnonymousOverCertificate UsernameOverTransport Kerberos (Windows) MutualCertificate © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF Interoperable Pre-Built Bindings 4/12/2018 2:37 PM WCF Interoperable Pre-Built Bindings WCF Bindings Specifications .NET Web services stacks Non-MSFT Web Services stacks basicHttpBinding SOAP 1.1 Basic Profile 1.1 WS-Security 1.0 Basic Security Profile 1.0 MTOM ASP.NET 1.1 ASP.NET 2.0 WSE 2.0 WSE 3.0 IBM WAS 5.x, 6.0 BEA WL 8.1.x Apache Axis 1.3 wsHttpBinding SOAP 1.2 WS-Security 1.1 IBM WAS 7.x (future) BEA WL 9.x Apache Axis 2.0 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WSE to WCF Interoperability Guidance 4/12/2018 2:37 PM WSE to WCF Interoperability Guidance Embrace The ASP.NET web services guidance Use WSE 3.0 for wire level interoperability with WCF HTTP transport Turnkey Security Scenarios and policy (WSE 3.0) MTOM (WSE 3.0) Avoid TCP transport for interoperability Custom transports DIME (WSE 2.0) Custom security configurations © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF and non-MSFT web services 4/12/2018 2:37 PM WCF and non-MSFT web services Patient Record Repository Request for EMR Pointer to EMR Request for X-Ray X-Ray Image Dr. WCF’s Office Patient Records Locator WCF Dr. Java’s Office BEA WebLogic 8.1.4 Apache Axis 2.0 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Current Application Scenario 4/12/2018 2:37 PM Current Application Scenario Server Server 2 IIS / ASP.NET COM+ BookLogic.Finance Order fulfillment Client Find.aspx Payment.aspx BookLogic.Retail IRetail: -GetBookTitle -OrderBook MSMQ COM WCF client WCF Affiliates service stock data © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
COM+ App As A WCF Service Scenario: Core LOB logic hosted deployed in COM+ throttled by proprietary access WCF includes feature level support to easily generate WCF services ComSvcConfig will expose endpoints for your COM+ component interfaces Provides interoperable, secure, reliable, transacted web service access over a choice of transports ComSvcConfig.exe /install /application:BookSample /contract:BookLogic.Finance,IFinance /hosting:was /mex
COM+ App As A WCF Service 4/12/2018 2:37 PM COM+ App As A WCF Service Server: COM+ App C Client App B App A Component Y DCOM Component X Interface 1 Interface 2 IIS / WAS Endpoint web .config Client WS-* messages Catalog [ Shows 1 of 3 hosting modes ] © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
A WCF Service WCF source ServiceHost WCF .config 4/12/2018 2:37 PM [ServiceContract] public interface IFinance { [OperationContract] [TransactionFlow(TransactionFlowOption.Allowed)] bool ValidateCardNumber(string CCNumber); int ChargeCard(string Name, string Number, float Amount); } WCF source ServiceDescription Address:http://myservice/IFinance.svc Binding Name:WSHttpBinding Contract Operation[0] Name:ValidateCardNumber SyncMethod:params Behaviors:TransactionFlowAttribute:Allowed Operation [1] Name:ChargeCard ServiceHost <configuration xmlns="…"> <system.serviceModel> <services> <service type="Lucerne.FinanceService" <endpoint address="“ binding="wsHttpBinding“ bindingConfiguration="Binding1“ contract="Lucerne.IFinance" /> </service> </services> </system.serviceModel> </configuration> WCF .config © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
A COM+ Integration WCF Service 4/12/2018 2:37 PM A COM+ Integration WCF Service [ uuid(5D9A0467-AFFE-3250-988D-24B439686656), ] interface IFinance : IDispatch { HRESULT ValidateCardNumber( [in] BSTR CCNumber, [out, retval] VARIANT_BOOL* pRetVal); HRESULT ChargeCard( [in] BSTR Name, [in] BSTR Number, [in] single Amount, [out, retval] long* pRetVal); }; COM contract [typelib + catalog] ServiceDescription Address:http://myservice/IFinance.svc Binding Name:WSHttpBinding Contract Operation[0] Name:ValidateCardNumber SyncMethod:params Behaviors:TransactionFlowAttribute:Allowed Operation [1] Name:ChargeCard ServiceHost <configuration xmlns="…"> <system.serviceModel> <services> <service type="Lucerne.FinanceService" <endpoint address="“ binding="wsHttpBinding“ bindingConfiguration="Binding1“ contract="Lucerne.IFinance" /> </service> </services> </system.serviceModel> </configuration> WCF .config © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
COM+ App As A WCF Service The generated service 4/12/2018 2:37 PM COM+ App As A WCF Service The generated service A clear mapping COM class service COM interface service contract COM interface methods operation contract All service configuration through standard WCF .config © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
COM+ Integration Customizations 4/12/2018 2:37 PM COM+ Integration Customizations For exposing a partial interface List as exposedMethods in config For Basic Profile clients (non WS-*) Opt-in to sessionless binding support Uses per-call session semantics in COM+ For COM+ interface that use VARIANT UDTs Types cannot be determined through reflection Specify types and typelibs in config For methods with object reference parameters /allowReferences and specify type in config Requires IPersistStream and is non-interoperable © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF Queuing Channels Overview 4/12/2018 2:37 PM WCF Queuing Channels Overview MSMQ Transport Channel To exchange queued messages between WCF applications SOAP within MSMQ message Supports new WCF queue addressing scheme MSMQ Integration Channel To exchange queued messages between legacy MSMQ and WCF applications Classic MSMQ message Supports all existing MSMQ addressing and protocol schemes © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF Client To MSMQ Receiver 4/12/2018 2:37 PM WCF Client To MSMQ Receiver Scenario Key business processes are at the other end of an MSMQ queue. WCF clients need to send message to the queue to be processed by deployed MSMQ receiver Solution: Use WCF’s MSMQ Integration Channel Provides: Integrates WCF clients with existing MSMQ applications without modification Places classic MSMQ message on the wire Same infrastructure, same management, same receiver code © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
WCF Client To MSMQ Receiver 4/12/2018 2:37 PM WCF Client To MSMQ Receiver WCF Client App .config MSMQ Receiver WCF Integration Channel MSMQ Queue Manager Queue Manager QM to QM transfer MSMQ Store Store MSMQ © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
MSMQ Client To WCF Receiver 4/12/2018 2:37 PM MSMQ Client To WCF Receiver Scenario: Services are proliferating and you wish to call from deployed MSMQ clients Solution: Use WCF’s MSMQ Integration Channel to communicate with service endpoints Provides: Integrates existing MSMQ clients with WCF services Sender sends message same as it always did WCF service can consume classic MSMQ messages from the wire Messages arriving in the queue are converted to SOAP messages and dispatched to the operationcontract by the channel © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
MSMQ Client To WCF Receiver 4/12/2018 2:37 PM MSMQ Client To WCF Receiver MSMQ Client WCF Receiver App .config MSMQ Integration Channel WCF Queue Manager Queue Manager QM to QM transfer MSMQ Store Store MSMQ © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Consuming Services In COM 4/12/2018 2:37 PM Consuming Services In COM Scenario: Services are proliferating but COM based clients are still prevalent WCF provides a client proxy tool (SvcUtil) WCF provides a COM-specific “service” moniker Control over service address, binding and contract Usage patterns: Typed contract WSDL contract Metadata Exchange contract IChannelCredentials for security / cert specifics Provides interoperable, secure, reliable, transacted web service access over a choice of transports © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Summary Microsoft is committed to leveraging existing investments 4/12/2018 2:37 PM Summary Microsoft is committed to leveraging existing investments ASMX & WSE 3.0 wire level interoperability Integration is baked into the WCF runtime for COM+, COM & MSMQ Continued use of MSMQ transport Adopting WCF can be low impact, incremental and alongside migration Feedback urgently required Prototype with the WinFX CTPs Find those edges! © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Resources Web Services Developer Center - WSE http://msdn.microsoft.com/webservices/ Vista Developer Center – WinFX / WCF http://msdn.microsoft.com/windowsvista/ Windows Communication Foundation community site http://windowscommunication.net Windows Communication Foundation forum http://forums.microsoft.com/msdn/showforum.aspx?forumid=118
© 2005 Microsoft Corporation. All rights reserved. 4/12/2018 2:37 PM © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Appendix
COM+ App As A WCF Service 4/12/2018 2:37 PM COM+ App As A WCF Service Server: COM+ App C Client App B App A Component Y DCOM Component X Interface 1 Interface 2 ServiceModel Initializer App .config WS-* messages Client Endpoint Catalog COM+ hosted: Remains accessible from DCOM No message based activation © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
COM+ App As A WCF Service 4/12/2018 2:37 PM COM+ App As A WCF Service Server: COM+ App C Client App B App A Component Y DCOM Component X Interface 1 Interface 2 IIS / WAS WS-* messages Client Endpoint Endpoint Catalog web .config Web hosted: Remains accessible from DCOM Message based activation, cross-process © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
COM+ App As A WCF Service 4/12/2018 2:37 PM COM+ App As A WCF Service Server: COM+ App C App B App A IIS / WAS WS-* messages Client Component Y Endpoint Component X Interface 1 Interface 2 Endpoint Catalog web .config Web hosted in-proc: Message based activation All in process © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
MSMQ & Windows Vista Enhancements to MSMQ 4/12/2018 2:37 PM MSMQ & Windows Vista Enhancements to MSMQ Poison message handling for MSMQ Per application error queue WCF services can receive messages transactionally across the network © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.