While testing a new service I was creating on my BizTalk development machine, I wanted to test the service using the WCF Test Client.
However, when I brought up the tool, I was shown all of the adapters that are created for the WCF LOB adapters: SAP/SQL/ and the two Oracle adapters.
You can comment out the adapters so you don’t see the red x’s in the the tool

InstalledAdapters

By going into the machine.config in the (for me) C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config folder and commenting the endpoint from the client section

<client>
      <endpoint binding="sqlBinding" contract="IMetadataExchange" name="mssql"/>
      <metadata>...
      </metadata>
</client>

to

<client>
      <!--<endpoint binding="sqlBinding" contract="IMetadataExchange" name="mssql"/>-->
      <metadata>...
      </metadata>
</client>

I don’t see the the red x, however, if you don’t have the required assemblies (Oracle, SAP, etc) the tool will close automatically without giving you any results.

Lesson learned: only install the adapters that you will be connecting to, otherwise, the WCF Test Client Tool will close miserably.

 

While installing the sample tutorials of the ESB toolkit, I came across this error:

ExceptionHanlding_Install.ps1 cannot be loaded because the execution of scripts is disabled on this system…

So I, of course, set the execution policy to unrestricted (like everyone does anyway)

but still not love!!!!

The real issue is that it states that it is running under x86 Powershell (which is not the default PowerShell on a x64 system)

To fix this, you need to run the following command:

%windir%\SysWOW64\WindowsPowerShell\v1.0\powershell.exe “Set-ExecutionPolicy Unrestricted”

 

According to http://msdn.microsoft.com/en-us/library/bb552364.aspx

You can find the WCF Test Client (WcfTestClient.exe) in the following location: C:Program FilesMicrosoft Visual Studio 9.0Common7IDE

If you have Visual Studio 2010 installed on a 64bit OS, viagra 60mg it is found here:

C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEWcfTestClient.exe

 

There are two binding files included in the ESB toolkit 2.1 that are made available if you want to make changes to the bindings.

WARNING: DON”T MODIFY THE BINDING FILES WITH AN INTELLIGENT XML MODIFICATION TOOL (like Visual Studio)

You will make the modifications, import the binding file, and it will import it correctly, and when you go to start the Microsoft.Practices.ESB, you will get this error:

Exception 0xC00CE557

The issue is that it changes the filter from:

<Filter>&lt;?xml version="1.0" encoding="utf-16"?&gt;
	&lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;Group&gt;
	&lt;Statement Property="ErrorReport.FailureCode" Operator="6" /&gt;
	&lt;/Group&gt;
	&lt;Group&gt;
	&lt;Statement Property="Microsoft.Practices.ESB.ExceptionHandling.Schemas.Property.FaultCode" Operator="6" /&gt;
	&lt;/Group&gt;
	&lt;/Filter&gt;</Filter>

to

<Filter>
        &lt;?xml version="1.0" encoding="utf-16"?&gt;
	&lt;Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
	&lt;Group&gt;
	&lt;Statement Property="ErrorReport.FailureCode" Operator="6" /&gt;
	&lt;/Group&gt;
	&lt;Group&gt;
	&lt;Statement Property="Microsoft.Practices.ESB.ExceptionHandling.Schemas.Property.FaultCode" Operator="6" /&gt;
	&lt;/Group&gt;
	&lt;/Filter&gt;
</Filter>

Lesson to learn: the filter settings within the binding file need to be correctly formatted xml (spaces before the first open carrot is illegal)

 

If you look at the arguments of the setup.exe to do an install of BizTalk you can install everything by using the following switch: /ADDLOCAL ALL. However, you will notice that you can supply an xml to tell the setup what components to install:

image

But where is a sample configuration file? (I could not find it anywhere on MSDN)

You could use the following xml file to install all components, which is the tail of the configuration file that is created after the setup.exe completes.

