geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan <xhh...@gmail.com>
Subject How to marshal/unmarshal HandlerType correctly ?
Date Mon, 23 May 2011 09:09:07 GMT
Hi,
    In the HandlerChain class of the jee module, we uses QName for the
type of serviceNamePattern and portNamePattern for better access (By
default, String type is used in the generated classes). But in the web
service spec, it is allowed to specify * and invalid name space
prefix.
    e.g.
     <handler-chain>
              <service-name-pattern
xmlns:ns1="http://hello.org">foo:HelloService</service-name-pattern>
              ......
     </handler-chain>

    Now, while parsing the DD above, an exception like
java.lang.IllegalArgumentException: prefix foo is not bound to a
namespace is thrown.
    Is there a way in JAXB to create a QName even the name space is
invalid ? I am thinking to have a XMLAdapter to do this from String,
but seems no way to look up the namespace by the prefix.
    Thoughts ? Thanks.
-- 
Ivan

Mime
View raw message