|
From: Ng C. Y. [Cyng] <cy...@cs...> - 2003-06-25 08:36:10
|
Hi,
> Axis saaj compliant (the api), so i think you mean removing the sun
> reference-implementation of saaj?
Actually, the current 1.0 branch can already work with Axis
(except digital signature). Our thought is to remove Sun's RI of SAAJ.
> Or do you realy want to start using the lowlevel axis api of jdom?
> Personally I wouldn't do that. Just stick with saaj and use the axis
> implementation. (doesn't axis use jdom?)
Axis does not ride on JDOM but just DOM (Xerces). Well, keeping
SAAJ API is fine for me. The current 1.0 branch is exactly what it is.
However, I just mean that if there is any modification to packaging,
simply switching to JDOM is not that difficult because SAAJ is now quite
now transparent to users. Users just know EbxmlMessage and SAAJ of Axis
is just an implementation. Of course, the only reason to switch to JDOM
is for efficiency.
> Great, on an internal project we currently have thrown all sun http
> classes overboard and use commons-httpclient from apache. This gives us
> better proxy support (including authentication, even NTLM) because the
> Sun has some issues there, especially with M$ proxies. And
> http-keepalive, which especially on busy connections, leads to 300%
> performance gain.
This idea inspires me. I don't ever use Apache httpclient but
I think we would also review whether we use keep-alive feature and
bypassing Sun's http code. Http.java is now quite ready to add codes
for adding user authentication, proxy support, and performance tune.
> Doesn't axis use jdom and Sun dom4j?.... I'l have a look So if the sun
> implementation of saaj is not used anymore we could switch to whatever
> we want.
As said, we ultimate goal should be switching to Axis. However,
Axis currently has a really "nice" feature. It would serialize the XML
document in a pretty way by adding indenting white spaces. My colleague
and I ever trace the source codes and it seems that there is no way to
call SAAJ method to disable such a "nice" feature. After signing with
digital signature, the serialization breaks it. This is the reason why
up to now, I do not yet upload Axis libraries into lib/.
> btw, did you ever have a look at jxpath.... I you want clean code....e.g.
> Address address = null;
> Collection locations = vendor.getLocations();
> Iterator it = locations.iterator();
> while (it.hasNext()){
> Location location = (Location)it.next();
> String zipCode = location.getAddress().getZipCode();
> if (zipCode.equals("90210")){
> address = location.getAddress();
> break;
> }
> }
> can be written as
> Address address = (Address)JXPathContext.newContext(vendor).
> getValue("locations[address/zipCode='90210']/address");
> especially the manipulation of the ebxmlmessage would then be realy
> clean... just learn the xsd
Oh, I don't ever look at JXpath. From the above coding style,
the code is obviously cleaner. But I wonder if there is any concern,
e.g., performance degradation (evaluating the expression instead of
manipulating a DOM tree), or there is a strong dependency to use this extra
library. Is JXpath quite stable and widely now? Anyway, I am open to this
and we will discuss.
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
----------------------------------------------------------------------------
|