<Configuration>
  <InstalledFeature>MsEDIAS2</InstalledFeature>
  <InstalledFeature>MsEDIAS2StatusReporting</InstalledFeature>
  <InstalledFeature>WCFAdapter</InstalledFeature>
  <InstalledFeature>InfoWorkerApps</InstalledFeature>
  <InstalledFeature>BAMPortal</InstalledFeature>
  <InstalledFeature>WcfAdapterAdminTools</InstalledFeature>
  <InstalledFeature>PAM</InstalledFeature>
  <InstalledFeature>Development</InstalledFeature>
  <InstalledFeature>MsEDISchemaExtension</InstalledFeature>
  <InstalledFeature>MsEDISDK</InstalledFeature>
  <InstalledFeature>MsEDIMigration</InstalledFeature>
  <InstalledFeature>Documentation</InstalledFeature>
  <InstalledFeature>SDK</InstalledFeature>
  <InstalledFeature>WMI</InstalledFeature>
  <InstalledFeature>BizTalk</InstalledFeature>
  <InstalledFeature>MOT</InstalledFeature>
  <InstalledFeature>Engine</InstalledFeature>
  <InstalledFeature>MSMQ</InstalledFeature>
  <InstalledFeature>Runtime</InstalledFeature>
  <InstalledFeature>RfidEventForwarderMessageTransform</InstalledFeature>
  <InstalledFeature>AdminAndMonitoring</InstalledFeature>
  <InstalledFeature>MonitoringAndTracking</InstalledFeature>
  <InstalledFeature>AdminTools</InstalledFeature>
  <InstalledFeature>BizTalkAdminSnapIn</InstalledFeature>
  <InstalledFeature>HealthActivityClient</InstalledFeature>
  <InstalledFeature>BAMTools</InstalledFeature>
  <InstalledFeature>Migration</InstalledFeature>
  <InstalledFeature>BizTalkExplorer</InstalledFeature>
  <InstalledFeature>BizTalkExtensions</InstalledFeature>
  <InstalledFeature>OrchestrationDesigner</InstalledFeature>
  <InstalledFeature>Designer</InstalledFeature>
  <InstalledFeature>PipelineDesigner</InstalledFeature>
  <InstalledFeature>XMLTools</InstalledFeature>
  <InstalledFeature>AdapterImportWizard</InstalledFeature>
  <InstalledFeature>VSTools</InstalledFeature>
  <InstalledFeature>WCFDevTools</InstalledFeature>
  <InstalledFeature>DeploymentWizard</InstalledFeature>
  <InstalledFeature>TrackingProfileEditor</InstalledFeature>
  <InstalledFeature>SSOAdmin</InstalledFeature>
  <InstalledFeature>AdditionalApps</InstalledFeature>
  <InstalledFeature>SSOServer</InstalledFeature>
  <InstalledFeature>RulesEngine</InstalledFeature>
  <InstalledFeature>OLAPNS</InstalledFeature>
  <InstalledFeature>FBAMCLIENT</InstalledFeature>
  <InstalledFeature>BAMEVENTAPI</InstalledFeature>
  <InstalledFeature>ProjectBuildComponent</InstalledFeature>
</Configuration>

And your batch script could look like this (notice you can’t use /quiet or /passive, but it can still be hands free):

"\\BizTalk Server 2010 Enterprise\BizTalk Server\setup.exe" /s "\\BizTalk Server 2010 Enterprise\BizTalk Server\CompleteSetup.xml"  /l c:\biztalksetupSSO.log /CompanyName Company /Username Developer /cabpath "\\BizTalk Server 2010 Enterprise\BizTalk Server\Bts2010Win2K8R2EN64.cab"

Option 2:

If you look deep in the log files you can see that on a full install has the following options:

MSI (s) (B8:0C) [01:30:32:802]: Command Line: ADDLOCAL=MsEDIAS2,MsEDIAS2StatusReporting,WCFAdapter,InfoWorkerApps,BAMPortal,WcfAdapterAdminTools,PAM,Development,MsEDISchemaExtension,MsEDISDK,MsEDIMigration,Documentation,SDK,WMI,BizTalk,MOT,Engine,MSMQ,Runtime,RfidEventForwarderMessageTransform,AdminAndMonitoring,MonitoringAndTracking,AdminTools,BizTalkAdminSnapIn,HealthActivityClient,BAMTools,Migration,BizTalkExplorer,BizTalkExtensions,OrchestrationDesigner,Designer,PipelineDesigner,XMLTools,AdapterImportWizard,VSTools,WCFDevTools,DeploymentWizard,TrackingProfileEditor,SSOAdmin,AdditionalApps,SSOServer,RulesEngine,OLAPNS,FBAMCLIENT,BAMEVENTAPI,ProjectBuildComponent COMPANYNAME=Company USERNAME=Developer FILESINUSEERROR= CEIP=0 CURRENTDIRECTORY=C:\Users\estott\AppData\Local\Temp\EBZ30319.tmp CLIENTUILEVEL=3 MSICLIENTUSESEXTERNALUI=1 CLIENTPROCESSID=5024 

