ws-fx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <as...@cs.indiana.edu>
Subject WS-FX Addressing API review ...
Date Wed, 18 Feb 2004 04:39:03 GMT
hi,

i thought i would write some comments about current fx/wsa API. however 
before i proceed one observation: i think it would be good to have an 
example of usage (current tests looks like a beginning ...).

now to the main point: i do not think that basing API on ETTK is good 
idea - it looks like a first attempt and is very messy (in my opinion of 
course!). i would instead try to make it as simple as possible to limit 
number of non essential classes and cognitive space when using API - see 
below.

so here are more specific comments

* it seems to me that EndpointReference, RelatesTo, AddressingHeader aka 
MessageInformationHeaders (class to encapsulate MIH i.e. that provides 
transfer between WS-Addressing and SOAP headers) would be enough? to 
give a concrete example i attach such 3 classes that i think implement 
whole WSA (to compile XML Infoset API from XPP3 is required).

* there is lot of classes but it is not clear if all are needed? i think 
most of *Type classes is not needed and
i could not see use for To/ReplyTo/etc classes that encapsulate simply 
EndpointReference (and there is no check that To class is actually  
representing <wsa:To> ...)


* ReferencePropertiesType seems to be just List<Element> that is on 
demand added to parent message? this means it does not really help with 
reference properties DOM children management?

* it seems to me that there is a problem with PortType(String qname)
    public PortType(String qname) {
        this(new QName(qname));
    }
as it calls QName(String localPart) constructor so namespace and prefix 
will be lost?

i think that real test of API is how easy is to use so here is an 
example of what i think about is easy:

void describeEp(WsaEndpointReference ep) {
        System.out.println("\nEndpoint Reference "+ep.getName());
        System.out.println("address URI="+ep.getAddress());
        XmlElement props = ep.getReferenceProperties();
        if(props != null) {
            for(Iterator i = props.requiredElementContent(); 
i.hasNext(); ) {
                System.out.println("reference 
property="+builder.serializeToString(i.next()));
            }
        } else {
            System.out.println("no reference properties");
        }
        System.out.println("selected port-type="+ep.getPortType());
        System.out.println("service name="+ep.getServiceName());
        System.out.println("service-port name="+ep.getServicePortName());
        int pos = 1;
        for(Iterator i = ep.getPolicy().iterator(); i.hasNext(); ++pos) {
            XmlElement policy = (XmlElement) i.next();
            
System.out.println("policy["+pos+"]="+builder.serializeToString(policy));
        }
    }

anyway this is what i currently think and i am interested to hear what 
Dims and other people think about it.

thanks,

alek

ps. IMHO maven generated site is hard to navigate and hard to see what 
is the real content and what is boilerplate - wouldn't it be simpler to 
put all information on one web page - just my 2c...

-- 
The best way to predict the future is to invent it - Alan Kay


Mime
View raw message