extending enovia smarteam with soa solutions: develop your own soa for smarteam
DESCRIPTION
Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam. Michael S. Chan xLM Solutions, LLC. Your own SOA solutions to extend SmarTeam. + other business or engineering services and applications. Outline. What? SOA, Service, Contract, Endpoint? Why? - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/1.jpg)
Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam
Michael S. Chan
xLM Solutions, LLC
![Page 2: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/2.jpg)
+other business or engineering
services and applications
Your own SOA solutions to extend SmarTeam
![Page 3: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/3.jpg)
Outline• What?
• SOA, Service, Contract, Endpoint?• Why?
• Benefits of an SOA• How?
• Windows Communication Foundation (WCF)• A Basic WCF Service Example
• A Simple Service• An Even Simpler Client
• A SmarTeam SOA Service Example• Adding Support for SmarTeam• Debugging
![Page 4: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/4.jpg)
What is a Service-Oriented Architecture (SOA)?
An architectural concept, style, or paradigm
Loosely coupled and distributed services provide the desired functionalities
Not a technology-driven approach
A business-driven approach
What?
![Page 5: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/5.jpg)
• A self-contained, stateless entity that performs a certain business process
• Services are provided by a Provider (Server)
• Services are used by a Consumer (Client)
What is a Service? Service 1
Service 2
Service 3Client
![Page 6: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/6.jpg)
Service A
Service B
Service CClient X
The Four Tenets of a Service
1. Boundaries are explicit2. Services are autonomous3. Services share the Schema and Contract,
not classes4. Service compatibility is based on Policy
(talk to ERP)
(talk to PLM)
(talk to Shipping)
![Page 7: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/7.jpg)
Contracts• Establish explicit boundaries for the service• Three types of contracts:
• Service Contract: exposes Service behavior (methods)
• Data Contract: exposes persistent data• Message Contract: exposes custom
message structure
![Page 8: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/8.jpg)
Why adopt an SOA?• A foundation for seamless Enterprise Information
Integration (EII)• Open standards and messaging
• A high degree of loose coupling and interoperability across platforms and technologies
• Flexibility in software and hardware selections• Independent and boundary-explicit services
• Allows for modulo development, deployment and maintenance
• Increase the ROI by developing new services and applications based on existing software and business processes
Why?
![Page 9: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/9.jpg)
Benefits of Extending SmarTeam with an SOA• Developed SmarTeam Services are expendable and
reusable for future projects• Remote clients can run on systems with no SmarTeam
installations• Clients of various levels of complexity may connect
and consume the SmarTeam services• Different clients may consume different subsets of the
SmarTeam services• A client may be built as
• A standalone thin application• A plug-in for another software package (e.g., Outlook)• Part of a web page or site (e.g., a SharePoint web
part)
![Page 10: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/10.jpg)
How to Implement an SOA?Microsoft Windows Communication
Foundation (WCF)
A service-oriented programming model and technology for developing distributed applications
How?
![Page 11: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/11.jpg)
System Requirements• Microsoft Windows Communication Foundation
(WCF) in .NET Framework 3.0• Supports:
• Windows XP SP2 (add-on)• Windows Server 2003 SP1 (add-on)• Windows Server 2003 R2 (add-on)• Windows Vista• Windows Server 2008
• Microsoft Visual Studio 2005 (SPx) or 2008• May use C#, VB.NET, or other
CLR-Compatible languages
![Page 12: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/12.jpg)
Hosting WCF Services
1. Self-hosting in any managed .NET application2. Hosting in a standalone Windows service3. Hosting in IIS ( Web Services)
• WinXP: IIS 5.1• Win2003/R2: IIS 6.0• Vista/Win2008: IIS 7.0 (Windows Activation Service)
HTTP TCP/IP Named Pipes MSMQ
*SmarTeam requirement
*
![Page 13: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/13.jpg)
A Basic WCF Service Example
![Page 14: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/14.jpg)
WCF Support in Visual Studio 2005
![Page 15: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/15.jpg)
WCF Support in Visual Studio 2005
VS2005
![Page 16: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/16.jpg)
WCF in VS2005
Service Contract Definition(Interface Definition)
Service Class Definition(Business Process Logic)
Data Contract Definition(Custom Data Class
Definition)
![Page 17: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/17.jpg)
WCF in VS2005
ServiceContract
Data Contract
![Page 18: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/18.jpg)
WCF in VS2005
![Page 19: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/19.jpg)
Setup Hosting on IIS
![Page 20: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/20.jpg)
Tips: Setup Service Project Output Directory
![Page 21: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/21.jpg)
Add Service Configuration File: STService.svc
![Page 22: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/22.jpg)
STService.svc
![Page 23: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/23.jpg)
Add web.config and Support for MetaData Exchange
Services
Behaviors
![Page 24: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/24.jpg)
Checking…
So Far So Good
![Page 25: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/25.jpg)
Create a Console Client (Consumer)
![Page 26: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/26.jpg)
Adding a Console Client…
Run svcutil.exe in the client project directory to create “app.config” and “BasicService.cs”
• Add “app.config” and “BasicService.cs” to client project
• Add System.ServiceModel and System.Runtime.Serialization
• Change “Program.cs” to “ConsoleClient.cs”
![Page 27: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/27.jpg)
Building the Console Client
![Page 28: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/28.jpg)
A SmarTeam SOA Service Example
![Page 29: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/29.jpg)
Development Approach
Modify the MySTService.BasicService service
Re-run svcutil.exe
Modify or re-develop the client
Debug the Service and Client
![Page 30: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/30.jpg)
Tasks for this Example
• Add a method to return a list of Super Classes in the current SmarTeam database
• Obtain two names from each super class:• Name – internal• External name – friendly
• Develop a custom data class [DataMember] for the output
![Page 31: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/31.jpg)
Using the SmarTeam Object Model and API
![Page 32: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/32.jpg)
Add a New Data Contract (Custom Data Class)
![Page 33: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/33.jpg)
Modify the WCF Service: Add SmarTeam Support
• Instantiate a SmarTeam engine (FreeThreadedEngine)• Create new SmarTeam session• Initialize session with the engine• Connect session to a database• Log onto session
• Log off SmarTeam• Close database connection• Close SmarTeam session• Terminate SmarTeam engine
Perform Business Logic> <
![Page 34: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/34.jpg)
Modify the Service Code
![Page 35: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/35.jpg)
Console Client
![Page 36: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/36.jpg)
Service and Client Debugging
Unblock Windows Firewall for VS2005 Remote Debugger
![Page 37: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/37.jpg)
Debugging Your SmarTeam Service(With Visual Studio Remote Debugger)
On the remote system (where the Service is hosted)…
![Page 38: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/38.jpg)
Advanced Debugging
![Page 39: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/39.jpg)
Debugging Example…An Example Application…
![Page 40: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/40.jpg)
Other WCF Tools
• SvcConfigEditor.exe• Create and modify configuration settings for WCF
services• Manage settings for WCF bindings, behaviors,
services, and diagnostics
• SvcTraceViewer.exe• Helps analyze diagnostic traces generated by WCF
listeners
![Page 41: Extending ENOVIA SmarTeam with SOA Solutions: Develop Your Own SOA for SmarTeam](https://reader038.vdocuments.us/reader038/viewer/2022102819/56814326550346895daf92f2/html5/thumbnails/41.jpg)
SmarTeam SOA Extension Considerations• A Service should be stateless
• Create a new SmarTeam session (login,logoff) on each connection
• Client provides authentication information• How to acquire the user name and password?