Removing XML namespaces – revisit

Removing XML namespaces – revisit

I have a old post on removing XML namespace from outgoing messages using XSLT in a map on the send port. Removing XML namespace is usually a late requirement that shows up during integration tests with for example legacy systems that has problems reading XML and only finds XML namespaces messy and confusing and wants it removed.

The post recently got commented by Jeff Lynch (one of the codebetter.com bloggers) asking me why I just didn’t create a schema without any XML namespace in it to represent the outgoing schema (see figure below) and then map to that in the send port.

Say for example that we have incoming messages like the one below with namespaces.

<div><span style="color: #0000FF; "><</span><span style="color: #800000; ">ns0:BlahRoot </span><span style="color: #FF0000; ">xmlns:ns0</span><span style="color: #0000FF; ">="http://Sample.BlahIncomingSchema"</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">
  </span><span style="color: #0000FF; "><</span><span style="color: #800000; ">BlahNode</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">Test Value</span><span style="color: #0000FF; "></</span><span style="color: #800000; ">BlahNode</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">
</span><span style="color: #0000FF; "></</span><span style="color: #800000; ">ns0:BlahRoot</span><span style="color: #0000FF; ">></span></div>

We’ve then defined a schema without namespace and map to that and get the following result.

<div><span style="color: #0000FF; "><</span><span style="color: #800000; ">BlahRoot</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">
  </span><span style="color: #0000FF; "><</span><span style="color: #800000; ">BlahNode</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">Test Value</span><span style="color: #0000FF; "></</span><span style="color: #800000; ">BlahNode</span><span style="color: #0000FF; ">></span><span style="color: #000000; ">
</span><span style="color: #0000FF; "></</span><span style="color: #800000; ">BlahRoot</span><span style="color: #0000FF; ">></span></div>

This method is of course much cleaner then any previous and it’s also more conceptually correct as the schema actually represents the contact between BizTalk and the receiving system (the contract is a message without namespace in it, not one with that we then remove).

The only problem with this kind of approach is that as BizTalk recognized the message type using a combination between root node and XML namespace we can’t have another schema with the BlahRoot root node without a defined XML namespace. Even if those two schemas would look totally different in structure and be two different message types BizTalk would be able to see the difference (to BizTalk they both be #BlahRoot message types).

Thanks Jeff for pointing this out to me.

Mobile phones……ever need a quick fry up???

Proof is in the popping – http://labmylife.blogspot.com/2008/06/you-can-cook-your-brain-with-cell.html

Think of your ear/brain/head/eye in this space…….

On the lines of mobile phones – a while ago I decided to check out my latest phone
and how much ‘energy’ it gave out
(you know – hot handset, hot ear etc after been talking on it for a while)

As I found out – as part of Govt. regulations there’s some one who set a number/limit
on this energy at 1.6. (for Australia)
The ‘energy’ reading is known as ‘Specific Absorbtion Rate’ (SAR) rating.

Check more out here:

http://www.sarvalues.com/what-is-sar.html

http://www.smh.com.au/articles/2006/07/12/1152637733291.html

When this stuff comes out – there’s always the 2 main camps, ones that say ‘yes’ it
does and others that say ‘what a joke’.
(we then recite – high voltage power lines, lukemia and the classic was smoking ads
back in the 50s that state all the medicinal benefits of smoking. Big full page ads
but a few years later we know more about smoking…)

Lately here we have several top neuro surgeons throwing their mobiles out, due to
the amazing increase in the number of brain tumours they treat – especially on the
‘preferred ear’.

So I figured that I’d go looking…..

…I went to the manufacturers website and I was able to get 63 properties and details
about the phone. Battery life; bands; standby; talk time; features; dimensions etc…….

….but…..

….NO SARs number…..

….after doing a couple of web searches…..my phone comes out at 1.4 (the
website also tells me that in the current phone market, 95% of all mobiles are better
than mine!!!)

Interesting to say the least!

 

 

 

Sofware Meme

Sofware Meme

I was tagged by Scott – here we go:

How old were you when you started programming?

I was probably 11 or 12.   I had a Commodore Vic 20  🙂


What was your first language?

Basic.

What was the first real program you wrote?

I wrote a program on my Vic20 to generate Dungeon and Dragons characters.

What was your first professional programming gig?

I build an ASP web site for the University of Minnesota Law School

What’s the most fun you’ve ever had…programming?

Hmm – this is pretty hard.  I think the most fun I’ve ever was last fall I got
hired to prototype something and what I ended up doing totally exceeded the expectations
of the people who asked me to build it.  It was fun making it work and then fun
seeing the reactions.

I choose to tag no one (stopping the meme from my part of the tree ;-)).

 



Check out my BizTalk
R2 Training.

PIDX Schemas Solution for BizTalk Server 2006

One of the things you’ll need when working with PIDX / RNIF / BTARN projects in BizTalk Server 2006 is the actual PIDX schemas (.xsd) to be used. Luckily the American Petroleum Institute (API) has a public web site for the Petroleum Industry Data Exchange (PIDX) committee which contains links to the various versions of their schemas.

Once you and your trading partner decide on which version you’ll be using, you can download the schemas and add them to your BizTalk solution in Visual Studio. When you attempt to open these schemas you’ll notice an error message that pops up as shown here.

This is a fairly common error and usually occurs when the schema you are attempting to open contains a reference to another “imported” or “included” schema and the BizTalk Schema Editor tool cannot find the file in question. The work-around for this is fairly simple and all you’ll need to do is change these two attributes.

  1. First you’ll need to click on the Imports attribute collection and delete the reference to the PIDX Library schema which contains the hard-coded location which is incorrect.
  2. Next you’ll need to import a new schema as an XSD Include and select the PIDXLib from the picker as shown here.
  3. Once that step is complete, you’ll also need to change the Root Reference attribute so that the BizTalk Schema Editor knows how to correctly identify your schema.

