Quantcast
Channel:
Viewing all 215 articles
Browse latest View live

Storing BizTalk Orchestration Config and Parameters in SSO

$
0
0

I have pretty much standardized on SSO as a resource for getting parameters and values for Orchestrations.  I started doing this with the BizTalk Deployment Framework (BTDF).

Recently, I was at a client who chose not to use BTDF, but we still needed a way to store and retrieve values from SSO.

So here’s what we did.

  1. The first thing you probably want, is a free tool to update SSO.   Microsoft now provides this, as an MMC (Microsoft Management Console) Snap-in.Once installed, you have to remember the directory it’s stored in:
    SSO_MMC_Tool_Location

When you click on the “mmc” (the .msc file), it loads a snap-in in MMC, allowing you to maintain your SSO applications and variables.

2. Use the tool to add applications, and to add/modify key/value pairs in the app.

           SSO_Application_Configuration_MMC_Tool

 

Below shows the pop-up menu when you right-clik on an application.

 

            SSO-App-Right-Click-Menu

When you choose “Add Key Value Pair” you can enter the values as shown below:

                    SSO_App_Configuration_Key_Value_Properties

Years ago, Richard Seroter laid the groundwork, and created an SSO C# Windows-Form utility that essentially does the same.

The code he provided still works with the MMC snap-in above.

3.  Access your variables (key/value pairs at run-time).

a) Create a C# helper utility to share across your applications

    // had to remove "Static" from class below to get it to appear in BizTalk Map 
    public class SSOConfigHelper
    {
        private static string idenifierGUID = "ConfigProperties";

        ///

        /// Read method helps get configuration data
        ///

///The name of the affiliate application to represent the configuration container to access ///The property name to read /// /// The value of the property stored in the given affiliate application of this component. /// public static string Read(string appName, string propName) { try { SSOConfigStore ssoStore = new SSOConfigStore(); ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag(); ((ISSOConfigStore) ssoStore).GetConfigInfo(appName, idenifierGUID, SSOFlag.SSO_FLAG_RUNTIME, (IPropertyBag) appMgmtBag); object propertyValue = null; appMgmtBag.Read(propName, out propertyValue, 0); return (string)propertyValue; } catch (Exception e) { System.Diagnostics.Trace.WriteLine(e.Message); throw; } } }

b) Call that C# helper from your orchestrations

In the example below, strSSOAppName and strYNTraceOnFromSSO are first defined as orchestration variables (of type “string”):

strSSOAppName = "Demo";

strYNTraceOnFromSSO = MyLib.Common.BizTalk.Components.SSOConfigHelper.Read
                                              (strSSOAppName, "YNTraceOn");

strYNArchiveXML = MyLib.Common.BizTalk.Components.SSOConfigHelper.Read
                                              (strSSOAppName, "YNArchiveXML");

Then for example, later in the orchestration, I can have a “Decide” shape with a rule that tests:

strYNArchiveXML == "Y"

Based on the value of that flag, I can choose whether or not to send a message to an archive port.

Note for security: Your orchestration will need to run in a host instance that has been defined at least an “Application User” to App.  That can be set in the BizTalk Admin Utility that is installed when BizTalk is installed.  (See screen shot towards the end of this article.)

4. Deploy from Dev to QA/PROD

Export your SSO “app” from the Dev system. Right click on the app, and choose “Export Application”. The following screen will appear. You must give it an encryption key. If you don’t have any super secret variables in you SSO, then can set a standard of using your app name for the key name. Once exported, the file will have a .sso file suffix. You can open it with notepad, but it will be encrypted. To import into the target system, the person doing the import will have to know the key you assigned.
SSO_Export_App

Comparison to BTDF’s SSO tool BTDF uses an Excel spreadsheet to enter all the variables and values. The advantage of BTDF is you can put in the values for each and every environment across the columns of that spreadsheet. Then, if I recall, BTDF stores an XML in SSO, and that SSO contains all the key-value pairs. So the tool above and the BTDF tool work differently, the the variables stored in one cannot really be viewed or updated by the other. BTDF also provides a C# windows form utility to update their SSO variables (sometimes needed, for example, in Production, to change some value on the fly).

By the way, when you change a value in SSO, it’s available “almost” immediately. Maybe it’s cached for a few seconds, but not for long.

Why is all the above needed when BizTalk installs with Administration and Client SSO utilities?

These are the two utilities included when you install BizTalk on a machine:
SSO_BuiltIn_Utilties

These utilities have never been that useful for me, except to change the SSO security for an app.

Here’s a trick you need to know. When you oepn the SSO Admin tool, you won’t see the applications above without clicking on the following obscure settings. You have to go to “Affiliate Applications”, right click then “View”, then check “Config Store”.

SSO_Admin_Utility_View_Options

Then when you scroll down to the bottom, you will see the types of SSO applications created by the above utility (or BTDF). There will be a very long list of GUIDs in the “Name” column, then your apps will be at the bottom.

SSO_Admin_Utility_View_Apps

Now, you can right click on the ‘Affiliate Application” named “Demo” and select “Properties”. The following screen appears, and for the screen shot, I have already clicked on the “Fields” tab at the top.

SSO_Admin_Affiliate_Application_Properties

You can see that the values in the “Label” column match the “keys” of our “Key/Value” pairs. So for whatever reason, Microsoft did NOT provide the ability to add or modify what are called “Labels” above. It seemed to take a few years later for them to create the MMC snap-in (described at the top of this blog).

Unless you are new to BizTalk, you maybe more familiar with the “Accounts” tab, shown below.

SSO_Admin_Utility_Accounts

Only users defined as either an “Application Administrator” or an “Application User” can read/write values in the SSO application. Your BizTalk orchestration will be associated to a Host Instance (the process under which BizTalk runs).  That Host Instance runs under the security of a userid, defined in BizTalk Admin console. Typically, a user group is defined as the Application User, and the Host Instance userid is added to that group.

I hope this gives you an overview of how to use SSO with your BizTalk Orchestrations.  I used to put some of my variables in the BizTalk application configuration file (BTNTSVC.exe.config and BTNTSVC64.exe.config), but using SSO is much more “elegant.”  Those config files had several downsides:

  1. There are two files to update, and you have multiple servers in your group (for failover/high-availability), you have to update them, or copy them, to each server.
  2. You have to cycle the host instances for any change in the .config files to become effective.
  3. You don’t have to risk messing up a critical file. If these BizTalk .config files are edited improperly, then BizTalk might not come back up until the mistake is corrected.

