Microsoft KB Archive/822874

= PRB: Partner Agreement Wizard Does Not Set the Envelope Information for Outbound Channels When You Use a Newly Imported PIP =

Article ID: 822874

Article Last Modified on 7/10/2003

-

APPLIES TO


 * Microsoft BizTalk Accelerator for RosettaNet 2.0 Enterprise Edition

-



SYMPTOMS
You can import a new partner interface process (PIP), and then you can create an agreement that includes this PIP by using the Partner Agreement Wizard. However, the element name and the generated document type definition (DTD) name envelope properties of the resulting outbound channel or channels are not set correctly. When an outbound message is sent through one of these channels, the envelope does not contain the correct reference to the RosettaNet DTD for the process that is running.

The following sample code is an example of a RosettaNet XML document that does not have this reference. (This example was derived from a sample document. The sample document was generated from a channel that was created after the user imported a 6C1 PIP.)  <!DOCTYPE PiP6C1ServiceEntitlementStatusResponse SYSTEM&quot;&quot;>  The following sample code is an example of a RosettaNet XML document that has the correct reference:  <!DOCTYPE PiP6C1ServiceEntitlementStatusResponse SYSTEM &quot;6C1_MS_D01_00_ServiceEntitlementResponse.dtd&quot;>  Because the syntax of the resulting document is correct, the BizTalk RosettaNet parser validates the document without error. However, the trading partner rejects the document because the reference to the DTD is missing.



CAUSE
This problem occurs because the Partner Agreement Wizard cannot populate the DTD value for a PIP definition. Without this information, the Accelerator for RosettaNet cannot determine the correct values for the envelope properties. Therefore, the Partner Agreement Wizard does not set the envelope properties for the outbound channel.



RESOLUTION
To resolve this problem, do one of the following:  Change the PIP definition that is stored in the BTSKInstances database to include the correct DTD information, and then run the Partner Agreement Wizard again to create the channels that have the correct element name and DTD name envelope properties. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

823198 HOW TO: Import a Custom PIP to the BizTalk Server Accelerator for RosettaNet BTSKInstances Table

-or- Change the existing outbound channels. Add the correct element name and the correct generated DTD name to the envelope that is used for the outbound channels that are created for each trading partner. You can add this information manually or programmatically.

Note When you change the existing channels, the PIP template that is stored in the BTSKInstances database is not automatically updated. Therefore, you must also change any channels that are created later (that use the existing PIP) until the PIP template is updated. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

823198 HOW TO: Import a Custom PIP to the BizTalk Server Accelerator for RosettaNet BTSKInstances Table

329082 How to Change or Reset the PIP Templates in the BTSKInstances Database



Change the Outbound Channels Manually
To manually change the envelope properties for the outbound channels, identify the outbound channels that submit documents to the trading partners. Typically, there are three outbound channels for each trading partner relationship: signed out, unsigned out, and failure out. Change each of these channels as follows:
 * 1) In BizTalk Messaging Manager, right-click the channel, and then click Edit to start the Channel Properties Wizard. Click Next in each dialog box that appears in the Channel Properties Wizard until the Advanced Configuration dialog box appears.
 * 2) In the Advanced Configuration dialog box, click Advanced to open the Override Messaging Port Defaults dialog box.
 * 3) In the Override Messaging Port Defaults dialog box, click the Envelope tab, and then click Properties.
 * 4) Type the following values in the   and   text boxes.

Note  and   are placeholders. The actual names of these text boxes are the corresponding values for the PIP that you are using.
 * : PIP6C1ServiceEntitlementStatusResponse
 * : 6C1_MS_D01_00_ServiceEntitlementResponse.dtd

Change the Outbound Channels Programmatically
To programmatically change the channel envelope properties, identify the channels that submit documents to the trading partners. Typically, there are three outbound channels for each trading partner relationship: signed out, unsigned out, and failure out. Change each of these channels as follows:   In a text editor such as Notepad, paste the following sample code, and then save the file by using a .vbs file name extension.

Note Before you run this script, make sure that you substitute the correct BizTalk Messaging port name for the LoadPort function. Also, make sure that you substitute the correct channel names for the call to the ConfigureChannel function. You must run the ConfigureChannel function one time for each channel that you want to add the appropriate envelope information for. ''' 'This file will automatically generate objects for BizTalk '''  <job id=&quot;SetupBTM&quot;> <?job debug=&quot;1&quot; error=&quot;1&quot;?> <reference object=&quot;BizTalk.BizTalkConfig&quot; version=&quot;1.0&quot;/> <script language=&quot;VBScript&quot;>

Dim MessagePortHandle

'Get handle to standard message port MessagePortHandle = LoadPort(&quot;org2 unsigned out&quot;)

'config channel ConfigureChannel &quot;org1 to org2 unsigned&quot;, MessagePortHandle

MsgBox &quot;Complete&quot; ' ' CREATEPORT ' Function LoadPort(strPortName) Dim BTConfig Dim Port Dim PortHandle Set BTConfig = CreateObject(&quot;BizTalk.BizTalkConfig&quot;) Set Port = BTConfig.CreatePort 'try and load the port 'On Error Resume Next Port.LoadByName strPortName LoadPort = Port.Handle

Set Port = Nothing Set BTConfig = Nothing End Function

' ' CREATECHANNEL ' Sub ConfigureChannel(strChannelName, lngPortHandle ) Dim BTConfig Dim Channel Dim objDictMapping, ObjDictconfig

Set BTConfig = CreateObject(&quot;BizTalk.BizTalkConfig&quot;) Set Channel = BTConfig.CreateChannel

'try to load the channel Channel.LoadByName strChannelName

Set objDictMapping = CreateObject(&quot;Commerce.Dictionary&quot;) Set ObjDictconfig = CreateObject(&quot;Commerce.Dictionary&quot;) objDictMapping.Value(&quot;PiP6C1ServiceEntitlementStatusResponse&quot;) = &quot;6C1_MS_D01_00_ServiceEntitlementResponse.dtd&quot; Set ObjDictconfig.Value(&quot;dtd_mapping&quot;) = objDictMapping

Channel.SetConfigData 5, lngPortHandle, ObjDictconfig Channel.Save Set objDictMapping = Nothing Set objDictConfig = Nothing Set BTConfig = Nothing Set Channel = Nothing End Sub </Package> </li> Double-click this .vbs file to run it.</li></ol>

<div class="status_section">

STATUS
This behavior is by design.

Keywords: kbprb KB822874

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.