And that's really all there is to it, except you'll have to do this for every PIDX schema and every version.

Good thing I've already done this and you can download the BizTalk Solution containing all the PIDX schemas right here!

IDS Scheer announces the release of ARIS for BizTalk

June has been an active month for the Business Process Alliance. In a recent post, I shared some thoughts on how several cutting edge technologies-SOA, modeling, SaaS and virtualization-are beginning to converge. Recent product announcements show that it’s already beginning to happen. That said, you’re probably asking, ’why do I care again?’ The short answer we’re watching business and IT slowly move toward the right levels of alignment for the last decade, and many have cited SOA & Business Process technologies as vehicles.


 


At the Process World event in Berlin, IDS Scheer announced the release of ARIS for BizTalk, which generates BizTalk applications from process models. They will release a second product in the near future which allows data from BizTalk to be exposed in their process monitoring software.  In other words, you can now model a process in ARIS SOA Architect, take the process represented in either BPEL or BPMN code from the SOA Architect product and convert it directly into a BizTalk application using ARIS for Microsoft BizTalk. This is a great demonstration of design and runtime technologies working together thru standards. The second, as yet to be named product also announced at Process World will enable a full cycle process modeling and execution experience by extracting data from the BizTalk BAM database and presenting it in the ARIS PPM dashboard. 


 


The combination of these two products will allow users to model a process, generate an executable application, run the application and monitor the resulting application performance so that adjustments can be made to the model with the intent of optimizing performance. This release is the result of over a year of work by a joint MS and IDS Scheer team to realize the goal of end-to-end support of process model execution. We think this represents a huge step forward for developers, and look forward to continuing work with the BPA on Oslo-this is just the beginning!


 


A couple other key announcements: on the 3rd of June, K2 announced their new BlackPoint product, a derivative of BlackPearl.  Aimed at providing a low cost way of building workflow applications in MOSS with an Office-style designer, the innovations in BlackPearl make it friendly to non-technical users.  Later on June 10th,  SOA Software announced that they had certified their SOA governance solution to work with WCF allowing .Net applications to act as fully governed peer in heterogeneous SOA environments the might include other vendor’s products.


 


The BPA members just continue to create exciting new products and making it easier to build great SOA & BPM solutions with Microsoft technology!

Delivery notification gotchyas…

Suppose you have delivery notification set up on a logical orchestration port
(along with a catch block for DeliveryFailureExceptions).

Gotchya 1: If that port is bound to a send port that executes the flat file assembler,
and you send improper xml to the assembler, you’ll get a warning in the event
log along the lines of:

The adapter "blah" raised an error message. Details "Cannot find definition for the
input: foo”

But you won’t get a DeliveryFailureException (or any other, for that matter.) 
Nor will the orchestration progress past that point.

Workaround: Consider putting an xml validator as the first step in the pipeline (the
flat file assembler will come next.)  That will cause an exception to be raised
that you can catch in your orchestration…

Gotchya 2: If the message heading for a send port is terminated within the admin console
for some reason, you will never get a DeliveryFailureException, nor will your orchestration
progress past that point.

Workaround: No idea on this one.  Leave comment if you do…

XNA Game Night

XNA Game Night

I’ve never been involved either in game development or frequent gaming, but being an Xbox360 owner in the last 6 months, I’ve been paying more attention to the field.

Last night, local Microsoft organized an XNA Game Night, where 6 teams showed off some of their game dev skills. Most of the games were simple (with 2 exceptions), some of the PC and some for the Xbox360 (none for the Zune!), most of them Arcade-like games, but it was apparent that XNA is a very interesting platform for game development, and it’s very easy to get caught up and seduced by ideas and start thinking about giving it a try. Guess what I’m downloading… 🙂

Anyway, if anyone is interested, some starting points are the following:

Microsoft XNA Game Studio 3.0 CTP

XNA Creators Club

XNA Developer Center (@MSDN)

Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

Silverlight calling Workflow Services

Silverlight calling Workflow Services

One question I was asked during my web cast yesterday about calling WCF services from
Silverlight is if the service could be a workflow service.  I said – “Of course”
– not knowing that it was a little more complex than that 🙂

That said – here is a sample.

SilverLightUsingWorkflow.zip
(535.08 KB)

Unfortunately I don’t have time to go into the details right now – working on another
project at the moment. The key to making it work is setting the instanceid context
to null on the server when the “last” operation is called – in this case the operation
implemented inside of the eventhandler which causes this state-machine workflow to
move to the completed state (so that the client can then start a new workflow).

I hope to find an more elegant and automatic solution – but this works for now (Hope
you are listening Jason from the webcast – this ones for you ;-))



Check out my BizTalk
R2 Training.

Today the clouds, then we [code]camp on the weekend

I’m actually back in town for a couple of weeks. Good thing too, as tonight at the San Diego .NET User Group Mike Culver of Amazon will be telling us all about Amazon’s efforts in cloud computing. If you haven’t had any exposure to cloud computing, or don’t even know what it is, you should look into it. This looks like it could be a Big Next Thing. Amazon, Microsoft and all the others are investing heavily in the space, and it really enables a bunch of things we never could have done before. For details about the meeting, visit the San Diego .NET User Group.

Then, this weekend, it’s Code Camp time in San Diego. I’ll be there, doing the same ESB Guidance presentation (“A Technical Drilldown into Microsoft’s ESB Guidance”) I did at TechEd a couple of weeks ago. It went really well, this has matured nicely, and now even includes a pretty cool governance section. Code Camp is always a lot of fun, hopefully you can make it!

Technorati Tags: cloud computing,code camp,user group,esb Guidance