Especially in production, it’s a lot easier to use the little GUI utility above to update SSO.

The post Storing BizTalk Orchestration Config and Parameters in SSO appeared first on MyLifeIsMyMessage.net.


Is BizTalk the New COBOL?

$
0
0

Mainframe_TapeDriveYes, I admit it, I was a mainframe developer and DBA for the first 20 years of my career. I did a lot of COBOL, then moved into IDMS database adminstration. But after the Y2K (year 2000 date “fix” projects), I moved into the world of Microsoft, first as a trainer, but then I narrowed my focus down Mirosoft BizTalk Server.

BizTalk is a server product from Micosoft, that allows companies to automate business processes, and is often used for Business to Business (B2B) and Enterprise Application Integration (EAI). I’ve been working with BizTalk now over 12 years, in a variety of companies and industries.

So why is BizTalk the new COBOL? About 90% of the work I’ve seen on BizTalk runs in batch. What is batch? Today, the hot thing seems to be user experience (UX), designing interactive web pages and screens using the latest JavaScript and interactivity. EAI and B2B most frequently deals with moving data back and forth between systems according to business processes.

In the old COBOL days, we would receive a magnetic tape from another company, then run a COBOL program to load it into a VSAM file or database (or even, heaven forbid, a flat file). Nowadays, with BizTalk, I receive data from other companies via various methodologies, often FTP, MQSeries, or web, then process that data in batches. Okay, maybe 30% of the time we receive the data in “one-sies” – i.e. one single order at a time, but I would say most of the time it comes in batches. Then with BizTalk we often have to debatch the data, then call a a web service or a SQL stored procedure to store the data into our back end enterprise systems.

With BizTalk, I usually deal with incoming data and outgoing data from trading partners, such as vendors, customers, or service providers. A company sends data to us, we process it, and then send data back to the other company. I’ve worked in cases where I receive airline fueling data, then after the plane is fueled, we receive the transaction, then at night, we send batches of data back to the airlines or other parties like the fueling companies.

In another company, we receive a list of what a company is going to ship, we store that into our backend ERP system. When the items arrive physically, we send back a confirmation that we received the items. The items are then repaired, and we send them an a notice that the repair has completed, and then another one when we ship the items. In some case the items are shipped directly to the customer, and thus individual transactions, but other times we ship full palettes of items, thus the messages are backed up, and sent together.

For another past client, we received CSVs (Comma Separated Value files) from Universities, and had to debatch and load into our system related to student loans. For a dot com company, we created a list (i.e. a batch) of all the products we had to sell, and uploaded to Amazon via web services.

Several things made me think of this analogy, of BizTalk to COBOL. One is how I often debug. With BizTalk, I have created my own Trace facility, that dumps the message to a SQL table; to me, it’s a little fancier and much easier to use than using the built-in BizTalk message tracking. It reminds me of the days where I did similar, or added many Display statements to long COBOL programs. Then to test and debug, I pour over pages of output, looking for issues, anomalies, and patterns. Online and interactive developers are more likely to use an interactive debugger, setting breakpoints, and/or walking through code.

Batches are often processed at night for several reasons. 1) They represent the end of a days activity, or 2) a batch of orders for the next day, or 3) the computers are less overloaded at night, so it’s just a good time to do the processing. In the old mainframe days, we used to have this horrible concept called the night processing window. The online and the batch world didn’t seem to coexist very well. Thank goodness, this is less of an issue today. However, there are still many companies that make copies of their database on which to run queries, so as to not slow down the primary system.

Since batches are often run at night, BizTalk guys are often on-call during off-hours. BizTalk developers tend to have know a lot about infrastructure and communications, and have to be involved with fixes to certificates, IIS, FTP, and even router and data pipeline issues.

BizTalkers are often viewed at as “those other guys”. Everyone else is playing with the latest GUI widget, and we are still working with core processes that keep the business running. The web guys often get all the glory, and the BizTalk guys get blamed when anything goes wrong.

BizTalk has two modes of processing messages: 1) content-based routing, and 2) orchestrations and sometimes an 3) Enterprise Service Bus (itineraries) for those companies that use that). With content-based routing, there is less coding, and the coding that is done is done in something called Pipelines (written in C#). With the second, orchestrations are graphical representations of the message/data flow created in Visual Studio. Within an orchestration, we create maps to translate the data (for example, the customer calls the data Order_No, and we called it PO_NUM). We also insert short bits of X/Lang code, which is about 90% the same as C#, and we can invoke methods in C# class libraries.

Instead of JCL (Job Control Language), we create ESB’s and orchestrations, tying it all together with SendPorts and ReceivePorts taking the place of DDNames, such as the the two mainframe DDnames below (“INFILE” and “OUTFILE”):

 

//MyJobNam JOB Class=E
//Step01 Exec pgm=MyProgNam
//INFILE   DD DSN=MYAPP.PROD.MYFILE1,DISP=SHR
//OUTFILE DD DSN=MYAPP.PROD.MYFILE2,DISP=SHR

 

Now we create a SendPort, and point to a disk file.

BizTalk “Batch Jobs” are monitored on Biztalk Admin Console, which is basically the equivalent of SDSF (Spool Display and Search Facility in TSO/ISPF – for you mainframe guys, or some mainframe sites used a tool called “JARS” instead). Orchestrations are run in Host Instances, instead of Job Run Classes. Orchestrations can be terminated, just like mainframe jobs. Of course, most batch COBOL program used “DISPLAY” statements to output their results. BizTalk doesn’t quite have this, but Biztalk Admin console can allow you to view XML messages processed by the orchestration. And of course, Orchestrations can blow up or “ABEND” just like COBOL jobs, we just call them “SUSPENDS” instead.

 

Sample IBM SDSF Job Monitor

IBM SDSF Sample – Monitoring Batch Jobs

 

BizTalk_Admin_Console_Montior_Active_Jobs

BizTalk Admin – Active Service Instances (i.e. Jobs)

Can BizTalk be interactive? Well, yes, it actually can. Orchestrations can be published as web services. So when a client calls your web service, it actually can run a BizTalk orchestration under the cover. Since the client is expecting a quick response, there are special considerations and practicalities for providing for this real time response. Many times the client is running in a batch mode at the client companies. I have two cases in my career where we actually invoked an orchestration real-time. One was interesting, because it was connecting a CICS mainframe 3270 application to BizTalk via HIS (Host Integration Services), in order to call an external vendor’s web service and return insurance data.)

