You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Christian Aberger <Ch...@Aberger.at> on 2001/04/12 08:32:18 UTC

RE: Serialization in Xalan C++

Hi,

rem.: I forward this also to 2 other lists that we talked about below.

<It is basically a communication protocol.>
Another point I forgot to write in my previous mail. I think this spec could
be structured better:
(1) There is serialization. This should describe how to serialize arbitrary
Objects to xml and from xml.

(2) There is transport. This should describe how to transport these xml
streams described in (1) over transports like http, smtp etc.

(3) There is protocol. This should describe how to use (2) to implement
request/response and RPC scenarios etc.

I think the current SOAP spec does by far not have the quality of other
specs like HTML, XML and XSLT and XSL Formatting. It seems to me as if it
had been done fast and dirty. Terms not clearly defined, not well structured
etc. It is the lowest quality spec that I have ever read until now from w3c
or RFCs. In my opinion a clear intention in there is to give a replacement
for VARIANT serialization, which is needed to enable Visual Basic to do
marshalling by value. This might be caused due to the time pressure they had
to bring .net(R) to the market.

I think despite of that things should be worked out to establish a good
standard for serialization through XML. And as there is currently no better
XML serialization standard, well let us use SOAP.

wfR ChrisA

-----Original Message-----
From: aberger@mx.aberger.at [mailto:aberger@mx.aberger.at]On Behalf Of
Christian Aberger
Sent: Donnerstag, 12. April 2001 07:12
To: xalan-dev@xml.apache.org
Subject: Re: Serialization in Xalan C++


Hi,
<2. encoding for application-defined types>
Yes, this is exactly the point. HTML is just a special case for the
transport, in that spec the additional Header (SOAPAction) is described,
the only thing that is special when you use HTML. You can as well store
it to a file etc. I do not want to criticize somebody, but I think this
is a point in the spec that is really irrelevant. The big idea in this
specification is the serialisation. The XML spec also has no special
chapter how to transport it over Http, this could be a separate RPC or
such.

So let us concentrate on serialization, which is the only difficult and
important point. The rest of the spec is trivial.

What I achived until now is a C++ Serialization to a generic stream, as
a test I did it
using Micro$oft's ISAPI (Internet Server Appication Programming
Interface) for Micro$oft Internet Information Server. Some wrapper
classes are used to implement an iostream that reads/writes from/to the
extension control block (ECB) instead of a file. Using an
ifstream/ofstream instead does not change anything, I will propaby add
it as a demo. With this isapistream as I called it the SOAP samples seem
to work (they use HTTP, so I needed a HTTP server to test it, that was
the reason to use IIS, Apache Server only needs an appropriate mod_SOAP,
which is easy with these classes now, only different overflow/underflow,
maybe I do it soon).

It is not an "object2XML" method, but a way similar to Serialization
used in some class libraries
like MFC CObject::Serialize() or NIH of rouge wave'stools.h. But not to
a binary and C++ only and incompatible file, but XML instead, which can
be read e.g. by Java in the same way.

As a SOAP C++ tool I used the IdooXoap open source implementation. I
would be happy if there would be a similar Apache open source project
for C++ SOAP, some weeks ago I asked also in this group, no replies yet,
so I started it myself.

Anyway, as I already wrote (and why I discuss it here): I do not think
the current SOAP way also in the Java version is perfect. SOAP is xml in
/ xml out. And what do we usually use for that ... Xalan. With
extensions for object serialisation...

wfR Christian Aberger.

It is a pitty, I have to go on vaccation now for some days, just now
where discussions become interesting.

James Melton wrote:
>
> SOAP is about two things:
> 1. routing/processing/rpc information
> 2. encoding for application-defined types
> The second of these corresponds to what you seem to be describing. It is
> covered in section 5 of the spec.
>
> The Apache XML SOAP project (http://xml.apache.org/soap/features.html)
> is an example of a Java implementation that does marshal arbitrary
> objects. Perhaps its source could help guide you in creating a C++
> version.
>
> Jim.

-----Original Message-----
From: Avula, Raj [mailto:RAvula@firstam.com]
Sent: Mittwoch, 11. April 2001 23:11
To: 'xalan-dev@xml.apache.org'
Subject: RE: Serialization in Xalan C++


Hi Chris,

	I have looked into SOAP specification. If my understanding is
correct, SOAP is HTTP + XML.
It helps in invoking objects and services. And objects has to respond back
with some result.
It is basically a communication protocol.
	But what I am looking at is Object to XML implemetation of entire
Object Graph.
By the time I want to call Object2XML method, I have all the objects
contained in the current object.
I want to have a common implementation of obj2XML() in the base class and I
should be able to get
the dumb XML graph of all the Objects that are dervied from the super class.
	I don't clearly understand, how SOAP helps for me in this scenario.
Please let me  know, if my understanding is correct.


Thanks,
Raj


> -----Original Message-----
> From:	Avula, Raj
> Sent:	Tuesday, April 10, 2001 2:02 PM
> To:	'xalan-dev@xml.apache.org'
> Subject:	RE: Serialization in Xalan C++
>
> Thanks Chris. Just now I have looked at SOAP.
> Looks like interesting stuff. I am pretty much interested in
> C++ implementation. Let me go through the stuff.
>
> Regards,
> Raj
>
> > -----Original Message-----
> > From:	Christian Aberger [SMTP:xml@aberger.at]
> > Sent:	Tuesday, April 10, 2001 1:33 PM
> > To:	xalan-dev@xml.apache.org
> > Subject:	Re: Serialization in Xalan C++
> >
> > Avula,
> >
> > What you are looking for is SOAP (http://www.w3c.org/TR/SOAP). There is
> > an open source project doing this in Java at a different Apache mailing
> > list. For C++ there is a project not here (no interest yet), but hosted
> > at www.zvon.org. Just for fun I am currently working on an ISAPI
> > extension for the C++ SOAP, maybe later a module for Apache.
> >
> > Honestly speaking I do not think that the design is perfect yet. SOAP is
> > in principle a protocol that has xml as input and xml as output. I would
> > like to try to use Xalan for it, not to do a separate parser based on
> > Xerces for the envelope. But until now nobody was interested.
> >
> > Anyway, also the current version seems to do quite a nice job. If you
> > would like to do some contribution, would be nice, e.g needed is a Xalan
> > stylesheet to convert wsdl files (the M$-SOAP Toolkit service
> > description xml - files) to the C++ stubs etc.
> >
> > wfR Christian Aberger.
> >
> >
> > "Avula, Raj" wrote:
> > >
> > > Hi,
> > >         I am just wondering, if there is any way to implement
> > serilization
> > > using xalan.
> > > I want to basically create common implementation of C++ Object Graph
> to
> > XML
> > > Object Graph.
> > > In java if a class implements Serializable interface, I should be able
> > to
> > > read all the
> > > public members of the class. Is there any way in which I can achive
> the
> > > similar
> > > kind of thing using Xalan C++. I mean is there any Class in xalan API
> > which
> > > allows
> > > me to read all the data members and their values.
> > >
> > > Regards,
> > > Raj.
>