axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Susantha Kumara" <susan...@opensource.lk>
Subject RE: xsd:any support in Axis C++
Date Tue, 18 May 2004 11:20:00 GMT
Hi Samisa,

> -----Original Message-----
> From: Samisa Abeysinghe [mailto:samisa_abeysinghe@yahoo.com]
> Sent: Tuesday, May 18, 2004 1:15 PM
> To: Apache AXIS C Developers List
> Subject: Re: xsd:any support in Axis C++
> 
> Susantha,
> 
> http://www-106.ibm.com/developerworks/xml/library/ws-xsdany.html is a
good
> referance (very simple
> but good enough)
> 
> JAX-RPC uses javax.xml.soap.SOAPElement to hold xsd:any type.
> 
> I do not think it would be possible to use an object for this. One
reason
> is that you never know
> how large/complex 'any' type would be (how many attributes etc.). 

How large that object/array is not a problem as long as the runtime type
(class or structure) is registered at the server (through server.wsdd).

> Also it
> gives flexibility to end
> users when handling any types using something like SOAPElement. (they
can
> decide either to convert
> it to an object format or keep as XML)

Yes that flexibility is there. But do we really need that flexibility ?.
Can't we assume that at skeleton implementation time the developer knows
what kinds of objects are possible (will come in SOAP) ?.

I mean that the skeleton can be passed a structure that contains
1. Typename of the object (char*)
2. Namespace of the object type (char*)
3. The deserialized object or array (void*)
4. No of elements if it is an array (int)

In cases where complex types are inside another complex types (nested
structures) the same can be applied. 

This way the skeleton implementation will look like following (lets
consider a simple method)

int processOrder(AnyObject* pObject)
{
	if (0 == strcmp(pObject->m_pcTypename, "OrderItem1"))
	{
		OrderItem1* pOrder = pObject->pObj;
		//do what ever the logic to process order 
	}
	else if (0 == strcmp(pObject->m_pcTypename, "OrderItem2"))
	{
		OrderItem2* pOrder = pObject->pObj;
		//do what ever the logic to process order
	}
}

> 
> However your concept of using an object could be mapped to creating a
C++
> equivalent of
> javax.xml.soap.SOAPElement.

But the XML pull model used in Axis makes it difficult to have
SOAPElement (DOM tree like) object passing to skeletons. But it is
possible to pass an API to the Deserializer from which the users can get
any information that contained in SOAP.

---
Susantha

> 
> Thanks,
> Samisa...
> 
> --- Susantha Kumara <susantha@opensource.lk> wrote:
> > Hi all,
> >
> > I expect to work on implementing support for xsd:any in Axis C++. I
had
> > a look at how other WS implementations (.net, Axis Java, wasp) do
this.
> > Most of them passes a DOM tree kind of object in to the skeleton (to
web
> > service method) or returns to the client application. If we take the
> > server side anyone writing a web service will have to browse through
the
> > DOM tree kind of an object and extract the information. Why do
people
> > use this way ?. I mean passing a DOM tree kind of object ?.
> >
> > I see that we can have 2 other ways to do this.
> > 1. Pass an object (interface) which contains set of functions that
can
> > be called to get the information contained in SOAP message.
> > 2. SOAP engine might be able to instantiate and populate the exact
> > runtime object and pass it directly to the skeletons (contained in a
> > generic structure).
> >
> > Please give me your views/ideas so that I proceed in the correct
way.
> >
> > Thanks,
> > ---
> > Susantha Kumara
> > Virtusa (pvt) Ltd.
> > Office : +94112714385
> > Mobile : +94777420453
> >
> >
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.
> http://promo.yahoo.com/sbc/


Mime
View raw message