I would like to tell you that I have figured out all of the combinations of what you want to install, but Trace Young beat me to it.

 

At a recent client I was at, case we were installing BizTalk 2010, sildenafil but the servers did not have access to the internet. None of the development machines were the same build as the servers that were locked down behind the firewall.

This made getting the CAB file for that server type a little challenging.

Here is a list of the version and the links to download the cab files directly

OS

Link

Vista http://go.microsoft.com/fwlink/?LinkID=189405
Win2k8 http://go.microsoft.com/fwlink/?LinkID=189408
Win2k8R2 http://go.microsoft.com/fwlink/?LinkID=189409
Win7 http://go.microsoft.com/fwlink/?LinkID=189404
FutureNT http://go.microsoft.com/fwlink/?LinkId=189409

 

Does anyone know what FutureNT means? By the link provided, it appears to be the same as the latest version of Windows.

 

I wanted a script that post a new BizTalk build, I could run and it could create new hosts, host instances, create new receive and send handlers and finally start the host instances

'Create the new host
CreateHost "App2Host", InProcess, "CORP\BTSAppUsers-Dev", False, False, False, False

'Make the new host the default host
UpdateHost "App2Host",True,True

'Turn the tracking off of the initially installed host
UpdateHost "App1Host",False,False

'Create the host instance
FinalizeInstallHostInstance "App2Host","CORP\svcBTSHost-Dev","P4ssw0rd!"

ReConfigureReceiveHandler "App1Host","WCF-SQL"
CreateReceiveHandler "App2Host","WCF-SQL"
CreateSendHandler "App2Host","WCF-SQL"

'Start all of the host instances that are not currently running
StartAllInProcessHostInstance

Sub CreateHost (HostName, HostType, NTGroupName, AuthTrusted, Isdefault, IsHost32BitOnly, HostTracking )
   On Error Resume Next

   Dim objLocator, objService, objHostSetting, objHS

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_HostSetting
   Set objHostSetting = objService.Get ("MSBTS_HostSetting")

   Set objHS = objHostSetting.SpawnInstance_

   objHS.Name = HostName
   objHS.HostType = HostType
   objHS.NTGroupName = NTGroupName
   objHS.AuthTrusted = AuthTrusted
   objHS.Isdefault = IsDefault
   objHS.IsHost32BitOnly = IsHost32BitOnly
   objHS.HostTracking = HostTracking

   ' Create instance
   objHS.Put_(CreateOnly)

   CheckWMIError
   wscript.echo "Host - " & HostName & " - has been created successfully"

end Sub

Sub UpdateHost (HostName, HostTracking, IsDefault)
   On Error Resume Next

   Dim objLocator, objService, objHS

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Look for WMI Class MSBTS_HostSetting with name equals HostName value
   Set objHS = objService.Get("MSBTS_HostSetting.Name='" & HostName & "'")

   objHS.HostTracking = HostTracking
   objHS.IsDefault = IsDefault

   ' Update instance properties
   objHS.Put_(UpdateOnly)

   ' Check for error condition before continuing.
   CheckWMIError
   wscript.echo "Host - " & HostName & " - has been updated successfully"

end Sub
Sub FinalizeInstallHostInstance (HostName, uid, pwd)
 On Error Resume Next
 Dim ServerName, objSysInfo
 Set objSysInfo = CreateObject( "WinNTSystemInfo" )
 ServerName = objSysInfo.ComputerName
 CheckWMIError
 MapInstallHostInstance HostName,ServerName,uid,pwd
end Sub

