Creating Your Own Creating Teamcenter SOA Services
Platform Extensibility Services
Page 2
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Platform Extensibility Services Creating Teamcenter Services (SOA)
Over view Demo ± Creating a Teamcenter Ser vice Operation Summary
Page 3
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Teamcenter¶s Solution
Services that ena le you to realize value from your Teamcenter investment quickly and cost effectively
Platform
tensi ility Services
Teamcenter BMIDE Configure Configure Teamcenter To Fit Your Business Business Teamcenter Teamcenter Connect Modeler Global Gateway Connect Teamcenter & OtherSer Enter prise Applications Teamcenter vices SOA Ser vices
Integrated Customize Development Eclipse Customize En Teamcenter vironment W ith Specialized Applications
Page 4
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Use Cases for Creating a Teamcenter Service There are a number of Use Case for defining and implementing a new Teamcenter Service operation:
Internal Teamcenter Development Developers in the Teamcenter organization are using the BMIDE to define and implement ser vices that extend the core product Add-On Extensions Developers creating an Add-On Extension to Teamcenter and need to provide a client/ser ver interaction that does not exist in the core product Site Customization Developers creating a Site Customization and need to provide a client/ser ver interaction that is unique to a use case at that particular site
Page 5
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
User Scenario
Create a Template Project Define a Ser vice Create a Ser vice Library Create a Ser vice Interface Create Data Types Create a Ser vice Operation Generate Source & Build Auto-generate Source Files Implement Ser vice Operation Compile Source Deploy the Ser vice Libraries Use the New Ser vice Add Libraries to Client Development Environment Write Code to use Ser vice Operation Copyright © Siemens PLM Software Inc. 2009. All rights reserved.
Page 6
May-09
Siemens PLM Software
Create a Template Project Services are created in a Business Modeler Template P roject From the µNew Project¶ dialog, select the µNew Business Modeler IDE Template Project¶ This will step you through the input needed to create the project Required Compilers Source location Desired Client bindings (AVI)
Page 7
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Define a Service Create a Service Library Create the Service Library in the Extensions View Select the µSer vices¶ Context Menu µNew Ser vice Library¶ Fill in the dialog fields for your library
Page 8
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Define a Service Create a Service Interface Create the Service Interface in the Extensions View Each Service Library may contain one or more Service Interfaces. Each Ser vice Interface will contain one or more Service Operations, and Data Types used by those operations
Select the µ AcmeSoaCore¶ Context Menu µNew Ser vice¶ Fill in the dialog fields for your ser vice
Page 9
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Define a Service Create Data Types Create the Data Types in the Data Types tab of the DataManagement Service Editor. All custom data structures used in a service operation must be defined first Select the µ Add...¶ button Fill in the dialog fields for your data type ( AVI)
Page 10
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Define a Service Create a Service Operation Create the Service Operation in the Operations tab of the DataManagement Service Editor Select the µ Add...¶ button Fill in the dialog fields for your ser vice operation ( AVI)
Page 11
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Generate Source & Build Auto-generate Source Files Auto-generate source code from the Extensions View Select the µ AcmeSoaCore¶ Context Menu µGenerate Code Ser vice Artifacts¶.
Page 12
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Generate Source & Build Implement Service Operation Implement the service operation from the Project Explorer View in the C/C++ Perspective Double click on the datamanagement0906impl.cxx file in the Project Explorer View to load the source file into the editor The previous auto-generation step created an outline for the ser vice, you will need to add the actual business logic for the operation
Page 13
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Generate Source & Build Compile Source Compile your service implementation and generated source code Save the datamanagement0906impl.cxx file Select the Project Build All menu items This will produce ser ver side libraries under the output/ser ver/lib folder Client libraries under out/client XSD bindings used on both client and ser ver under output/types
Page 14
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Deploy the Service Libraries Deploy the Service Library to the Teamcenter Server Select the µ AcmeSoaCore¶ Context Menu µDeploy Template...¶ Select the µSer ver connection Profile¶, other fields will be filled in automatically Fill in the µUser ID¶ and µPassword¶, and press the µFinish¶ button
Page 15
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Use the New Service Add Service Client Libraries to A pplication B uil d Env. Add the generated client libraries to your client application¶s development environment. This process is unique to each client application¶s development environment Copy the client Jars from the Acme Template project output folder. Add those Jars to the client application¶s classpath
Page 16
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Use the New Service W rite Cod e to Use Service Operation. Write the client application code to call the new service operation Add the needed import statements Instantiate the ser vice stub. Fill in the input arguments Call the ser vice operation
Page 17
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Summary.
Teamcenter Ser vices are defined in the BMIDE A hybrid code-less and code-full extension point Only a small piece (the implementation of the ser vice operation business logic) done with hand coding The busywork (the communications and marshalling/demarshalling) are generated for you
On site customization is done with the same tool used internally by the Teamcenter development team.
Page 18
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Related Sessions Benefits of SOA Tuesday / 4:50 ± 5:30 Platform Extensibility Services Overview Wednesday / 9:40 ± 10:10 Metamodel: Codeless and Codeful Customization of Teamcenter Wednesday / 3:25 ± 4:50 Customization Guidelines Tuesday / 4:10 ± 4:50 Teamcenter Architecture Update Thursday / 11:00 ± 11:45
Page 19
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Related Material
Business Modeler IDE Guide
Teamcenter Services Guide
Teamcenter Services Reference
Contact for obtaining additional material
Michael Zawacki
[email protected]
Office ± (425) 468-5346
Mobile ± (425) 830-6181
Page 20
May-09
Copyright © Siemens PLM Software Inc. 2009. All rights reserved. Siemens PLM Software
Ron
Marchi Teamcenter Development
[email protected] Steve Chesney Teamcenter Development
[email protected]