You are previewing Microsoft Dynamics AX 2012 Services.
O'Reilly logo
Microsoft Dynamics AX 2012 Services

Book Description

Everything you need to know about implementing services with Microsoft Dynamics AX 2012 is contained in this hands-on guide. Easy to follow and totally practical, it’s a must for both new and experienced AX Dynamics developers.

  • Learn about the Dynamics AX 2012 service architecture.

  • Create your own services using wizards or X++ code

  • Consume existing web services and services you’ve created yourself

  • In Detail

    Because an ERP system like Microsoft Dynamics AX 2012 plays a central role in an organization, there will always be the need to integrate it with other applications. In many cases, services are the preferred way of doing this, and Microsoft Dynamics AX 2012 is now more flexible than ever when it comes to the creation and use of these services. Understanding these services will help you identify where they can be used, and do so effectively.

    "Microsoft Dynamics AX 2012 Services" is a hands-on guide that provides you with all the knowledge you will need to implement services with Microsoft Dynamics AX 2012. The step-by-step examples will walk you through many of the tasks that you need to perform frequently when creating and using services.

    "Microsoft Dynamics AX 2012 Services" provides detailed and practical examples for creating and using services that will make it a resource you will consult many times during your implementations

    This book helps you to identify situations where services can be used for your implementations. By providing step-by-step instructions for many of the common tasks, you will gain practical know-how on to get the job done.

    Easy to follow instructions are provided for all types of services you will encounter. You will learn how to create document services using the AIF Document Service Wizard and how to use X++ to create custom services. You will also learn how to deploy services and web services and how you can consume them in both X++ and .NET. The services are also put to use in the SysOperation framework, which uses services to run business logic and is the new way to create batch processes in Microsoft Dynamics AX 2012.

    Table of Contents

    1. Microsoft Dynamics AX 2012 Services
      1. Table of Contents
      2. Microsoft Dynamics AX 2012 Services
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
          3. Instant Updates on New Packt Books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Getting Started with Microsoft Dynamics AX 2012 Services
        1. What are services and SOA?
          1. Example implementations
            1. Bing API
            2. Mobile application
            3. Business Process Modeling (BPM)
          2. Architecture overview
        2. What's new?
          1. AOS WCF service host
          2. WCF adapters
          3. Integration ports
          4. IIS hosting without Business Connector
          5. Non-XML support
          6. AIF change tracking
          7. Custom services
          8. The SysOperation framework
        3. Types of services
          1. Document services
          2. Custom services
          3. System services
            1. Query service
            2. Metadata service
            3. User session service
          4. The right service for the right job
            1. Complexity
            2. Flexibility
        4. Summary
      9. 2. Service Architecture and Deployment
        1. What is WCF?
          1. Existing technologies
          2. The ABC of WCF
        2. Service deployment
          1. Service operations
          2. Inbound versus outbound ports
            1. Inbound ports
            2. Outbound ports
          3. Basic versus enhanced ports
            1. Basic ports
              1. Creating a basic port
            2. Enhanced ports
              1. Creating an enhanced port
              2. Adapters
              3. Service operations
              4. Data policies
              5. Transforms
              6. Pipelines
              7. Value mapping
              8. Document filters
              9. Troubleshooting
              10. Security
        3. Bindings
          1. Adapters
            1. NetTcp adapter
            2. HTTP adapter
            3. File system adapter
            4. MSMQ adapter
            5. Custom adapters
        4. Service generation – under the hood
          1. Generated artifacts
            1. Service contract and implementation
            2. Message contracts
          2. WCF configuration storage
          3. The power of CIL
            1. CIL output
        5. Summary
      10. 3. AIF Document Services
        1. What are document services?
        2. Key components
          1. Document query
          2. Document class
            1. Responsibilities of a document class
              1. XSD generation
              2. XML serialization and deserialization
              3. Cross-table business logic
              4. Validation and business rule enforcement
          3. AxBC classes
            1. Responsibilities of an AxBC class
              1. Validation
              2. Field sequencing
              3. Value mapping
              4. Default values
          4. Service class
          5. Service node
        3. Creating a document service
          1. Setting the compiler level
          2. Creating the query
          3. Running the AIF Document Service Wizard
            1. Selecting document parameters
            2. Selecting code generation parameters
            3. Generating code
          4. Finishing up
            1. Fixing compiler errors
              1. ClassDeclaration
              2. The cacheObject method
              3. The cacheRecordRecord method
            2. Fixing tasks
              1. Labels
              2. Generating an XSD job
              3. Constraints
              4. Validation
            3. Updating the service contract
            4. Fixing best practice errors
              1. Privileges
            5. Setting mandatory fields
        4. Updating an existing document service
          1. Adding service operations
          2. Updating supporting classes
        5. Deploying a document service
        6. Consuming a document service
          1. Create
          2. Find
            1. Creating query criteria
            2. Using Find
          3. Read
          4. FindKeys
          5. Update
          6. Delete
          7. GetKeys
            1. Document filter
            2. Using GetKeys
          8. GetChangedKeys
        7. Asynchronous communication
          1. Send service framework
          2. Batch processing
        8. Summary
      11. 4. Custom Services
        1. Key components
          1. Attributes
            1. Custom services attributes
          2. Data contracts
          3. Service contracts
          4. Collection types
        2. Creating custom services
          1. The Title service
            1. The Title data contract
            2. The Title list data contract
            3. The Title service class
            4. The Title list service operation
            5. The Title list service operation
            6. The Title service contract
        3. Deploy the service
          1. The rental service
            1. Rental header and line tables
            2. Rental service operations
            3. Rental data contracts
            4. The createRental service operation
        4. Consuming the service
          1. Example 1 – Retrieving titles
            1. Adding the service reference
            2. Consuming the service
          2. Example 2 – Register a rental
            1. Creating the service reference – Advanced
              1. Always generate message contracts
              2. Collection type
            2. Consuming the service
        5. Summary
      12. 5. The SysOperation Framework
        1. SysOperation versus RunBaseBatch
        2. Creating a SysOperation service
          1. Data contract
            1. Declaration and members
            2. Query helper methods
          2. Service and service operation
          3. Menu item
          4. Testing
          5. Validation
          6. Defaulting
        3. Running a SysOperation service
          1. Service and service operation
          2. Execution modes
            1. Synchronous
            2. Asynchronous
            3. Reliable asynchronous
            4. Scheduled batch
        4. Custom controllers
          1. Usage scenarios
            1. Initializing the data contract
            2. Dialog overrides
          2. Creating a controller
            1. Declaration
            2. The main method
            3. Constructor
            4. Menu item
            5. Testing
        5. Custom UI Builders
          1. Creating a UI Builder
            1. Declaration
            2. The override method
            3. The postBuild method
            4. One more attribute
            5. Testing
        6. Multithreading
          1. Individual task approach
          2. Helper approach
          3. Enabling multithreading
        7. Summary
      13. 6. Web Services
        1. Installing the Visual Studio Tools
        2. Visual Studio development
          1. Introducing the USA zip code service
          2. Creating the Visual Studio proxy library
          3. Adding the service reference
        3. X++ development
          1. Managed code deployment
            1. Deploy to Server
            2. Deploy to Client
          2. Consuming the web service
            1. First attempt
            2. Fixing configuration issues
            3. Deploying between environments
            4. Final result
        4. Summary
      14. 7. System Services
        1. What are system services?
          1. A demo application
        2. Metadata service
          1. Filling the combobox
        3. Query service
          1. Fetching data for the grid
          2. Paging the results
        4. User session service
          1. Retrieving user information
        5. Summary
      15. Index