|
From: Ng C. Y. [Cyng] <cy...@cs...> - 2003-04-03 02:21:51
|
Hi,
> We've been looking into using apache-axis instead of the Sun
> implementation of jaxm/saaj because it has more functionality (works
> better with proxies, http keep-alive etc.) and is open-source.
For your information, we have also been testing with Apache Axis
for sometimes. The goal is we can finally support Axis but we still find a
number of problems in it.
> org.apache.axis.message.SOAPHeader:
> --
> public SOAPElement* addChildElement*(SOAPElement element)
> throws SOAPException
> {
> if (!(element instanceof* javax.xml.soap.SOAPHeaderElement*)) {
> * throw new SOAPException*(Messages.getMessage("badSOAPHeader00"));
> }
> return super.addChildElement(element);
> }
> --
>
> Since I'm not allowed to decompile the Sun implementation ;-) I tried
> casting extensionElement.getSOAPElement() to SOAPHeaderElement, without
> success. I get a classcast exception then in the default hermes (without
> axis).
Ideally speaking, since both JAXM and Axis implement javax.xml.soap.*,
there is no need to change a line of codes in Hermes and simply switching
between the two libraries should work smoothly.
Of course, the world is not so ideal. The ClassCastException thrown
by Axis is due to the fact that when a SOAPElement is added to SOAPHeader,
the SOAPHeader would regard this SOAPElement as SOAPHeaderElement (which is
subtype of SOAPElement) when an iterator of children is retrieved from
SOAPHeader. We have reported this to Apache and see if this problem will
be fixed in the coming Axis release.
Regards,
CY
----------------------------------------------------------------------------
Ng Chi Yuen, CY. cy...@ce... http://www.cecid.hku.hk/
Technology Officer,
Centre for E-Commerce Infrastructure Development,
The University of Hong Kong
----------------------------------------------------------------------------
|