So I hope the title of the article wasn’t too misleading. COBOL is not just a batch language, it used for online as well. What I’m really trying to say is that batch processing is alive and well. Data still comes in batches, whether in XML stored in a queue, or whether a CSV or flat file.

The author, Neal Walters worked on mainframes for about 20 years, until the Y2K date conversion was complete. He worked with COBOL, CICS, end-user tools (Focus, SAS) and was an IDMS Database Administrator and Developer (and still occasionally sells an IDMS Tutorial Course and Documentation). After Y2K, Neal became a Microsoft Certified Trainer, and from there started training BizTalk and then moved into BizTalk Consulting for since 2004.

The post Is BizTalk the New COBOL? appeared first on MyLifeIsMyMessage.net.

How to Specify Multiple Emails in SMTP SendPort of BizTalk

SQL XREF BizTalk SendPorts to ReceivePorts

$
0
0

Suppose you walk into a new company, they don’t have documentation, and they use a lot of content-based routing. The first thing I do is usually draw a Visio diagram. There never really been one widely adopted standard for how to draw such diagrams. The secret is to pack the most useful information that you can in the smallest space.

When drawing BizTalk diagrams, I like to keep everything one page if possible. Of course, sometimes you have to break on multiples pages, and when I do, I don’t like cross-page lines or pointers, if they can be avoided.

In BizTalk, a Send Port or a SendPort Group can subscribe to the data coming in from a Receive Port (and of course one Receive Port can have multiple Receive Locations). The subscription however, is by the ReceivePortName, not the ReceiveLocationName. You can have multiple send ports subscribe to the same message (thus the name Pub-Sub, short for Publisher/Subscriber model, upon which BizTalk is based).

BizTalk_Filter_Subscriptions

To get to the above screen, I found a SendPort in BizTalk Admin Console, right clicked on it, then selected “Filters” on the left side. The above has one simple filter. All messages received from a ReceivePortName of MSMQDemo_RcfFromMSMQ_biztalktrans will be routed to this SendPort. You can add and change the filter/subscriptions on the top part of the screen. For convenience, the filters are shown at the bottom (and you can copy/paste them from there). It’s hard to see the entire names on the top, because of the limited width of the columns.

So often you can use business logic, naming convention, and and guessing to determine which SendPorts subscript to which ReceivePorts. Or you can open each SendPort and write them down, or copy/paste the above filters into a Word Doc, Spreadsheet, or Visio diagram.

But all the data in BizTalk Admin Console is stored in one BizTalk’s SQL Databases (BizTalkMgmtDB). The query below allows you find all SendPorts subscribing to a ReceivePort.

The code below was original found here: gallery.technet.microsoft.com/scriptcenter.

use BizTalkMgmtDb
go  -- If you have the "use" above, without the "GO" here you will get an error on the "With" statement
WITH
TmpXMLNode
  ( SendPortName, ApplicationName, tempXMLcolumn )
AS
  (SELECT
    SP.nvcName AS SendPortName
    , APP.nvcName AS ApplicationName
    , CAST(REPLACE(REPLACE(REPLACE(CONVERT(NVARCHAR(MAX), SP.nvcFilter),'>','>'),'<','<'),
      'xmlns="http://www.w3.org/2001/XMLSchema-instance"','') AS XML) AS tempXMLcolumn
  FROM
    bts_sendport AS SP
    INNER JOIN bts_application AS APP ON SP.nApplicationID = APP.nID
  WHERE
    CONVERT(VARCHAR(MAX), nvcFilter) <> ''
  )

SELECT 
  SendPortName,
  ApplicationName,
  CONVERT(VARCHAR(255), nref.query('data(@Value)')) AS FilterValue,
  CONVERT(VARCHAR(255), nref.query('data(@Property)')) AS FilterProperty,
  CONVERT(VARCHAR(255), nref.query('data(@Operator)')) AS FilterOperator
FROM
  TmpXMLNode
  CROSS APPLY
    TmpXMLNode.tempXMLcolumn.nodes('/Filter/Group/Statement') AS R(nref)
WHERE
  CONVERT(VARCHAR(255), nref.query('data(@Property)')) = 
     'BTS.ReceivePortName' -- filter type  (do not change the value in quotes) 
  AND CONVERT(VARCHAR(255), nref.query('data(@Value)')) = 
     'YourRcvPortHere'  -- change this value in quotes  

You can of course put a LIKE clause on the final where clause:

  AND CONVERT(VARCHAR(255), nref.query('data(@Value)')) like 'MSMQ%'  

Results of query in SSMS:
Result_of_BizTalkMgmtDB_Sql_Query_Against_SendPorts_Filters2
You may recall that you can also filter on your own schema/promoted fields. So you could have one SendPort subscribe to PurchaseOrderAmount > 5000 and a different one subscribe to PurchaseOrderAmount <= 5000.

Note in the above query, I added the “Operator” column, which was not in the original SQL sample.

The filters above are stored in a text column called nvcFilter. Part of the trick of the SQL is convert this to an XML column, so XQuery statement can be performed on it.

So to demonstrate what is going on internally, I created a dummy SendPort with several filters just to see something beyond the most simple example.

BizTalk_SendPort_Complex_Filters

I then ran this query

SELECT *
  FROM bts_sendport AS SP
    INNER JOIN bts_application AS APP ON SP.nApplicationID = APP.nID
  WHERE  nvcFilter like '%msmq%'

I then copied the contents of the nvcFilter column to NotePad++ and formatted it:

<Filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Group>
		<Statement Property="BTS.ReceivePortName" Operator="0" Value="ABC" />
		<Statement Property="MSMQ.Priority" Operator="3" Value="5" />
		<Statement Property="MSMQ.SourceMachine" Operator="0" Value="Machine1" />
	</Group>
	<Group>
		<Statement Property="BTS.ReceivePortName" Operator="0" Value="DEF" />
		<Statement Property="BTF2.commitmentRct_decidedAt" Operator="0" Value="test" />
	</Group>
	<Group>
		<Statement Property="BTF2.commitmentRct_commitmentCode" Operator="0" Value="test" />
	</Group>
</Filter>

 

