PDC PreCon – Web Services

[ BlogX has been playing up and this is the second time I've written this 🙁 ]

I went along to Don, Gudge and Tims session
on Sunday,  I done a lot of work in the XML and Web Services space expecting
to pick up a few nuggets of information.

Sure enough the speak was quit basic and slow paced - but then again that was the
plan.  I picked up two interesting bits just before the lunch break which I'm
going to need to think about a bit more.

The first one was about restricting types in Schemes so they can't be derivied from,
subsititued, etc. The reason for this seems to be because if your Web Service is expecting
a Type FOO which you then validate against the schema, this works fine.  However
if soembody derives a new Type from your Type, Substitutes, etc. it will also pass

So restricting this will "protect" your Web Service a bit more, but I would also argue
that making the code more robust with regard to parsing the document would be vital
as well.  Perhaps there are some other angles where this "blocking" helps.

The attribute (schema level) is blockdefault

But you can also apply the block attribute to all of your elements individually if
you require using the block attribute

The other point was moving all element definitions out of Complex Types where they
are local, to make them global and then just refer to them inside of the Complex Type. 

The only benefit I can see to this is that if you have many complex types using the
same elements then this cuts down on duplicity, other that that I can't see the benefit
- yet 🙂

Skip to main content