Hi Indika, Please see my comments inline;
On Fri, Jun 27, 2008 at 1:13 PM, indika kumara <[EMAIL PROTECTED]> wrote: > Hi All > > Some thought... > > Currently message building and serializing is in transport layer. According > to the content type ,message is being built and we cannot control the > building process. For example , if the content type is corresponding to the > SOAP , then SOAP message is built and we cannot avoid it. > No we can, just need to override the builder in the axis2.xml associated with the content type and in there depending on a parameter in the axis2.xml we can decide whether to build this message with what ever the builder. May be this parameter can go into the synapse.xml but not sure about the technical challenges of the implementation, so lets keep that decision to the implementation phase. > This is fine only if we use or access SOAP message. But if we can dispatch > to synapse,proxyservices,etc without touching SOAP message > Well, with axis2 this is a little hard because you might need a SOAP info-set to come out passing the handler chain. > and if we will not touch the SOAP message within synapse, then , we should > not want a SOAP message. But , currently , we have not that control . > I think we can get the control at the MessageBuilder level. > > If we can provide a option to transport to specify whether to build a > message or not (build and set as SOAP envelope ) and also if can provide a > way in synapse language to specify whether to build a message or not(Build > mediator which builds message and sets as SOAP envelope – default behavior > may use content-type, but we have to have options to override it.). > This is exactly what I meant. > One other possibility is , with in transport layer , the message always set > as stream or OMDatasource (use BinaryBuilder ) irrespective of content type > and whenever try to access message on the first time > (messagecontext.getSOAPEnvelope()) and if SOAP envelope has not been built > yet, then builds it and sets as Envelope. > Again this is hard to implement, because even if you use OMDataSource you will have to have a SOAPEnvelope and this OMDataSource will be attached as the DataHandler for the payload (most probably the payload will be a Text node with the DataSource as the DataHandler) in which case there is no distinction between a binary message like hessian messages and a SOAP message and will lead to conflicts on building the message. Otherwise the builder has to aware of each and every content-type and it has to embed the logic on how to proceed with these content types, which will affect the extensibility of the message formats supported by synapse. > This will be completely avoid building message as a SOAP envelope , if we > have not any interest in it. > I think there should be a parameter to specify whether to build the message or not, synapse should not be intelligent enough to take that decision. > > For serialization part , we can do the same thing. > > I don't know this is a good suggestion , but I believe , for scenarios, > that we don't access SOPA message, we have to completely avoid building it. > Completely agreed and +1 for this. Thanks, Ruwan > > Thanks > Indika > -- Ruwan Linton http://wso2.org - "Oxygenating the Web Services Platform" http://ruwansblog.blogspot.com/