So from this, we can discern that the > Operator is stored as a 3. One could continue this exercise and map each of the operators to the numbers, and then decode the numeric values back to the humanly readable values to show in the query results.

Notice also that the “and”s and “or”s are saved in separate “Group” elements.

So now, you know how to find and cross-reference all the SendPorts that are used by your ReceivePorts, and hopefully that will help you figure out content-based routing and better understand and document your system.

The post SQL XREF BizTalk SendPorts to ReceivePorts appeared first on MyLifeIsMyMessage.net.

How to Upgrade an Orchestration to a New WebService

$
0
0

Today, I was tasked with upgrading an orchestration from calling one version of a web service (version 3), to a newer version 4.

Fortunately, it was backward compatible, i.e. I didn’t have to remap any fields. However, the schema was renamed, as it actually had the version number in the web service name. So how does one do this in BizTalk?

In this case, I’m sure there are many paths to the same destination, but here are the steps I followed.

1. I opened a new temporary Visual Studio BizTalk project and consumed the new web service (using the “Add Generated Items” / “Consume WCF Service”). The reason I did it in a separate new project is that it creates the dummy orchestration, and the binding files.

2. I then copied the 2 or 3 schema files to my actual project.

3. I checked my map out (from source control), and opened it in NotePad++ and had to do one small surgery. I had to find Reference Location=”..\WebServices\PlaceOrder_V3.xsd” and replace it with “..\WebServices\PlaceOrder_V4.xsd”. I could have tried it in map, but I’ve seen too many cases where you lose all your mappings, so I did it this way. I then opened the map to verify, and all looked good there.

I then removed the old web service schema, and did a Rebuild, just to see what would happen, which lead to the next two steps.

4. I had to reassociate my Multi-part Message types. Since the messages were using multi-part message types, they were okay as is. But I had two messages types (one for the web service request, and one for the response) that were “red” and had to change. So I just had to carefully pick the new .xsd name for each. (Could have done this also by editing the .odx file, if done carefully.)

5. If you had promoted (or distinguished fields) on the web service schema, you would have to redo those, and that was the case in this orchestration. Then, a really weird scenario happened. Every expression shape that was using the distinguished fields was getting an error. There was not red squiggly line under the items, just a compile error. Even closing and reopening Visual Studio did not solve it.

In one case, I re-typed the msg.property_name using Intellisense, and that solved the issue. For another shape, I did the same thing and it wouldn’t go away. I took a wild stab at it, and created a new expression shape, cut and pasted the statements from the old shape to the new shape, then it compiled clean. I cannot explain that part at all!

6. I’m about to change the URL in the SendPort now, and start testing. I’ll update if anything else unusual happens. I did not use the binding files created by the “Add Generated Items” in the first step above.

6a. Things went bad during testing, took me way too long, like 2 hours to get it working. I had to deploy to QA environment, because it was easier to test.
6b. One issue I had forgot was that the SOAP Action Headers needed to change (in the General configuration tab of the SendPort), for example:
<Operation Name=”PlaceOrder” Action=”http://mysite.com/webservices/neworder_v3/2013/01/PlaceOrder” />
<Operation Name=”PlaceOrder” Action=”http://mysite.com/webservices/neworder_v4/2015/11/INewOrder/PlaceOrder” />

6c. For some reason, it still didn’t work. I’m checking with the authors of the webservice if they change anything else. To finally get it to work, I had to take the CustomBindings.xml file, and run it on the QA system, then change my orchestration bindings to use the new SendPort.

The post How to Upgrade an Orchestration to a New WebService appeared first on MyLifeIsMyMessage.net.

VBScript to Start BizTalk Orchestrations

$
0
0

This blog contains a sample VBScript to start a BizTalk Orchestration

The SDK (Software Development Kit) of BizTalk includes a sample to stop orchestrations.
“c:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Samples\Admin\WMI\Stop Orchestration\VBScript\StopOrch.vbs”
I guess, since it is just a sample, they chose not to provide the opposite to “Start” orchestrations.

I was having to deploy just a .DLL, not entire MSI over and over, so I started to make a script to do it. I need to stop the orchestration, run BTSTask with the AddResource option, then start the orchestration.

The trick is that you have to Enlist it before Starting it. So I run both the .Enlist and the .Start methods, one right after the other. I removed the optional UNENLIST parm.

Below is the VBScript:

'--------------------------------------------------------------------------
'
' ScriptName: StartOrch.vbs 
' WMI script to start a specific orchestration.
' Neal Walters - 02/10/2016 took StopOrch.vbs in BizTalk SDK to make StartOrch.vbs 
'
'--------------------------------------------------------------------------
' This file is based on samples in the Microsoft BizTalk Server 2009 SDK
'--------------------------------------------------------------------------

