> Hi > > As Synapse is getting more interest I see a number of people looking > to use it and extend it for binary and text content types as well as > XML. > Not only in Synapse but also in Axis2 I can see a lot of guys are asking for this. > We already support those from some transports (e.g. JMS) but each > transport defines its own way of handling these things,
This is not clear to me , what each transport does is depending on the content type it get the correct builder and asked him to build the Axiom . And the transport will give the input stream to the builder. When it come to write to the wire , transport will pick the correct message formatter and give him the output stream and the Axiom and that guy will serialize the message accordingly . > and so I can't > be sure that a message coming in as binary/jms can go out correctly as > binary/http post. > You mean you want to know the exact wire format ? > So here is what I'd like to do: > > I'd like to have explicit methods: > > OMElement get/setPayload() > This is not clear to me , what do you mean by set and get Payload , isnt that you getting and setting a child node ? > DataHandler get/setBytesPayload() > +1 > String get/setTextPayload() > boolean isBinary(); > boolean isText(); > int getPayloadType() > What would be the result ? > In order to make this work, we should have two well defined QNames - > one for binary and one for text. > > For example binary payload will be in a wrapper element called: > <a:binary xmlns:a="http://ws.apache.org/commons/axiom/ns/data"> > > And text payload could be in > <a:text xmlns:a="http://ws.apache.org/commons/axiom/ns/data"> > What do you mean by text pay load , what is the difference between Omelement.getText and Omelement.getTextPayload() ? > So if I setBinaryPayload, basically what happens (under the covers is) > > OMElement el = fac.createOMElement("binary", axNS); > OMText bin = fac.createOMText(dh, true); > el.addChild(bin); > getBody().setFirstChild(el); > +1 , that will be very convenient. > Now I'd be very happy to do this just in Synapse, but it makes much > more sense to do it in Axiom. Yes. > That would mean everyone using this > (axis2 transports, synapse mediators, etc) would inherit the same > definitions and use the data in a consistent way. Which is the point > of this. > > Paul > > > Thanks Deepal --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
