Friday 26 September 2008

Mime types for common data types

Wednesday 24 September 2008

Compile and test with different JDK versions Maven


 

Nice posting showing usage of defining JDK as a parameter in user profiles

http://unserializableone.blogspot.com/2008/09/compile-and-test-with-different-jdk.html



Friday 5 September 2008

Google Chrome crash if link has :%

Many people are aware by now that placing about:% or just :% in to Chromes address bar will crash your Chrome Browser.


 

A test page by chrome plugins Click to visit the test page

RELAX –WS

RELAX –WS


 

Relax-WS facilitates creation of WSDL file using Relax NG syntax, which is quite less verbose and straightforward.

http://relaxng.org/compact-tutorial-20030326.html

Example

service Hello {

port {

operation SayHello {

in {

element name {xsd:string}

}

out {

element message {xsd:string}

}

}

}

}


 

Pitfalls

  1. Cardinality


 

XMLSchema

<xsd:element name="bar">

<xsd:element name="foo" minOccurs="5" maxOccurs="30"/>

</xsd:element>


 

Relax NG Compact syntax

start = element bar { fivefoo, upto25foo }

fivefoo = element foo { empty }, element foo { empty },

          element foo { empty }, element foo { empty },

          element foo { empty }

maybefoo = element foo { empty }?

upto25foo =

  fivefoo?, fivefoo?, fivefoo?, fivefoo?,

  maybefoo, maybefoo, maybefoo, maybefoo, maybefoo


 


 

It would be extremely verbose if suppose we had to define cardinality lets say between 250 and 500. Also it would prone to human errors.


 

  1. Relax NG to Schema


 

Since xml schema seems to be more constrained version of RELAXNG grammar, everything defined in RELAX NG would not be possible to translate into Schema in a predictable way


 


 

start = DoSomething
DoSomething = element DoSomething { resAny* & DidSomething? }
DidSomething = element DidSomething { xsd:integer }
resAny = (anyAttribute | text | resAnyElem)
resAnyElem = element * - DidSomething { any* }


 

  1. Another approach is to do it spring way


 

http://static.springframework.org/spring-ws/sites/1.5/reference/html/tutorial.html