使用 Office 365 Outlook 联系人适配器创建联系人-BizTalk ServerCreate a contact using the Office 365 Outlook Contact adapter - BizTalk Server

使用 BizTalk Server 中的 Office 365 Outlook 联系人适配器在 Office 365 Outlook 中创建联系人。Use the Office 365 Outlook Contact adapter in BizTalk Server to create contacts in your Office 365 Outlook.

使用发送端口创建联系人Create a contact using a send port

  1. 在 BizTalk Server 管理控制台中,右键单击 "发送端口",选择 "新建",然后选择 "静态单向发送端口"。In the BizTalk Server Administration console, right-click Send Ports, select New, and select Static One-way send port.

    创建发送端口提供了一些指导。Create a Send Port provides some guidance.

  2. 输入“名称”。Enter a Name. 在 "传输" 中,将 "类型" 设置为 " Office 365 Outlook 联系人",然后选择 "配置"。In Transport, set the Type to Office 365 Outlook Contact, and select Configure.

  3. 选择 "登录",然后登录到 Office 365 帐户。Select Sign in …, and sign in to your Office 365 Account. 帐户会自动填充你的电子邮件地址。The account is auto-populated with your email address.

  4. 允许 BizTalk Server 审批访问权限:Allow BizTalk Server approval for permission to access:

    Office 365 联系人权限

  5. 选择 "确定" 保存更改。Select Ok to save your changes.

测试发送端口Test the send port

你可以使用一个简单的文件接收端口和位置在 Office 365 Outlook 联系人适配器上创建一个事件。You can use a simple File receive port and location to create an event on your Office 365 Outlook Contact adapter.

  1. 使用文件适配器创建接收端口。Create a receive port using the File adapter. 在接收位置中,将 "接收文件夹" 设置为 "在\中\Temp"\ ,并将文件掩码设置为 *.xmlWithin your receive location, set the Receive folder to C:\Temp\In\, and set the file mask to *.xml.

  2. 在 Office 365 Outlook 联系人适配器的 "发送端口属性" 中,将筛选器设置为 BTS.ReceivePortName == <Receive Port Name>In your Office 365 Outlook Contact adapter send port properties, set the Filters to BTS.ReceivePortName == <Receive Port Name>.

  3. 将以下内容粘贴到文本编辑器中,并将该文件另存为Office365ContactPaste the following into a text editor, and save the file as Office365Contact.xml. 这是你的示例消息。This is your sample message.

        <ns0:Contact xmlns:ns0="http://schemas.microsoft.com/BizTalk/Office365OutlookContacts/Send">
            <categories>categories_0</categories>
            <categories>categories_1</categories>
            <categories>categories_2</categories>
            <birthday>1999-05-31T13:20:00.000-05:00</birthday>
            <fileAs>fileAs_0</fileAs>
            <displayName>displayName_0</displayName>
            <givenName>givenName_0</givenName>
            <initials>initials_0</initials>
            <middleName>middleName_0</middleName>
            <nickName>nickName_0</nickName>
            <surname>surname_0</surname>
            <title>title_0</title>
            <yomiGivenName>yomiGivenName_0</yomiGivenName>
            <yomiSurname>yomiSurname_0</yomiSurname>
            <yomiCompanyName>yomiCompanyName_0</yomiCompanyName>
            <generation>generation_0</generation>
            <jobTitle>jobTitle_0</jobTitle>
            <companyName>companyName_0</companyName>
            <department>department_0</department>
            <officeLocation>officeLocation_0</officeLocation>
            <profession>profession_0</profession>
            <businessHomePage>businessHomePage_0</businessHomePage>
            <assistantName>assistantName_0</assistantName>
            <manager>manager_0</manager>
            <homePhones>homePhones_0</homePhones>
            <homePhones>homePhones_1</homePhones>
            <mobilePhone>mobilePhone_0</mobilePhone>
            <businessPhones>businessPhones_0</businessPhones>
            <businessPhones>businessPhones_1</businessPhones>
            <spouseName>spouseName_0</spouseName>
            <personalNotes>personalNotes_0</personalNotes>
            <children>children_0</children>
            <children>children_1</children>
            <children>children_2</children>
            <emailAddresses>
                <name>name_0</name>
                <address>address_0</address>
            </emailAddresses>
            <emailAddresses>
                <name>name_0</name>
                <address>address_0</address>
            </emailAddresses>
            <homeAddress>
                <city>city_0</city>
                <countryOrRegion>countryOrRegion_0</countryOrRegion>
                <postalCode>10000</postalCode>
                <state>state_0</state>
                <street>street_0</street>
            </homeAddress>
            <businessAddress>
                <city>city_0</city>
                <countryOrRegion>countryOrRegion_0</countryOrRegion>
                <postalCode>11111</postalCode>
                <state>state_0</state>
                <street>street_0</street>
            </businessAddress>
            <otherAddress>
                <city>city_0</city>
                <countryOrRegion>countryOrRegion_0</countryOrRegion>
                <postalCode>21222</postalCode>
                <state>state_0</state>
                <street>street_0</street>
            </otherAddress>
        </ns0:Contact>
    

    XML 架构作为 SDK 的一部分提供\SDK\架构 < BizTalk 安装文件夹 >The XML schema is provided as part of the SDK inside < BizTalk Installation Folder\SDK\Schemas >

  4. 启动 File 接收位置和 Office 365 Outlook 联系人适配器发送端口。Start the File receive location and the Office 365 Outlook Contact adapter send port.

  5. Office365Contact示例消息复制到 Receive 文件夹中(C:\Temp\在\中)。Copy Office365Contact.xml sample message into the receive folder (C:\Temp\In\). 发送端口基于 xml 在 Office 365 Outlook 帐户中创建联系人。The send port creates a contact in your Office 365 Outlook account based on the xml.

后续步骤Next steps

查看所有Office 365 适配器See all the Office 365 adapters.