axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruchith Fernando <>
Subject [Axis2] A couple of issues with ADB
Date Mon, 21 Nov 2005 19:13:27 GMT
Hi Devs,

I'm playing with the Axis2 ABD stuff and I hope to use it in
implementing the WS-Trust stuff.
I ran into a couple of issues trying to use ADB.

1.) ADB Beans doesn't seem to properly set unqualified attributes
2.) ADB Beans cannot serialize qualified simple (containing a text
value) child elements.


Please have a look at this piece of code [1]. This produced the
following output:


Here comes the problems :-)

First I want to make the wst:Context attribute unqualified. Simply
remove the 'wst' prefix. Therefore I tried changing line number 27 as
follows :

 attributes[0] = new String("Context");

But this produced the following output which is missing the 'Context' attribute:


Q1: Is this behaviour correct? Or am I doing somethign wrong?

When I tried changing line 27 to:

  attributes[0] = new QName("Context");

It produced:

xmlns:wst="" xmlns=""

but this has xmlns="", which I think should not be there.

Then I wanted to make the 'TokenType' element a qualified element
bound to '' namespace.
Since this is a simple element with only a child text node, I changed
line 22 to

QName("", "TokenType",

It produced:

xmlns:wst="" xmlns=""

But here the value of the wst:TokenType element is missing :-( Instead
we have '<bytes xmlns=""></bytes>'

But ... going through the ADBPullParserTest revealed that our ADB can
hanle setting OMElements... I got the required output by replacing
line 21-23 with

	            OMFactory fac = OMAbstractFactory.getOMFactory();
	            OMElement elem = fac.createOMElement("TokenType",
"", "wst");
	            ArrayList properties = new ArrayList();

This is quite useful but if I wanted to allow an ADBBean to accept an
unknown xml element from a user ... But for this situation, IMHO this
looks like a hack to me.

Q2: How can I correct this to produce
'<wst:TokenType>test</wst:TokenType>' WITHOUT inserting the OMElement?
Should I code another ADB Bean for the <wst:TokenType> element and if
so how can I simply set just a text value of that bean?



View raw message