Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
David Holladay
Microsoft Corporation
May 2004
Applies to:
Microsoft® Office SharePoint™ Portal Server 2003
Microsoft BizTalk® Server
Microsoft SQL Server™
Summary: Learn how to use the Payroll Receipt sample application, which has both a data cache version and an SAP version, to display a user's payroll data within Web Parts on a SharePoint Portal Server page, for example, on a user's My Site. (18 printed pages)
Download PayrollReceipt.EXE.
Overview
Configuring the Data Cache Payroll Receipt Sample Application
Configuring the SAP Payroll Receipt Sample Application
Configure the Payroll Receipt Application Web Part
Conclusion
The Payroll Receipt sample application, developed for use with Microsoft® Office SharePoint™ Portal Server 2003, displays a user's payroll data within Web Parts on a SharePoint Portal Server page (for example, on a user's My Site). The application is provided in two versions that both offer the same user interface (shown in Figure 1):
- Data Cache version. This version uses sample data from a database that is loaded in Microsoft SQL Server™ or a Microsoft SQL Server Desktop Engine (MSDE) instance. This is the simplest version to set up and configure and is very useful for demos or to show how the user interface (UI) looks.
- SAP version. This version connects to a live SAP system through Microsoft BizTalk® Server and the SAP adapter from IWay, and renders the user's payroll data directly from SAP. The SAP version has more setup requirements than the Data Cache version, and provides sample code that shows how to write Web Parts that connect to SAP through BizTalk Server.
Both versions illustrate how to use SharePoint Portal Server 2003 services such as single sign-on, user profiles, and Web Parts. The SAP version also illustrates how to query SAP through a BizTalk Server Web service interface and make calls to SAP Remote Function Calls (RFCs), and how to make use of single sign-on tickets with multiple servers. The source code and a Microsoft Visual Studio® .NET project file are located in the \payroll\source
directory. (This directory is available after you unzip the files from the PayrollReceipt.zip file, which you can download by using the link at the start of this article.)
Figure 1. Sample screen shot of a payroll receipt
Before you can set up the Data Cache Payroll Receipt sample application, you must install the following:
- Microsoft Office SharePoint Portal Server 2003
- Data Cache payroll receipt files (included in the PayrollReceipt.zip file)
Now you can configure the single sign-on service on the SharePoint Portal Server, set up the user profile, and configure the Payroll Receipt sample application Web Part.
Create three Windows NT groups:
- SSOAdmin
- SSOAffiliates
- PayStubUsers
Note You do not have to use the group names specified in this procedure. You can choose your own group names, and the groups can have the same names. However, the names specified in this procedure are used throughout the documentation for this sample application.Create one Windows NT user account named SSOUser.
Add SSOUser to the SSOAdmin group.
Add the local administrator user to the SSOUser group. The user who is configuring the single sign-on service must be a member of the SSOAdmin group and must be a member of the local Administrators group on the computer running SharePoint Portal Server.
Add the account you will be using to PayStubUsers.
Log off and then log back on to the computer running SharePoint Portal Server so that the security changes you made are in effect.
Enable the SSO Service by specifying run-as-user, and then restarting. (For more information on enabling single sign-on, see the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide.)
- Go to http://server_name:port_number/SSO/ManageSSO.aspx, and then click Manage server settings for single sign-on and application definitions.
- Specify the following:
- User name for single sign on: DOMAIN\SSOAdmin
- User name application definition server: DOMAIN\SSOAffiliates
- E-mail address
- Server name: the name of the computer running SQL Server
- Database name: the name of the single sign-on database
- Ticket time out: 10
- Purge audit log records older than: 10
- Click OK. For configuration of the single sign-on service to complete successfully, you must be a member of both the local Administrators group and the SSOAdmin group.
- Go to http://server_name:port_number/SSO/ManageSSO.aspx, and then click Manage settings for application definitions.
- Click Add Item.
- Specify the following:
- Display name: Paystub
- Application name: PayStubDataCacheModel
- Account type: Group
- Field 1: Display name. SQL Server account name
- Field 2: SQL Server password. Select Yes to mask this field.
- Click OK.
- Go to http://server_name:port_number/SSO/ManageSSO.aspx, and then click Manage account information for an application definition.
- Specify the following:
- Application definition: Paystub.
- Group user name: DOMAIN\PayStubUsers.
- Click OK.
- Type the SQL Server or SQL Server Desktop Engine credentials, for example, sa and password. This is the name and password that has access to the SQL Server database called PayStubData (where the Payroll Receipt sample application data is stored).
To add a new user profile property, and specify the user name for each user who will be accessing the sample
Note For more information on adding a new user profile, see the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide.
- Create a user profile property called PayStubDataCacheModel.
- Set the length to 255.
- Set the default user name for the data cache as David Daniels, or enter the name on a specific user's profile page.
On the computer running SharePoint Portal Server, turn off anonymous authentication if it is on.
Download and unzip the Payroll Receipt application files (PayrollReceipt.zip) to the local hard disk of the SharePoint Portal Server computer in a directory called
\Paystub
.On the computer running SharePoint Portal Server, add the Payroll Receipt application assembly to the global assembly cache. You can use Gacutil /if Microsoft.SharePoint.Portal.PayStub.dll, or you can use the Control Panel utility called Microsoft .Net Framework Configuration Utility.
Note You must also add the Payroll Receipt application assembly to the global assembly cache on each SharePoint Portal Server front-end Web server that will be running the application.
On the computer running SQL Server, open SQL Server Enterprise Manager and create a database called Paystubdata.
Open SQL Query Analyzer, select Paystubdata as the database, and run the following two SQL scripts, in this order:
- DataCachePayStub_DBSetup.sql
- DataCachePayStub_DataSetup.sql
On each front-end Web server (and each virtual server, if needed), add entries to the web.config file for the paystub assemblies. Edit
\inetpub\wwwroot\web.config
for each front-end Web server and add the following to the safe controls section:<SafeControl Assembly="Microsoft.SharePoint.Portal.PayStub, Version=1.0.0.1, Culture=neutral, PublicKeyToken= 82628723360129c3 " Namespace= "Microsoft.SharePoint.Portal.PayStub" TypeName="*" Safe="True"/>
On the computer running SharePoint Portal Server, open a command prompt and type iisreset.
Add the Payroll Web Parts to the page by selecting Modify My Page/Add Web Parts/Import.
Click the Browse button, navigate to the
\Paystub
directory, and then select the Microsoft.SharePoint.Portal.PayStub.PayStubDataCacheModelSummaryView.dwp file. Click OK.Click the Import button.
Drag the Web Part onto the Web Part Page.
Click Browse again, navigate to the
\Paystub
directory, and then select the Microsoft.SharePoint.Portal.PayStub.PayStubDataCacheModelDetailedView.dwp file. Click OK.Click the Import button.
Drag the Web Part onto the Web Part Page.
The Payroll Receipt sample application should now display sample payroll data.
Note Do not run the Data Cache and SAP versions of the Payroll Receipt sample application on the same Web Part Page. In addition, do not run two instances of the same sample application on the same Web Part Page.
To configure the SAP Payroll Receipt sample application, you must install the following items:
SAP Payroll Receipt Sample files (PayrollReceipt.zip). This includes Web Parts, BizTalk Server support files, and Custom SAP RFC (the sample requires installation of a custom RFC).
IWay Control Broker for BizTalk Server
For more information, see the IWay Web site at http://www.iwaysoftware.com/products/adapters/sap\_adapt.html. To download an evaluation version and obtain a temporary license, go to the following tech support Web site for IWay, and type the provided user name and password:
Web site: http://techsupport.iwaysoftware.com/iwayssw
Username: iwayssw
Password: sswuserTo obtain an evaluation or permanent license, send an e-mail to: Krista_Gervais@iwaysoftware.com. **Note **This contact name is correct as of this article's publication, but is subject to change.
librfc32.dll (an SAP DLL that must be obtained from SAP at http://www.sap.com; you can find this DLL in the SAP GUI client files).
SAP 4.6C IDES (or equivalent) system (http://www.sap.com). The sample application was tested against an SAP 4.6C IDES system. It is possible that it also works on other versions, but that not tested.
Note The Payroll Receipt sample application may not be globalized. The IWay Adapter, which is a component upon which the sample application depends, is not fully globalized. The Payroll Receipt sample application is English-language version only application, and may have problems running in other language versions.
- Set up SharePoint Portal Server 2003 and BizTalk Server 2002 on separate computers. (This setup process is not addressed in these instructions.)
- Unzip the PayrollReceipt.zip file on the SharePoint Portal Sever 2003 and BizTalk Server 2002 computers.
- Install the customer SAP RFC on the SAP server.
- Install and configure the IWay Control Broker for BizTalk Server.
- Configure BizTalk Server.
- Install and configure the BizTalk Web services adapter.
- Configure SharePoint Portal Sever 2003 single sign-on and user profiles.
- Configure Web Parts.
The files contained in PayrollReceipt.zip are used throughout the instructions in the following topics.
- Unzip the PayrollReceipt.zip files to the local hard disk of the SharePoint Portal Server 2003 computer in the
\payroll
directory. - Unzip the PayrollReceipt.zip files to the local hard disk of the BizTalk Server 2002 computer in the
\payroll
directory.
To set up the Transport Management System of Internet Demo and Evaluation System (IDES) system on the SAP server
Log on as user DDIC in client 000. Enter transaction code STMS.
If no dialog box appears prompting for transport domain and description, then the Transport Management System is already set up and you can omit the rest of this procedure. If a dialog box appears, continue to step 2.
In Transport domain, type the system ID of SAP IDES system. In Description, type Main transport domain.
Select Overview, and then click Systems. Select SAP System, point to Create, and then click Virtual system.
In System, type DUM. In Description, type Dummy system.
Select Extras, and then click Distribute and activate configuration.
Select Environment, and then click Transport Routes.
Select Configuration, point to Display, and then click Change.
Select Configuration, point to Standard configuration, and then click Development and production system.
In Source system, type the system ID of the SAP IDES system.
In Production system, type DUM.
Select Configuration, and then click Distribute and activate.
Copy R900006.SPS to /usr/sap/trans/data, and then copy K900006.SPS to /usr/sap/trans/cofiles. You can find these files in the
\Paystub\SAPRFC
directory.Log on to the IDES client. Enter transaction code STMS.
Figure 2. Logging on to the TMS
Select Overview, and then click Imports.
Figure 3. Imports queue
To display the import queue, double-click the system ID of the SAP IDES system.
Figure 4. Custom RFC to import
Select Extras, point to Other Requests, and then click Add.
Figure 5. Adding to the queue
Select Enter, and then click Yes in the dialog box. The import queue is displayed again with the additional request as the last entry.
Rest the pointer on the new request that you want to import, select Request, and then click Import.
Figure 6. Import location
Enter the current client (800 for IDES) and confirm the client in the confirmation dialog box. The system will import the entered transport request and display the Import Queue again when finished.
To install and configure the IWay Adapter properly, you must ensure that your system meets the following prerequisites:
- BizTalk Server 2002 must be installed (ensure that Message Queuing is installed).
- If you are logged on to the console of the BizTalk Server computer directly (best practice), proceed to the following section, "Install the IWay Adapter on the BizTalk Server." Otherwise, you must ensure that both the BizTalk Server Interchange Application and the XLANG Scheduler can be started successfully using the following procedure.
To ensure that BizTalk Server Interchange Application and XLANG Scheduler can be started successfully
- Connect to the computer running BizTalk Server by using Remote Desktop Connection.
- On the taskbar, click Start, point to All Programs, point to Administrative Tools, and then click Component Services.
- In the COM+ Applications folder, open the Properties page for BizTalk Server Interchange Application.
- Click the Advanced tab, and then clear the Disable changes check box.
- Click OK, and then click Yes in the message box that appears.
- Open the Properties page for BizTalk Server Interchange Application again.
- Click the Identity tab, and then select This user.
- Type credentials for a user who is a member of the local Administrators group.
- Click OK, and then click Yes in the message box that appears.
- Repeat steps 1 through 9 for XLANG Scheduler.
- To test that the two applications can be started successfully, right-click each application, and then click Start. Click COM+ Applications and see if the "+" on the icons of the two applications is rolling. If yes, the applications are running.
You can obtain the IWay Adapter from IWay Software (http://techsupport.iwaysoftware.com/iwayssw). In the Log On As dialog box that appears:
- For User Name enter iwayssw.
- For Password enter sswuser.
Select all of the default settings; however, on the Would you like to install Control Broker as a service? page, click No.
If you are logged on to the console of the target computer directly, then proceed to the following section, "Configure the IWay Adapter on the BizTalk Server." Otherwise, continue with the following steps.
Connect by using Remote Desktop Connection.
On the taskbar, click Start, point to All Programs, point to Administrative Tools, and then click Component Services.
In the COM+ Applications folder, open the Properties page for ACBInvokerHost Application.
Click the Advanced tab, and then clear the Disable changes check box.
Click OK, and then click Yes in the message box that appears.
Open the Properties page for ACBInvokerHost Application again.
Click the Identity tab, and then select This user.
Type credentials for a user who is a member of the local Administrators group.
Click OK, and then click Yes in the message box that appears.
The user who is configuring the IWay Adapter must have write access to the WebDav folders and the BizTalk Server repository (\\
server_name\Program Files\Microsoft BizTalk Server\BizTalkServerRepository
).
- Copy librfc32.dll (obtained from SAP or included in the SAP client GUI) to winnt\system32 folder, and then register it by using regsvr32.
- Open the IWay Control Broker Administrator, and on the View menu, click Profiles.
- In the Settings category, select SAP R/3, and then click Edit.
- Click the Default Login to R/3 tab, and then clear the Use Global Settings check box.
- Select the Enable login settings check box. Add a user name and password that are valid credentials on the SAP system.
- For Client, type 800.
- Click the****(...)****button, click Add, and then type SAP in the edit box that appears.
- In the Server Host box, type the name of the computer that runs the SAP system, and then set System Number to 00.
- Click Apply, and then click OK.
- Click the Reference Login to R/3 tab and repeat steps 4 through 9.
- Click OK. Click Done, and then restart the Administrator.
- On the File menu, click New Service, and then type SPSDemo as the name of the new service.
- Select the BizTalk check box.
- On the View menu, click Browser.
- Open the R/3 node, and then open RFC – RFC Function Modules. Wait until all modules are loaded.
- Open the All Applications node, and then do the following:
- Select Group7004, and then click Add to Service.
- Select GroupRH65, and then click Add to Service.
- Select GroupZMSFT, and then click Add to Service.
- Close the page.
- On the Service menu, do the following:
- Click Install Changes, and then click OK.
- Click Generate Bindings, and then click OK.
- Close the Administrator.
To get data from SAP, use BizTalk schedules for additional calculations, and then get the results in a form different from what the IWay Adapter returns
In the \\server_name
\Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo3\ directory
, locate the file RFC.GroupZMSFT.z_mssp_get_payroll_results.Reply.xml.Open this file using BizTalk Editor.
Open node Message/Body/RFC.GroupZMSFT.z_mssp_get_payroll_results.Reply/RFC.GroupZMSFT.z_mssp_get_payroll_results.subtotals_e.
Create a subnode (record) under this node named SUBTOTALS.
Specify the following properties for the SUBTOTALS node:
Type = Element
Model = Closed
Content = Element Only
Order = Sequence
Under the SUBTOTALS node, create the following new fields:
EARNINGS
PRETAX_DEDUCTIONS
TAXES
AFTERTAX_DEDUCTIONS
YTD_EARNINGS
YTD_PRETAX_DEDUCTIONS
YTD_TAXES
YTD_AFTERTAX_DEDUCTIONS
For each new field, select the value Element for the Type property.
Click in another section of the dialog box, and then click Yes in the confirmation message box.
Save your changes and close BizTalk Editor.
Before you can configure BizTalk, you must copy the Payroll Receipt sample application files from the \PayStub
directory to the computer on which BizTalk Server is installed. Then you can use the following procedure.
- On the taskbar, do the following:
- Click Start, click Run, type Regsvr32\PayStub\BizTalkComponents\PayStubDemo.dll, and then click OK.
- Click Start, click Run, type Regsvr32 \PayStub\BizTalkComponents\soc.dll, and then click OK.
- Click Start, click Run, type Regsvr32 \PayStub\BizTalkComponents\reqres.dll and then click OK.
- Copy \PayStub\BizTalkComponents\Biztalk_SyncOrchestration_1.asp and \PayStub\BizTalkComponents\Biztalk_SyncOrchestration_1_post.asp to
\Program Files\Microsoft BizTalk Server\MessagingManager\pipeline
. - Open BizTalk Messaging Manager (close any dialog box that appears by selecting Cancel).
- On the File menu, point to New, and then click Organization.
- Type SPSDemoOrg as the name of the organization, and then click OK.
- Click Messaging ports, and then click Search Now.
- Delete the SPSDemo port. This port was created by IWay.
- On the File menu, point to New, point to Messaging Port, and then click To an Organization.
- Type SPSDemoPort as the name of the port, and then click Next.
- Click Browse for Organization, and then select SPSDemoOrg.
- Click Browse for Primary Transport. In the transport, select Application Integration Component.
- Click Browse, select ACBInvokerAIC, and then click OK.
- Click OK again, click Next, and then click Next again.
- Clear the Create a channel check box, and then click Finish.
- On the File menu, point to New, point to Messaging Port, and then click To an Organization.
- Type SPSDemoPortOrc as the name of the port, and then click Next.
- Click Browse for Organization, and then select SPSDemoOrg.
- Click Browse for Primary Transport.
- In the transport, select Application Integration Component.
- Click Browse, select BizTalk SyncOrchestration, and then click OK.
- Click OK again, click Next, and then click Next again.
- Clear the Create a channel check box, and then click Finish.
- Right-click SPSDemoPort, point to New Channel, and then click From an Organization.
- Type GetPersonnelNumber as the name of the channel, and then click Next.
- Browse for SPSDemoOrg as the organization, and then click Next.
- Click Browse for Inbound Document Definition Name.
- Select SPSDemo2.bapi_employee_getdata.Request, and then click Next.
- Click Browse for Outbound Document Definition Name.
- Select SPSDemo2.bapi_employee_getdata.Request, click Next, and then click Next again.
- Click Advanced, and then click Properties.
- Type **bapi_employee_getdata@SPSDemo2**, click OK, and then click OK again.
- Click Finish.
- Right-click SPSDemoPort, point to New Channel, and then click From an Organization.
- Type GetPayStubsList as the name of the channel, and then click Next.
- Browse for SPSDemoOrg as the organization.
- Click Next.
- Click Browse for Inbound Document Definition Name.
- Select SPSDemo.bapi_get_payroll_result_list.Request, and then click Next.
- Click Browse for Outbound Document Definition Name.
- Select SPSDemo.bapi_get_payroll_result_list.Request, click Next, and then click Next again.
- Click Advanced, and then click Properties.
- Type **bapi_get_payroll_result_list@SPSDemo**, click OK, and then click OK again.
- Click Finish.
- Right-click SPSDemoPort, point to New Channel, and then click From an Organization.
- Type GetPaystubActional as the name of the channel, and then click Next.
- Browse for SPSDemoOrg as the organization, and then click Next.
- Click Browse for Inbound Document Definition Name.
- Select SPSDemo3.z_mssp_get_payroll_results.Request, and then click Next.
- Click Browse for Outbound Document Definition Name.
- Select SPSDemo3.z_mssp_get_payroll_results.Request, click Next, and then click Next again.
- Click Advanced, and then click Properties.
- Type **z_mssp_get_payroll_results@SPSDemo3**, click OK, and then click OK.
- Click Finish.
- Right-click SPSDemoPortOrc, point to New Channel, and then click From an Organization.
- Type GetPayStub as the name of the channel, and then click Next.
- Browse for SPSDemoOrg as the organization, and then click Next.
- Click Browse for Inbound Document Definition Name.
- Select SPSDemo3.z_mssp_get_payroll_results.Request, and then click Next.
- Click Browse for Outbound Document Definition Name.
- Select SPSDemo3.z_mssp_get_payroll_results.Request, click Next, and then click Next again.
- Click Advanced, and then click Properties.
- Type path_to_PayStub\PayStub\BizTalkComponents\getpaystub.skx in SkedPath. Replace path_to_PayStub with the parent folder for the PayStub folder.
- In SkedPort, type SyncPort.
- Click OK, and then click OK again.
- Click Finish, and then close BizTalk Messaging Manager.
Note You do not need to use the group names specified here; you can choose your own group names, and the groups can be the same. However, the names specified in this procedure are used throughout this documentation.
- Create three Windows NT groups:
- SSOAdmin
- SSOAffiliates
- PayStubUsers
- Create one Windows NT user account named SSOUser.
- Add SSOUser to the SSOAdmin group.
- Add the local administrator user to the SSOUser group. The user who is configuring the single sign-on service must be a member of the SSOAdmin group and must be a member of the local Administrators group on the computer running SharePoint Portal Server.
- Add the account you will be using to PayStubUsers.
- Log off and log back on to the computer running SharePoint Portal Server so that the security changes you made take effect.
- Enable the SSO Service by specifying the run-as user and restarting (for information about enabling single sign-on, see the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide).
Note You must be a member of both the local Administrators group as well as the SSOAdmin group for the following procedure to succeed.
- Go to
http://server_name:port_number/SSO/ManageSSO.aspx
, and then click Manage server settings for single sign-on and application definitions. - Specify the following:
- User name for single sign on: DOMAIN\SSOAdmin
- User name application definition server: DOMAIN\SSOAffiliates
- E-mail address
- Server name: the name of the computer running SQL Server
- Database name: specify the name of the single sign-on database
- Ticket time out: 10
- Purge audit log records older than: 10.
- Click OK.
- Go to http://server_name:port_number/SSO/ManageSSO.aspx, and then click Manage settings for application definitions.
- Click Add Item.
- Specify the following:
- Display name: R/3
- Application name: R/3
- Account type: Group
- Field 1: Display name: SAP account name
- Field 2: SAP password. Select Yes to mask this field.
- Click OK.
- Go to http://server_name:port_number/SSO/ManageSSO.aspx, and then click Manage account information for an application definition.
- Specify the following:
- Application definition: specify R/3.
- Group user name: DOMAIN\PayStubUsers.
- Click OK.
- Enter the SAP user name and password. This is the name and password that has access to the SAP server.
To add a new user profile property and specify the user name for each user who will access the sample
Note For details on adding new user profile properties, see the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide.
- Create a user profile property called PayStubSAPModel.
- Specify the length to be 255.
- Specify the default SAP user name as Brian Smith or enter the name on a specific user's profile page.
Note Ensure that the SharePoint Portal Server single sign-on service is configured before installing and configuring the Microsoft BizTalk Adapter for Web Services. For details, see the preceding steps, or the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide.
You can download the Microsoft BizTalk Adapter for Web Services from the Microsoft Download Center. (Other Biztalk Server downloads are available on the Microsoft Web site).
You will also need to download and install the latest single sign-on update package, located at the same location as the BizTalk Adaptor for Web Services download, after you install the adapter.
- Select all of the defaults except those on the Select Features page. On the Select Features page, choose to install the Single Sign-on Component.
- Click Next.
- Select the administrative account that was used to configure the single sign-on service on the computer running SharePoint Portal Server.
- Enable the single sign-on service by running under the single sign-on service run-as user, and then select Start and Automatic. (For an explanation of how to configure and restart the single sign-on service, see "Enabling Single Sign-On" in the Microsoft Office SharePoint Portal Server 2003 Administrator's Guide.
- Start Microsoft BizTalk Adapter for Web Services, and then click Web Services SSO Administration.
- Right-click Microsoft BizTalk Web Services Single Sign-On Configuration, and then click Edit Single Sign-On.
- If the error message "Failed to get the Single Sign-on SQL Server and database information" appears, click OK.
- In the SQL Server name box, type the name of the computer that runs the SQL single sign-on (SSO) database.
- In the Database name box, type the name of the single sign-on database on the computer running SQL Server.
- Click Apply, and then click OK in the confirmation dialog box.
- Click OK, and then close the management console.
- Restart the server.
- Create a directory called SPSService on the operating system drive.
- On the taskbar, click Start, point to Administrative Tools, and then click Internet Information Services (IIS).
- In the Internet Information Services management console, right-click Default Web Site, point to New, and then click Virtual Directory.
- Specify the name as SPSService.
- Select the SPSService directory that you created.
- Accept the default values on the remaining pages of the wizard.
- Start Microsoft BizTalk Adapter for Web Services, and then click Web Services Administration.
- Right-click BizTalk Adapter for Web Services, click Create a Web Service, and then click Next.
- Type SPSService as the name of the service.
- Type http://microsoft.com/spsdemo as the name of the namespace (this is case-sensitive).
- Click Browse for the virtual root and select SPSService.
- Complete the remainder of the wizard.
- Right-click SPSService, click Create a Web Method, and then click Next.
- In Name, type GetPersonnelNumber.
- Select the Must use SSO check box.
- Select channel GetPersonnelNumber, click Next, and then click Next again.
- Click Browse for Request target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo2\RFC.GroupRH65.bapi_employee_getdata.Request.xml.
- Click Browse for Response target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo2\RFC.GroupRH65.bapi_employee_getdata.Reply.xml.
- Complete the remainder of the wizard.
- Right-click SPSService, click Create a Web Method, and then click Next.
- In Name, type GetPayStubsList.
- Select the Must use SSO check box.
- Select channel GetPayStubsList, click Next, and then click Next again.
- Click Browse for Request target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo\RFC.Group7004.bapi_get_payroll_result_list.Request.xml.
- Click Browse for Response target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo\RFC.Group7004.bapi_get_payroll_result_list.Reply.xml.
- Complete the remainder of the wizard.
- Right-click SPSService, click Create a Web Method, and then click Next.
- In Name, type GetPayStub.
- Select the Must use SSO check box.
- Select channel GetPayStub, click Next, and then click Next again.
- Click Browse for Request target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo3\RFC.GroupZMSFT.z_mssp_get_payroll_results.Request.xml.
- Click Browse for Response target schema, and then select \Program Files\Microsoft BizTalk Server\BizTalkServerRepository\DocSpecs\Actional\SPSDemo3\RFC.GroupZMSFT.z_mssp_get_payroll_results.Reply.xml.
- Complete the remainder of the wizard.
The Web service can be accessed with http://server_name/spsservice/spsservice.asmx, where server_name is the name of the server where the Microsoft BizTalk Adapter for Web Services is installed.
You can use wsdl.exe to generate a proxy from the Web service and the methods that can be incorporated with the rest of the code and can be used to instantiate the Web service and call the Web methods.
Sample code that demonstrates how to call the service is provided in the source code for the Payroll Receipt sample application (located in the \Paystub\source
directory).
On the computer running SharePoint Portal Server, turn off anonymous authentication if it is on.
If you have not already done so, download and unzip the Payroll Receipt sample application files to the local hard disk of the computer running SharePoint Portal Server.
On the computer running SharePoint Portal Server, add the Payroll Receipt sample application assembly to the global assembly cache. You can use Gacutil /if Microsoft.SharePoint.Portal.PayStub.dll, or you can use the Control Panel utility called Microsoft .Net Framework Configuration Utility. You must do this on each SharePoint Portal Server Web front-end Web server that will be running the application.
Add entries to the web.config file for the paystub assemblies on each front-end Web server (and each virtual server if needed). Edit \inetpub\wwwroot\web.config on each front-end Web server, and add the following to the safe controls section:
<SafeControl Assembly="Microsoft.SharePoint.Portal.PayStub, Version=1.0.0.1, Culture=neutral, PublicKeyToken= 82628723360129c3 " Namespace= "Microsoft.SharePoint.Portal.PayStub" TypeName="*" Safe="True"/>
On the computer running SharePoint Portal Server, open a command prompt and type iisreset.
Add the Payroll Web Parts to the page by selecting Modify My Page/Add Web Parts/Import.
Click the Browse button and navigate to the
\Paystub
directory.Select the Microsoft.SharePoint.Portal.PayStub.PayStubSAPModelSummaryView.dwp file and click OK.
Click Import, and then drag the Web Part onto the Web Part Page.
Click Browse again and navigate to the
\Paystub
directory.Select the Microsoft.SharePoint.Portal.PayStub.PayStubSAPModelDetailedView.dwp file and click OK.
Click Import, and then drag the Web Part onto the Web Part Page.
At this point, the Payroll Receipt sample application should display sample payroll data from SAP (for Brian Smith).
Note Do not run the Data Cache and SAP application server versions of the Payroll Receipt sample application on the same Web Part Page. In addition, do not run two instances of the same application on the same Web Part Page.
You have now had a chance to try the Payroll Receipt sample application, developed for use with Microsoft® Office SharePoint™ Portal Server 2003. The sample application displayed a user's payroll data within Web Parts on a SharePoint Portal Server page. The application, provided in two versions, Data Cache and SAP, illustrated how you can use SharePoint Portal Server 2003 services such as single sign-on, user profiles, and Web Parts. The SAP version also illustrated how to query SAP through a BizTalk Server Web service interface and make calls to SAP Remote Function Calls (RFCs), and how to make use of single sign-on tickets with multiple servers.