Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

InfoPath with Microsoft Content Management Server Web Services : Creating the MCMS Web Service Project

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/12/2012 5:43:31 PM

Project Overview

We will develop a solution that will enable MCMS Authors to maintain content stored in the MCMS repository using InfoPath 2003 via ASP.NET Web services.

The user will be able to launch a single InfoPath form and select the posting they wish to modify, which can be based on any MCMS template. A Web service call will then be made that loads the posting, placeholders, and custom properties from the MCMS repository, using the MCMS Publishing API (PAPI). The InfoPath form will then be populated with this data so the user can make their modifications to the content. Once the changes are complete they can then be sent back to the ASP.NET Web service and saved to MCMS.

For simplicity the solution outlined in this chapter will only permit editing of HtmlPlaceholders and Text custom properties of existing postings, but it could be extended to create new postings, use different types of placeholders, and to set selection custom properties. For further enhancement ideas, see the Possible Enhancements to this Solution section at the end of the chapter.

The form we will create retrieves and displays the posting and template details, and allows modifications to the custom properties and placeholders. The placeholders will use InfoPath’s rich text control that allows formatting of the content. A bonus of this solution is that all placeholder content will be transformed into XHTML (Extensible HyperText Markup Language, which at its most basic level is HTML that conforms to XML standards) as InfoPath’s data is stored in XML.



What are ASP.NET Web Services?

ASP.NET Web services allow software developers to create an interface for their application that supports integration across application domains. ASP.NET Web services consist of one or more Web methods. Web methods are like methods of regular .NET objects, but are invoked over a network and executed on the server that hosts the Web service. This is similar to Remote Procedure Calls (RPC) and DCOM object invocation.

When calling a Web method, parameters may be passed and any return value can be retrieved. As the method call is sent to the machine hosting the Web service using HTTP, the objects being passed as parameters are transformed into a format suitable for transmission. In this case, XML serialization is employed, which is the process of converting an object from its binary form in memory to HTTP-safe XML format.

We have chosen to use ASP.NET Web services to integrate InfoPath with MCMS as it allows us to use the robustness of .NET while maintaining a flexible GUI built in InfoPath. Web services are platform independent and are also the preferred integration method for InfoPath. Another possible solution would be to develop the code within InfoPath by scripting the queries to MCMS and handcrafting the InfoPath form, but we would then lose the benefits of having one centralized store for business logic and processing thus reducing our ability to scale and support the solution.

Creating the MCMS Web Service Project

The MCMS Authoring Web service will access MCMS via the Publishing API. A series of Web methods will allow developers to retrieve template details, and update postings. The MCMS Authoring Web service project will be created from the MCMS Web Service project template in Visual Studio .NET 2003. The MCMS Web Service project template automatically includes the correct references and web.config entries to talk to MCMS.

Let’s go ahead and create this ASP.NET Web service application:

1.
Launch Visual Studio .NET and from the File menu, select New | Project.

2.
From the Project Types panel, select Visual C# Projects under Content Management Server Projects.

3.
From the Templates panel, select MCMS Web Service.

4.
Enter the location as http://localhost/McmsAuthoringWebService and click OK.



A project should now be created and you will notice all the required MCMS references are already created. You can delete the Console folder from the project as we do not need it.

Other -----------------
- Microsoft SharePoint 2010 : Social Architecture - Viewing an Activity feed, Setting up and compiling an audience
- Microsoft SharePoint 2010 : Creating an Alternate Access Mapping & Patching
- Microsoft Systems Management Server 2003 : Communicating Through Senders (part 2) - Courier Sender
- Microsoft Systems Management Server 2003 : Communicating Through Senders (part 1) - Sender Process Flow & Defining a Sender
- Windows Server 2008 Server Core : Working with iSCSI Using the iSCSICli Utility (part 2) - iSCSICli Mappings and Flags
- Windows Server 2008 Server Core : Working with iSCSI Using the iSCSICli Utility (part 1) - Working with the iSCSI Client (iSCSICli) Utility
- Active Directory Domain Services 2008 : Modify an Organizational Unit's General Properties, Modify an Organizational Unit's Managed By Properties
- Active Directory Domain Services 2008 : Move an Organizational Unit
- Windows Server 2008 R2 : Troubleshoot IPV4 - Verify Responsiveness
- Windows Server 2008 R2 : Troubleshoot IPV6 (part 2) - Check the Routing Table for IPV6, Flush the DNS Cache
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server