trailing block elements must have an id attribute

A couple of weeks back some colleagues working on a POC came across this runtime error when invoking a web service through a generated web service proxy client:

trailing block elements must have an id attribute

This exception was being thrown within the web service proxy client when parsing the response from the web service. Using HttpAnalyzer in JDeveloper (versions 10.1.3.1 & 10.1.3.2 were used) we could see that the request was being sent and a response was being received, so clearly nothing wrong with the web service being invoked. Or so we thought…

It turned out that the published WSDL & XSD and the web service implementation were not matching. The XSD for an element in the response said that Address had a maxOccurs=”1″ however, the web service implementation was returning multiple Address elements. The web service proxy client is generated from the WSDL & XSD so it is only expecting one Address element in the response stream, hence the error at runtime.

We had to double check which was correct, and a quick check through documentation showed that the schema had not been updated when the object model had changed. Once that was determined, it was straight forward to correct the schema entry, maxOccurs=”unbounded”, and regenerate the web service proxy client.

So, if you get this obscure ‘trailing block elements must have an id attribute’ error message at runtime double check that the published interfaces (WSDL & XSD) match the implementation.

SCA Diagram stencil for Visio

A visual representation of an SCA composite is a crucial part of composite documentation. Many diagrams are based on section 1.2.1 Diagram used to Represent SCA Artifacts in the SCA Assembly Model Specification. Also worth checking out is a simple, but very useful, description of SCA parts from the Tuscany project.

Since I could not find one, after about 10 minutes of looking, I decided to put together a Visio stencil for SCA composite diagrams which you are free to use. Use the basic Visio connectors to provide links between services, components, references etc. Obviously you can add more service and references to components or composites as you require.

As usual, feedback is welcome, so let me know what you think and if there are any improvements you would suggest.

SOA Governance isn’t about technology either…

Steve Jones summarises a few of the points from a recent ICSOC 2007 debate on SOA Governance and mentions some enforcement ideas in his recent Service Architecture – SOA: SOA Governance isn’t about technology either… article. He makes a good point about people and process.

In the same way that the Rules of the Road is not about what car you drive but about your behaviour and the behaviour of other road users. The reason we have Rules of the Road is because we know, and people recognise, the cause and effect of accidents as well as traffic chaos.

Highlighting SOA anti-patterns (e.g. IBM Article, SOA anti-patterns book) is a good start in bringing to people’s attention poor ‘driver behaviour’. However, as governance is really a business, rather than technical issue, and the business should be the ‘driver’, we also need a higher level exposition (ala Who moved my cheese?) of good business practice around ‘doing IT right’. Any volunteers?

Right sizing the QA environment

Although clearly embarrassing for Canada Bell the QA and User Acceptance environment for their Solo discount ad campaign did not match (i.e. literally reflect in scale) the production environment. This is something that happens in IT too, a lot more often than it should. I have come across a number of banking system implementation projects over the years that do not QA on an environment reflecting production. These are simple things to get right:

  • Use the same network load balancers
  • Use the same cluster configuration
  • Use the same data

The latter criterion obviously requires a lot of effort, particularly when implementing new functionality. High volumes of data and concurrent users is not just for PSR testing! It is an over simplification, but PSR is there to tell you about capacity not quality.

Thankfully, most of the banks (big and small) I have worked with have put in place a ‘pre production’ environment which allows you to work with a copy of real data which may only be a week or two old. To not do so is really naive and in the long run is asking for trouble. It’s worth the effort to find issues with quality before your customers tell you about it when they come in to close their accounts.