Sub MapInstallHostInstance (HostName, ServerName, uid, pwd)
'Sub MapInstallHostInstance (HostName, uid, pwd)
   On Error Resume Next

   Dim objLocator, objService, objServerHost, objSH
   Dim objHostInstance, objHI
   'Dim ServerName, wshShell

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")
   Set objServerHost = objService.Get ("MSBTS_ServerHost")

   Set objSH = objServerHost.SpawnInstance_

   objSH.HostName = HostName
   objSH.ServerName = ServerName

   ' Invoke MSBTS_ServerHost Map method
   objSH.Map

   CheckWMIError
   wscript.echo "Host - " & HostName & " - has been mapped successfully to server - " & ServerName

   Set objHostInstance = objService.Get ("MSBTS_HostInstance")

   Set objHI = objHostInstance.SpawnInstance_

   objHI.Name = "Microsoft BizTalk Server " & HostName & " " & ServerName

   ' Invoke MSBTS_HostInstance Install method
   objHI.Install uid, pwd, true   ' Calling MSBTS_HostInstance::Install(string Logon, string Password, boolean GrantLogOnAsService) method

   CheckWMIError
   wscript.echo "HostInstance - " & HostName & " - has been installed successfully on server - " & ServerName

end Sub
Sub ReConfigureReceiveHandler(HostName,AdapterName)
	'error handling is done by explicity checking the err object rather than using
	'the VB ON ERROR construct, so set to resume next on error.
	On Error Resume Next

	'Get the command line arguments entered for the script
	Dim objArgs: Set objArgs = WScript.Arguments

	'Make sure the expected number of arguments were provided on the command line.
	'if not, print usage text and exit.

	Dim objInstSet, objInst, strQuery

	'set up a WMI query to acquire a list of send handlers with the given Name key value.
	'This should be a list of zero or one send handlers.
	strQuery = "SELECT * FROM MSBTS_ReceiveHandler WHERE AdapterName =""" & AdapterName & """"
	Set objInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(strQuery)

	'If send handler found, set configuration information, otherwise print error and end.
	If objInstSet.Count > 0 then
		For Each objInst in objInstSet
			objInst.HostNameToSwitchTo=HostName


			'Commit the change to the database
			objInst.Put_(UpdateOnly)
			If Err <> 0	Then
				PrintWMIErrorThenExit Err.Description, Err.Number
			End If
			WScript.Echo "The "& AdapterName &" Receive Handler was successfully configured."
		Next
	Else
		WScript.Echo "No Receive Handler was found matching that AdapterName."
	End If
End Sub
' Sample to show MSBTS_ReceiveHandler instance creation with CustomCfg property
Sub CreateReceiveHandler (HostName, AdapterName)
   On Error Resume Next

   Dim objLocator, objService, objReceiveHandler, objRH, objSendHandler, objSH

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_ReceiveHandler
   Set objReceiveHandler = objService.Get ("MSBTS_ReceiveHandler")

   Set objRH = objReceiveHandler.SpawnInstance_

   objRH.AdapterName = AdapterName
   objRH.HostName = HostName

   ' Create instance
   objRH.Put_(CreateOnly)

   CheckWMIError
   wscript.echo "Receive Handler - " & AdapterName & " " & HostName & " - has been created successfully"

end Sub
Sub CreateSendHandler (HostName, AdapterName)
   On Error Resume Next

   Dim objLocator, objService, objSendHandler, objSH

   ' Connects to local server WMI Provider BizTalk namespace
   Set objLocator = Createobject ("wbemScripting.SWbemLocator")
   Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")

   ' Get WMI class MSBTS_ReceiveHandler
   'Insert the Send Handler make sure you use SendHandler2 as SendHandler is a throwback to BTS 2004 which does not allow updates
   Set objSendHandler = objService.Get ("MSBTS_SendHandler2")

   Set objSH = objSendHandler.SpawnInstance_

   objSH.AdapterName = AdapterName
   objSH.HostName = HostName

   ' Create instance
   objSH.Put_(CreateOnly)

   CheckWMIError
   wscript.echo "Send Handler - " & AdapterName & " " & HostName & " - has been created successfully"

end Sub
Sub StartAllInProcessHostInstance ()
   On Error Resume Next

   Dim Query, HostInstSet, Inst

   ' Enumerate all InProcess type Host Instance
   Query = "SELECT * FROM MSBTS_HostInstance WHERE HostType =1"
   Set HostInstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(Query)

   For Each Inst in HostInstSet

      ' If host instance is stopped, then it'll start it
      If( HostInstServiceState_Stopped = Inst.ServiceState ) Then
         wscript.echo "Starting host instance..."
             Inst.Start   ' Calling MSBTS_HostInstance::Start() method
         CheckWMIError
         wscript.echo "HostInstance - " & Inst.HostName & " - has been started successfully on server - " & Inst.RunningServer
      End If
   Next

end Sub


'This subroutine deals with all errors using the WbemScripting object.  Error descriptions
'are returned to the user by printing to the console.
Sub   CheckWMIError()

   If Err <> 0   Then
      On Error Resume   Next

      Dim strErrDesc: strErrDesc = Err.Description
      Dim ErrNum: ErrNum = Err.Number
      Dim WMIError : Set WMIError = CreateObject("WbemScripting.SwbemLastError")

      If ( TypeName(WMIError) = "Empty" ) Then
         wscript.echo strErrDesc & " (HRESULT: "   & Hex(ErrNum) & ")."
      Else
         wscript.echo WMIError.Description & "(HRESULT: " & Hex(ErrNum) & ")."
         Set WMIError = nothing
      End   If

      wscript.quit 0
   End If

End Sub


 

Here is the components that need to be enabled for UDDI to run properly

Task 3: Install Internet Information Services When installing IIS on Windows Server 2008 R2, you must enable following IIS features:
  • ASP.NET
  • Basic Authentication
  • Windows Authentication
  • IIS 6 Metabase Compatibility

You simply create a batch file with the following command:

start /w pkgmgr /iu:IIS-ASPNET;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-IIS6ManagementCompatibility;IIS-Metabase
 

If you are going to install the WFC adapters for SQL, SAP, and Oracle, there is not a way that the install can be complete during a silent install.

The adapters don’t show up in the management console without having to manually add them.

Until now…

All you need to do is run this AddAdapter.vbs (BizTalk 2010)

AddAdapter "WCF-SQL", "WCF-SQL adapter", "{59b35d03-6a06-4734-a249-ef561254ecf7}"
AddAdapter "WCF-SAP", "WCF-SAP adapter", "{a5f15999-8879-472d-8c62-3b5ea9406504}"
AddAdapter "WCF-OracleDB", "WCF-OracleDB adapter", "{d7127586-e851-412e-8a8a-2428aeddc219}"
AddAdapter "WCF-OracleEBS", "WCF-OracleEBS adapter", "{f452bb15-7a0d-495d-9395-c630d3fd29cd}"

Sub AddAdapter(strAdapterName, strAdapterComment, strAdapterMgmtCLSID)
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Set objService = objLocator.ConnectServer(".", "root/MicrosoftBizTalkServer")
Set objAdapterClass = objService.Get("MSBTS_AdapterSetting")

On Error Resume Next
Set objAdapterInstance = objService.Get("MSBTS_AdapterSetting.Name='" & strAdapterName & "'")
If (objAdapterInstance is Nothing) Then
On Error Goto 0
Set objAdapterInstance = objAdapterClass.SpawnInstance_
Else
On Error Goto 0
End If

objAdapterInstance.Name = strAdapterName
objAdapterInstance.Comment = strAdapterComment
objAdapterInstance.MgmtCLSID = strAdapterMgmtCLSID

On Error Resume Next
objAdapterInstance.Put_(0)
If (Err.Number <> 0) Then
Else
End If
End Sub

So this is what the batch file looks like:

"\\BizTalk Server 2010 Enterprise\WCF-LOB-Adapter-SDK-2010-x86\AdapterFramework.msi" /quiet MUOPTIN="Yes"
"\\BizTalk Server 2010 Enterprise\WCF-LOB-Adapter-SDK-2010-x64\AdapterFramework64.msi" /quiet MUOPTIN="Yes"
msiexec /i "\\BizTalk Server 2010 Enterprise\BizTalk Server\AdapterPack_x86\AdaptersSetup.msi" /qn ADDLOCAL=ALL
msiexec /i "\\BizTalk Server 2010 Enterprise\BizTalk Server\AdapterPack_x64\AdaptersSetup64.msi" /qn ADDLOCAL=ALL
cscript.exe "\\BizTalk Server 2010 Enterprise\BizTalk Server\AddAdapter.vbs"

And you get something that looks like this:

image

 

Error: 1 (Field level error)
SegmentID: CLM
Position in TS: 22
Data Element ID: CLM02__TotalClaimChargeAmount
Position in Segment: 2
Data Value: 8888.99
6: Invalid character in data element

This can be resolved by changing the party definition to allow leading and trailing spaces and zeros.

image

and

image

© 2016 BizTalk Blog Suffusion theme by Sayontan Sinha