Option Explicit

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

	'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
	
	'Make sure the expected number of arguments were provided on the command line.
	'if not, print usage text and exit.
	If (objArgs.Count <> 2) Then
		PrintUsage()
		wscript.quit 0
	End If

	Dim InstSet, Inst, Query, OrchestrationName, AssemblyName, Unenlist
	Dim AutoDisableReceiveLocation: AutoDisableReceiveLocation = 2
	Dim AutoSuspendOrchestrationInstance: AutoSuspendOrchestrationInstance = 2
	
	OrchestrationName = objArgs(0)
	AssemblyName = objArgs(1)
			
	'set up a WMI query to acquire a list of orchestrations with the given Name and 
	'AssemblyName key values.  This should be a list of zero or one Orchestrations.
	WScript.Echo "Orch=" & OrchestrationName
	WScript.Echo "AssemblyName=" & AssemblyName 
 	Query = "SELECT * FROM MSBTS_Orchestration WHERE Name =""" & OrchestrationName & """ AND AssemblyName = """ & AssemblyName & """"
	WScript.Echo "Query=" & Query 
	Set InstSet = GetObject("Winmgmts:!root\MicrosoftBizTalkServer").ExecQuery(Query)
	
	'Check for error condition before continuing.
	If Err <> 0	Then
		PrintWMIErrorThenExit Err.Description, Err.Number
	End If

	'If orchestration found, enlist the orchestration, otherwise print error and end.
	If InstSet.Count > 0 then
		For Each Inst in InstSet
		    Inst.Enlist
			If Err <> 0	Then
				PrintWMIErrorThenExit Err.Description, Err.Number
			End If
			Inst.Start 
			If Err <> 0	Then
				PrintWMIErrorThenExit Err.Description, Err.Number
			End If
			wscript.echo "The Orchestration was successfully started."
			
		Next
	Else
		wscript.echo "No orchestration was found matching that Name and AssemblyName. InstSet.Count=0"
	End If
			
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	PrintWMIErrorThenExit(strErrDesc, ErrNum)
	On Error Resume	Next
	Dim	objWMIError	: Set objWMIError =	CreateObject("WbemScripting.SwbemLastError")

	If ( TypeName(objWMIError) = "Empty" ) Then
		wscript.echo strErrDesc & " (HRESULT: "	& Hex(ErrNum) & ")."
	Else
		wscript.echo objWMIError.Description & "(HRESULT: "	& Hex(ErrNum) & ")."
		Set objWMIError	= nothing
	End	If
	
	'bail out
	wscript.quit 0
End Sub 

Sub PrintUsage()
	WScript.Echo "Usage:" + Chr(10) + Chr(10) + _
		     "cscript StartOrch.vbs <Orchestration Name> <Assembly Name>" + _	
		     Chr(10) + Chr(10) + "Where: " + Chr(10) + _
		     "<Orchestration Name> = The name of the orchestration you wish to enlist." + _
		     Chr(10) + "       Example: 'MyBusinessOrchestration'" + Chr(10) + Chr(10) + _
		     "<Assembly Name>      = The name of the assembly in which the orchestration was deployed." + _
		     Chr(10) + "       Example: 'MyBusinessAssembly'" + Chr(10) + Chr(10) + _
		     Chr(10) + "       Example: 'Unenlist'" + Chr(10) + Chr(10)
End Sub

To run it:
cscript “VBScript\StartOrch.vbs” “ProjNamespace.OrchName” “AppName”

The post VBScript to Start BizTalk Orchestrations appeared first on MyLifeIsMyMessage.net.

Automating a Repetitive “Add-Resource” in BizTalk

$
0
0

In the past, I admit, I was a GAC’cer.  Yes, that means that I would run GACUTIL to deploy minor code changes to BizTalk Ochestrations.

Where I currently work, that is not the best practice for several reasons.  One reason is that if you  create an MSI after doing the GAC, the MSI will not contain the newest DLL.  At other places I worked, this was not an issue, because we used the BizTalk Deployment Framework (BTDF).

Last week, I had an orchestration that was rather difficult to test in my own environment.  So I wanted to compile it, deploy the .DLL to our QA environment, and test it there.  But I had to do this over-and-over, making minor little changes.

The manual process was:

  1. Stop the orchestration (and make sure to terminate any suspended instances).
  2. Go to the “Add Resource”, click a button to find the .DLL, wait a few seconds, then click a few check boxes, and click the “OK” button, and wait a few more seconds.
  3. Since we had two machines in our QA environment, I had to repeat Step 2 on the second machine.
  4. Then start the orchestration
  5. Then restart the host instances (so the new code would be picked up)

I vaguely remember the BTSTASK command, but haven’t used it for years outside of BTDF, so I looked it up, and created the following .cmd file:

cscript "c:\Program Files (x86)\Microsoft BizTalk Server 2010\SDK\Samples\Admin\WMI\Stop Orchestration\VBScript\StopOrch.vbs" "MyProjNamespace.MyOrchName" "MyAppName" Unenlist
"c:\Program Files (x86)\Microsoft BizTalk Server 2010\BTSTask.exe" AddResource /ApplicationName:MyAppName /Type:System.BizTalk:BizTalkAssembly /Overwrite /Source:MyProjNamespace.dll /Options:GacOnAdd,GacOnInstall,GacOnImport &gt;ReplaceResources_Log.txt
cscript "VBScript\StartOrch.vbs" "MyProjNamespace.MyOrchName" "MyAppName"

The program called StopOrch.vbs existed in the BizTalk provided SDK/examples. However, there was no StartOrch.vbs, so I had to create the VBScript to start an orchestration (see link to separate blog on that).  Heres the MSDN Doc for BTSTask with the AddResource parameter.

I’m still doing Step 5 manually.  I copy the .DLL to server1 and server 2 in the BizTalk group.  I then run the above script on each server.  Then I restart the host instances manually.

The post Automating a Repetitive “Add-Resource” in BizTalk appeared first on MyLifeIsMyMessage.net.

Sample Debugging BizTalk Map – Field is not Mapping

$
0
0

I had a case today where I was mapping two fields N01 and N02 to two side by side fields in the output schema.

N01 was working, and N02 wasn’t.  Both were under an condition that a certain variable MESSAGE_TYPE was equal to a certain value.  Yet one worked, the other didn’t?   How did I go about debugging this?

I did a right click “Validate Map”, and opened the XSLT.  I searched for N01, and found the following.

XSLT_Debug_Sample_1

Can you spot any clues to the issue?  If not scroll on down…

 

 

 

 

 

 

 

 

 

 

 

 

 

In the image below, I have highlighted some of the code. The N01 is wrapped by one IF statement, so I would expect the same IF statement around N02.

But when I look at N02, I see to nested IF statements.

XSLT_Debug_Sample_2

You can find the variables to understand what the tests are.  So I searched for the extra test around N02, i.e. the variable v16, and found this.

XSLT_Debug_Sample_3

That jogged my memory.  I had another page on the map, where we were using a “trick” to not map certain fields.
This was a RosettaNet schema, and it contained many nodes with default values that were filling up the output document with unnecessary junk. The “trick” is to map “false” to the fields you don’t want to map.  So I had essentially told the map that I did not want to output this element (even though I had mapped something to it).

Of course, this is only one small case, but I hope you like the methodology, and can use it to apply to your own debugging.  Learning XSLT of course helps.  The XSLT generated by BizTalk can be a little confusing because of all the “userCSharp” routines, and all the variables, but it can help you find issues in your map while testing.

Also note, I would not have found this issue unless I was carefully unit-testing.  I hand-crafted 5 different input test files, and was running each one of them through the “Test Map” feature, and manually scanning the output.

 

The post Sample Debugging BizTalk Map – Field is not Mapping appeared first on MyLifeIsMyMessage.net.


BizTalk Rosetta Schema Errors SerializableAttribute does not exit

$
0
0

I brought a Rosetta .xsd schema into a new BizTalk Project, gave it a compile and got 1524 occurences of the following error:

The Build Errors


------ Rebuild All started: Project: BTS2C7Outbound, Configuration: Debug Any CPU ------
e:\MyDir\BTS2C7Outbound\Schemas\2C7\Domain\Logistics\CodeList\RN_ResponseCode_01_00.xsd.cs(13,17): error CS0234: The type or namespace name 'NonSerializedAttribute' does not exist in the namespace 'BTS2C7Outbound.Schemas._2C7.System' (are you missing an assembly reference?)
e:\MyDir\BTS2C7Outbound\Schemas\2C7\Domain\Logistics\CodeList\RN_ResponseCode_01_00.xsd.cs(13,17): error CS0234: The type or namespace name 'NonSerializedAttributeAttribute' does not exist in the namespace 'BTS2C7Outbound.Schemas._2C7.System' (are you missing an assembly reference?)
...
e:\MyDir\BTS2C7Outbound\Schemas\2C7\Domain\Logistics\CodeList\RN_ContainerType_01_02.xsd.cs(201,17): error CS0234: The type or namespace name 'SerializableAttribute' does not exist in the namespace 'BTS2C7Outbound.Schemas._2C7.System' (are you missing an assembly reference?)
e:\MyDir\BTS2C7Outbound\Schemas\2C7\Domain\Logistics\CodeList\RN_ContainerType_01_02.xsd.cs(201,17): error CS0234: The type or namespace name 'SerializableAttributeAttribute' does not exist in the namespace 'BTS2C7Outbound.Schemas._2C7.System' (are you missing an assembly reference?)

Compile complete — 1524 errors, 0 warnings
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

RosettaNet_type_Namespace_Serializable.AttributeAttribute_does_not_exit

Solution

You must change the “Namespace” property on the following two schemas in the “System” folder; one directly in that folder, and one the “CodeList” subfolder.
Two_Rosetta_Schemas

Here is an example of the original values:
Rosetta_Schema_Namespace_Fix

Change the .System in yellow above to ._System. or some other value.

Rebuild, and your error should go away.

For additional information about bringing RosettaNet PIPs into BizTalk projects, see this link:

https://msdn.microsoft.com/en-us/library/ff720376.aspx

The post BizTalk Rosetta Schema Errors SerializableAttribute does not exit appeared first on MyLifeIsMyMessage.net.

How to Count and Purge your dta_DebugTrace in BizTalkDTADb

$
0
0


USE BizTalkDTADb
--select top 10 * from dbo.dta_DebugTrace
select COUNT(*) from dbo.dta_DebugTrace as TotalRowCount

SELECT YEAR(dtBeginTimeStamp) AS Yr,
Month(dtBeginTimeStamp) AS Mo,
COUNT(*) AS [RowCount]
FROM dbo.dta_DebugTrace nolock
GROUP BY
YEAR(dtBeginTimeStamp),
DatePart(mm,dtBeginTimeStamp)
Order BY
YEAR(dtBeginTimeStamp),
Month(dtBeginTimeStamp)

The results show you by year/month how many rows. In most cases, you will find you need to purge data prior the current month. At least on a test system, I can think of any possible use of month old orchestration trace data (or even on Production for that matter).  But if you have long-running dehydrated orhestrations you might need it).

dta_DebugTrace_Counts

Orchestrations write data to these tables each time they run (when Trace is enabled).

Go to SQL Agent on the SQL Server that supports your BizTalk server, check the job entitled: DTA Purge and Archive (BizTalkDTADb)
SQLAgent_Jobs_BizTalk_2010
I take the original code that is there, and copy it to the line below, then comment out the code that is there with the T-SQL comment (two dashes).
Then change the second line to the parameters you want. Follow-that by running the job manually, or set it up to run on a scheduled basis.


--exec dtasp_BackupAndPurgeTrackingDatabase
0, --@nLiveHours tinyint, --Any completed instance older than the live hours +live days
1, --@nLiveDays tinyint = 0, --will be deleted along with all associated data
30, --@nHardDeleteDays tinyint = 0, --all data older than this will be deleted.
null, --@nvcFolder nvarchar(1024) = null, --folder for backup files
null, --@nvcValidatingServer sysname = null,
0 --@fForceBackup int = 0 --


exec dtasp_BackupAndPurgeTrackingDatabase 24, 30, 32, 'e:\Backup\BizTalkDatabases\', null, 0

MSDN Reference: https://msdn.microsoft.com/library/aa558715.aspx

NOTE: Running the job creates a backup, so if your DTA database is large, and you are short on disk space, you will have to make sure you find disk space for the backup to be written.

If you get odd errors, try running the command directly in a SQL query window, then the a more useful error may be displayed than what you would see in the “View History” of the SQL Agent Job.

dtasp_BackupAndPurgeTrackingDatabase_Errors

After changing the second 30 to 32, I re-ran it, and saw this result:

Successful_Run_of_dtasp_BackupAndPurgeTrackingDatabase

 

The Parms are as follows:
dtasp_BackupAndPurgeTrackingDatabase_storedProc_Parms

 

However, after running it, I still saw many of the same rows there (this is on BT2010 by the way). I did some more research, found Sandro Pereira’s blog and ran the following:


declare @dtLastBackup datetime
set @dtLastBackup = GetUTCDate() exec dtasp_PurgeTrackingDatabase 1, 0, 7, @dtLastBackup

The post How to Count and Purge your dta_DebugTrace in BizTalkDTADb appeared first on MyLifeIsMyMessage.net.

Input format for testing a multi-message map

$
0
0

How do you test a multi-part map, i.e. a map with multiple input messages?

To test a normal map, you just take an sample XML file, click the map (in Visual Studio Solution Explorer), set the property of the filename into the value of the property “TestMap Input”, then right-click on the map and select “Test Map”. The output is shown in the Output window, and you can do a CNTL-Click on the output file to view the results.

Maps created in the normal mapper usually just have one input message; but maps created in an orchestration can easily have multiple input messages (just by selecting more than one incoming message in Transform shape). This creates a special structure, or wrapper around the messages. You can still do a test-map, but the file you input to the test map must be in the special format as follows:

<ns0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema">
	<InputMessagePart_0>
		<ns1:Schema1RootElement xmlns:ns1="http://MyNamespace.Schema1">
		</ns1:Schema1RootElement>
	</InputMessagePart_0>
	<InputMessagePart_1>
		<ns2:Schema2RootElement xmlns:ns2="http://MyNamespace.Schema2">
		</ns2:Schema2RootElement>
	</InputMessagePart_1>
</ns0:Root>

You would put your own elements and attribute between Schema1RootElement and it’s closing element, as well as between Schema1RootElement2 and it’s closing element.

So normally, you use some text or XML editor (like NotePad++) and paste data samples, then wrap them with the XML element wrappers shown above.

If your schemas don’t have target namespaces, you can simplify as follows:

<ns0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema">
	<InputMessagePart_0>
		<Schema1RootElement>
		</Schema1RootElement>
	</InputMessagePart_0>
	<InputMessagePart_1>
		<Schema2RootElement>
		</Schema2RootElement>
	</InputMessagePart_1>
</ns0:Root>

So basically the root element is part of a special namespace called the “aggschema” (aggregate schema). Then, as many message as you added each are found, but each is wrapped with N) where N start with 0, and increments once per each message.

The post Input format for testing a multi-message map appeared first on MyLifeIsMyMessage.net.

BizTalk Map XSLT Error: The ‘=’ character cannot be included in a name

$
0
0

Sample Code

XSLT_Bad_Value-Of_element

Error

MyMap.btm: error btm1023: Exception Caught: The ‘=’ character, hexadecimal value 0x3D, cannot be included in a name. Line 4, position 23.

Solution

This was a simple typo. I typed in “value-of-select=” instead of “value-of select=” (I erroneously included an extra dash between the “of” and the “select”). The parser saw the entire element name as “value-of-select=”, so of course, you cannot have an equal sign in an element name.

Context

I was trying to merge data from two incoming messages in a BizTalk Map, using the XSLT technique described here:
https://blogs.msdn.microsoft.com/biztalkcpr/2009/06/01/how-to-join-two-schemas-in-a-map-when-they-contain-namespaces/

Two things that I would like to add to that blog:

  1. You need to use an XSLT Template instead of just inline XSLT because you need to pass a parameter.
  2. When using the XSLT Template, you need to connect the Scripting Functoid to a field on the right side of the map; otherwise the Template will never get called.

 

The post BizTalk Map XSLT Error: The ‘=’ character cannot be included in a name appeared first on MyLifeIsMyMessage.net.

BizTalk XSLT & XPath Examples – Substring and Nested XPath with Where Clause

$
0
0

Two handy references for BizTalk XSLT:

Substring in XSLT Value-Of XPATH

The first example is fairly easy, I just needed to get the date/time without the timezone modifier, in other words to convert this: 2016-01-29T00:00:00-08:00

to this: 2016-01-29T00:00:00.

BizTalk_XSLT_XPath_Substring
The reason was that our web service was only coded to handle the date without the timezone. It used an Orcacle date/time conversion like this:

eValue = "TO_DATE('" + eValue.Replace("T", " ").Replace(".0000000", "") + "','YYYY-MM-DD HH24:MI:SS')";

XPath “Where” clause when using complex namespaces

Take a look at the data below. I needed to map the EventDate associated with DateType=PLN to D02, and the EventDate associated with DataType=FCT to D03.

Biztalk_Xpath_XSLT_Sample_Data

Most of the examples on the internet show you how to do this when you don’t have namespaces involved. But when you do have namespaces, the trick is to use nested queries in your XPATH.  In the sample below, you can see that the text in yellow is complete inside the other xpath brackets.

Using [local-name()=’xxx”] is like saying find me the element whose name matches ‘xxx’.

Once the where has been matched, the “xsl:value-of” statement begins with ./ to go up one level, then to find the EventDate (that is on the same level as DateType) to put in the output field.

BizTalk_XSLT_Nested_Xpath_Where_Clause

The post BizTalk XSLT & XPath Examples – Substring and Nested XPath with Where Clause appeared first on MyLifeIsMyMessage.net.

Powershell – Verify if all disk-paths in a file exist

$
0
0

Business Problem/Scenario

I had a .bat file with 50 lines or more, and many of them had disk paths. We were migrating this to production, so I did “replace all” commands to change all the paths to production SAN/Server names. But then, I knew some of the paths existed, and some didn’t. So I wanted to find all the paths that didn’t exist, so either:
1) I could fix the filename, or
2) Create the path on the disk

So I needed to parse the file looking for file/path names. At first I tried RegEx, but then decided that just using “Split” was faster in my case. (Sometimes you just want to get the job done in the shortest amount of time.)

The following works when you have a prefix on each directory path. I’m sure there are variations you could make on this depending on your filenames. I’m only looking for lines that have .exe, because the .bat file is running various C# program to process the files.

Sample file Test.bat:

line1 Small.exe \\MyServer\Messages\Dir1 and more words
line2 Biggertest2.exe \\MyServer\Messages\Dir1 parm2 \\MyServer\Messages\Dir2 parm4

Sample Powershell Code:

$filename = "c:\Users\MyName\Documents\Powershell\Test.bat"
$linesOfFile = Get-Content $filename 
$pathPrefix = "\\MyServer" 
cls
foreach ($line in $linesOfFile) 
  {
     #Write-Host $line 
     if ($line.Contains(".exe")) 
       {
          #Write-Host 
          #Write-Host $line

          $tokens = $line -split " "
          foreach ($token in $tokens) 
            {
                if ($token.Contains($pathPrefix)) 
                    {
                       #Write-Host $token 
                       if (-Not (Test-Path $token))
                          {
                             Write-Host "Not Found: $token "
                          }
                       else 
                          {
                             #Write-Host "Found: $token "
                          }

                    }
            }

       }
  }

Results (Output):

Not Found: \\MyServer\Messages\Dir1
Not Found: \\MyServer\Messages\Dir1
Not Found: \\MyServer\Messages\Dir2

Subsequent Improvements:

Make the whole line upper case. Ignore lines that start with “REM” (remarks/comments).
Future enhancement, could also make sure that the .exe files exist.

     #before loop
     $pathPrefix = $pathPrefix.ToUpper() 

     #inside loop 
     $line = $line.ToUpper()  
     if ($line.Contains(".EXE") -and -not($line.StartsWith("REM"))) 

The post Powershell – Verify if all disk-paths in a file exist appeared first on MyLifeIsMyMessage.net.

BizTalk/Powershell – Move .xml files to subdirectory

$
0
0

I recently showed a VBScript to Archive/Move xml files to a subfolder.  This is often needed when you have been archive or storing 1000s of XML files, and the the directory/folder is very slow to open due to the large number of files.  Now, we will do it in Powershell.

Create the subfolders ahead of time. With some minor improvements we could do that in the code, but I was in a hurry today when I needed this…

Get-ChildItem "201604*.xml" | ForEach { move -path $_ -destination ($_.directoryname +"\Archive\2016_04\"+ $_.Name)}

This does the following:
1) Select all files starting with “201604” (in my case, the files began with yyyymmdd.
2) pipe that into a ForEach loop
3) Run the “Move” commandlet
4) the filename in the loop is the $_ symbol
5) Then you build the destination directory $_ again is the iterator of the loop, i.e. the FileName object, so we can get it’s directory and “Name”. There, we insert the 2016_xx for the month.

So yes, you can make this a lot fancier, but it’s a start…

The post BizTalk/Powershell – Move .xml files to subdirectory appeared first on MyLifeIsMyMessage.net.


Error: “Object reference not set…” on BizTalk Map Compile

$
0
0

I was getting this strange error yesterday:

Error

map_X_to_Y.btm: error btm1023: Exception Caught: Object reference not set to an instance of an object.

Solution

What I had done was copied a map from one project to another.  I had either not copied the schema, or I had copied the map to a different folder where it couldn’t find one of the referenced schemas.   So either I moved the map or added the missing schema, and all was well.

At first I was focusing on Functoids and possible logic errors, but then I expanded the schema(s) on the left, and noticed the following:

Map_Missing_Schema

You can see in the picture above that InputMessagePart_0 was missing the schema.

 

 

The post Error: “Object reference not set…” on BizTalk Map Compile appeared first on MyLifeIsMyMessage.net.

How to set the web.config to get WebService errors returned to the client

$
0
0

The issue is you are testing, and it’s hard to see the exceptions you are encountering. You don’t want to go read the IIS logs, and they might not have the full .net error anyway.

1) Set customErrors mode attribute to “Off”
2) Set serviceDebug includeExceptionDetailInFaults attribute to “true”

Example of a webconfig below with these two parameters set, so you can see the context and parent nodes of where they fit in.

<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
    <customErrors mode="Off" />
  </system.web>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="ServiceBehaviour" name="SQRT_WCF.SQRTREST">
        <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding"
          bindingConfiguration="longTimeoutBinding" contract="SQRT_WCF.IDepot" />
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehaviour">
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <bindings>
      <webHttpBinding>
        <binding name="longTimeoutBinding"
        receiveTimeout="00:10:00" sendTimeout="00:10:00">
          <security mode="None"/>
        </binding>
      </webHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>

The post How to set the web.config to get WebService errors returned to the client appeared first on MyLifeIsMyMessage.net.

Install CURL for Windows and Run CURL on Windows

$
0
0

First download the C+ distributable from Microsoft: Download 64

Download the CURL MSI from here:
Download CURL MSI

Install will default to this directory, and here is the curl.exe: “c:\Program Files\cURL\bin\curl.exe”.

What is CURL?

A command line tool for getting or sending files using URL syntax.

Example Curl commands

Download the HTML of a page to your disk:

curl -o example.html www.example.com

The post Install CURL for Windows and Run CURL on Windows appeared first on MyLifeIsMyMessage.net.

Swapping BizTalk Map References

$
0
0

Issue/Scenario:

I have a new application that I’m building. I have for example three projects, App.Common, App.In, and App.Out.

We have a somewhat debatable policy of keeping one app separate from the others and almost no application cross-references (still on BizTalk 2010 – but in 2013 this is supposed alleviated, partially or in whole).

I had a web service schema copied in to App.Out. And I developed the proof of concept in App.Out.

Now, it turns out we have about 6 output messages.  There was a also some debate as to whether they should go in the single AppOut project, or in six different projects (App.Out1, App.Out2, etc…).  The architect wanted the second approach, so different developers could be assigned to each one in order to possible meet a tight development deadline.

Now, I don’t want that same web service schema to be deploy 6 times in the same application. So I moved the schemas to the App.Common.  And of course the map doesn’t compile because I change the location of the schemas.

Solution

I was afraid I was going to have to do map surgery, but it turns out I could just re-reference the schema in the map.  Since the schema and nodes are the same, none of the mapping was lost.

Internals of the Map

I was afraid I was going to have to do map surgery, but it turns out I could just re-reference the schema in the map.  Since the schema and nodes are the same, none of the mapping was lost.

But for fun, if I had to do map surgery, this is chat change. The Original “Before” is on top, and the “After” is on the bottom”.

NOTE: When you open a map there are no line breaks.  I use the XML tools in NotePad++ to format the XML (but don’t save it after formatting, always do the formatting on a copy).

You can see below how the “Reference Location” attribute changed.
I’m mapping from our Canonical schema to an internal web service schema.

 

<SrcTree RootNode_Name="Canonical_DATA">
<Reference Location="CanonicalArtifacts.Schemas.MY_CANONICAL_SCHEMA_V4" />
</SrcTree>
<TrgTree RootNode_Name="OrderUpdateHeaderByMessageID_New">
<Reference Location="SchemasWebSvc\B2BData_tempuri_org.xsd" />
</TrgTree>

<SrcTree RootNode_Name="Canonical_DATA">
<Reference Location="CanonicalArtifacts.Schemas.MY_CANONICAL_SCHEMA_V4" />
</SrcTree>
<TrgTree RootNode_Name="OrderUpdateHeaderByMessageID_New">
<Reference Location="AppOut.SchemasWebSvc.B2BData_tempuri_org" />
</TrgTree>

 

The post Swapping BizTalk Map References appeared first on MyLifeIsMyMessage.net.

Webservice gives 404 with SSL but works without

$
0
0

I have a “Website” in IIS. It had a virtual directory with SSL working. I added a second virtual directory for another external client.

I’m using SOAP-UI to test. It works fine with normal http, but gives an http status of 404 when I use https.

Example URL:
https://wstest.mydomain.com/App1/myService.svc
https://wstest.mydomain.com/App2/myNewService.svc

I’ve looked at the IIS logs, nothing exciting to report from there.
(This is on Win 2008/R2.)

It turns out that the web.config of the one not working had:

          <security mode="None" />


and I simply changed it to:
          <security mode="Transport" />

The post Webservice gives 404 with SSL but works without appeared first on MyLifeIsMyMessage.net.

Viewing all 215 articles
Browse latest View live